Closed Bug 482075 Opened 15 years ago Closed 15 years ago

mxr case sensitive search fails to find all relevant matches

Categories

(Webtools Graveyard :: MXR, defect)

x86
Windows XP
defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: nelson, Assigned: timeless)

References

()

Details

When doing a case sensitive search, MXR sometimes fails to find all 
(or even any) of the proper matches.  To illustrate:

1) Do this test to see all the occurrences of the string config.mk in the
makefiles in the security tree.

http://mxr.mozilla.org/security/search?string=config.mk&tree=security

2) Now repeat the test with case sensitivity on.

http://mxr.mozilla.org/security/search?string=config.mk&case=on&tree=security

It finds NO MATCHES.  This can seriously deceive a developer!
Here's another example that does not use "."

http://mxr.mozilla.org/security/search?string=%5ENSSCertificate_&regexp=on&find=nss%2Flib%2Fpki&tree=security

Finds all lines that begin with NSSCertificate_, including those that do
not match by case.  But turning on case matching,

http://mxr.mozilla.org/security/search?string=%5ENSSCertificate_&regexp=on&case=on&find=nss%2Flib%2Fpki&tree=security

finds no matches.  In this case, Problem appears to be the carat.
The the second example, the one in comment 2, the correct desired search 
results may be found with this search:

http://mxr.mozilla.org/security/search?string=%5ENSSCertificate_&regexp=on&find=nss%2Flib%2Fpki&filter=NSSCertificate_&tree=security

Basically it does a case-insensitive regexp search, then does a case sensitive
filtration of the results, avoiding the carat in the filter.  With the carat
in the filter, it has the same problem.
Here's an example that does not use regex.

http://mxr.mozilla.org/security/search?string=name.other&find=nss%2F&tree=security

finds 98 lines of code containing "name.other", but turn on case sensitive
and it finds none.

http://mxr.mozilla.org/security/search?string=name.other&case=on&find=nss%2F&tree=security
thanks. i finally investigated this.

i'm escaping things too many times.
Status: NEW → ASSIGNED
http://mxr.mozilla.org/security/search?string=Makefile.com&case=on&find=nss%2F

ended up being a nice testcase

http://hg.mozilla.org/webtools/mxr/rev/71ad992159d7
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Assignee: nobody → timeless
Depends on: 487085
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.