Bug 394989 - context queries using ** are mishandled
Summary: context queries using ** are mishandled
Status: NEW
Alias: None
Product: TCF
Classification: Tools
Component: Agent (show other bugs)
Version: 1.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Eugene Tarassov CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-23 13:08 EST by Manuel Coutand CLA
Modified: 2012-12-05 09:44 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Manuel Coutand CLA 2012-11-23 13:08:13 EST
if I have a tree like this:
/foo
/foo/bar
/foo/bar/foo
/foo/bar/foobar
/foo/foobar

and run the following context query: "bar/**"

I'll get:
/foo/bar
/foo/bar/foo
/foo/bar/foobar

I would have expected:
/foo/bar/foo
/foo/bar/foobar

the .h says "The part "**" matches any sequence of contexts"

Does it also mean no contexts?

if it does then the .c is correct but I believe it's worth mentioning it in the .h .java and doc.

if it doesn't then there is a superfluous line in the match function in contextquery.c

also, if it doesn't what would be the way to get the list of all the descendants of a context but not the context itself?

I'll provided patches for whatever is the correct answer.

Thanks in advance.
Comment 1 Manuel Coutand CLA 2012-12-05 09:44:05 EST
"also, if it doesn't what would be the way to get the list of all the descendants of a context but not the context itself?"

was supposed to read:

"also, if it DOES what would be the way to get the list of all the descendants of a context but not the context itself?"