Show More
@@ -356,10 +356,12 b' def _matcher(canonroot, cwd, names, inc,' | |||||
356 | filematch = matchfn(files, '(?:/|$)') or always |
|
356 | filematch = matchfn(files, '(?:/|$)') or always | |
357 | incmatch = always |
|
357 | incmatch = always | |
358 | if inc: |
|
358 | if inc: | |
359 | incmatch = matchfn(map(patkind, inc), '(?:/|$)') |
|
359 | inckinds = [patkind(canonpath(canonroot, cwd, i)) for i in inc] | |
|
360 | incmatch = matchfn(inckinds, '(?:/|$)') | |||
360 | excmatch = lambda fn: False |
|
361 | excmatch = lambda fn: False | |
361 | if exc: |
|
362 | if exc: | |
362 | excmatch = matchfn(map(patkind, exc), '(?:/|$)') |
|
363 | exckinds = [patkind(canonpath(canonroot, cwd, x)) for x in exc] | |
|
364 | excmatch = matchfn(exckinds, '(?:/|$)') | |||
363 |
|
365 | |||
364 | return (roots, |
|
366 | return (roots, | |
365 | lambda fn: (incmatch(fn) and not excmatch(fn) and |
|
367 | lambda fn: (incmatch(fn) and not excmatch(fn) and |
@@ -5,6 +5,8 b' cd t' | |||||
5 | hg init |
|
5 | hg init | |
6 | echo 0 > a |
|
6 | echo 0 > a | |
7 | echo 0 > b |
|
7 | echo 0 > b | |
|
8 | mkdir t | |||
|
9 | echo 0 > t/x | |||
8 | hg ci -A -m m -d "1000000 0" |
|
10 | hg ci -A -m m -d "1000000 0" | |
9 | touch nottracked |
|
11 | touch nottracked | |
10 | hg locate a |
|
12 | hg locate a | |
@@ -18,3 +20,7 b' hg locate' | |||||
18 | hg locate -r 0 a |
|
20 | hg locate -r 0 a | |
19 | hg locate -r 0 NONEXISTENT |
|
21 | hg locate -r 0 NONEXISTENT | |
20 | hg locate -r 0 |
|
22 | hg locate -r 0 | |
|
23 | echo % -I/-X with relative path should work | |||
|
24 | cd t | |||
|
25 | hg locate | |||
|
26 | hg locate -I ../t |
@@ -1,13 +1,21 b'' | |||||
1 | adding a |
|
1 | adding a | |
2 | adding b |
|
2 | adding b | |
|
3 | adding t/x | |||
3 | a |
|
4 | a | |
4 | NONEXISTENT: No such file or directory |
|
5 | NONEXISTENT: No such file or directory | |
5 | a |
|
6 | a | |
6 | b |
|
7 | b | |
|
8 | t/x | |||
7 | a: No such file or directory |
|
9 | a: No such file or directory | |
8 | NONEXISTENT: No such file or directory |
|
10 | NONEXISTENT: No such file or directory | |
9 | b |
|
11 | b | |
|
12 | t/x | |||
10 | a |
|
13 | a | |
11 |
NONEXISTENT: No such file in rev |
|
14 | NONEXISTENT: No such file in rev 9449ae447738 | |
12 | a |
|
15 | a | |
|
16 | t/x | |||
13 | b |
|
17 | b | |
|
18 | % -I/-X with relative path should work | |||
|
19 | b | |||
|
20 | t/x | |||
|
21 | t/x |
General Comments 0
You need to be logged in to leave comments.
Login now