Show More
@@ -1,40 +1,52 b'' | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | 3 | hglocate() |
|
4 | 4 | { |
|
5 | 5 | echo "hg locate $@" |
|
6 | 6 | hg locate "$@" |
|
7 | 7 | ret=$? |
|
8 | 8 | echo |
|
9 | 9 | return $ret |
|
10 | 10 | } |
|
11 | 11 | |
|
12 | 12 | mkdir t |
|
13 | 13 | cd t |
|
14 | 14 | hg init |
|
15 | 15 | echo 0 > a |
|
16 | 16 | echo 0 > b |
|
17 | 17 | echo 0 > t.h |
|
18 | 18 | mkdir t |
|
19 | 19 | echo 0 > t/x |
|
20 | echo 0 > t/b | |
|
21 | echo 0 > t/e.h | |
|
20 | 22 | hg ci -A -m m -d "1000000 0" |
|
21 | 23 | touch nottracked |
|
22 | 24 | hglocate a && echo locate succeeded || echo locate failed |
|
23 | 25 | hglocate NONEXISTENT && echo locate succeeded || echo locate failed |
|
24 | 26 | hglocate |
|
25 | 27 | hg rm a |
|
26 | 28 | hg ci -m m -d "1000000 0" |
|
27 | 29 | hglocate a |
|
28 | 30 | hglocate NONEXISTENT |
|
29 | 31 | hglocate |
|
30 | 32 | hglocate -r 0 a |
|
31 | 33 | hglocate -r 0 NONEXISTENT |
|
32 | 34 | hglocate -r 0 |
|
33 | 35 | echo % -I/-X with relative path should work |
|
34 | 36 | cd t |
|
35 | 37 | hglocate |
|
36 | 38 | hglocate -I ../t |
|
37 | 39 | # test issue294 |
|
38 | 40 | cd .. |
|
39 | 41 | rm -r t |
|
40 | 42 | hglocate t |
|
43 | mkdir otherdir | |
|
44 | cd otherdir | |
|
45 | hglocate b | |
|
46 | hglocate '*.h' | |
|
47 | hglocate path:t/x | |
|
48 | hglocate 're:.*\.h' | |
|
49 | hglocate -r 0 b | |
|
50 | hglocate -r 0 '*.h' | |
|
51 | hglocate -r 0 path:t/x | |
|
52 | hglocate -r 0 're:.*\.h' |
@@ -1,49 +1,93 b'' | |||
|
1 | 1 | adding a |
|
2 | 2 | adding b |
|
3 | 3 | adding t.h |
|
4 | adding t/b | |
|
5 | adding t/e.h | |
|
4 | 6 | adding t/x |
|
5 | 7 | hg locate a |
|
6 | 8 | a |
|
7 | 9 | |
|
8 | 10 | locate succeeded |
|
9 | 11 | hg locate NONEXISTENT |
|
10 | 12 | |
|
11 | 13 | locate failed |
|
12 | 14 | hg locate |
|
13 | 15 | a |
|
14 | 16 | b |
|
15 | 17 | t.h |
|
18 | t/b | |
|
19 | t/e.h | |
|
16 | 20 | t/x |
|
17 | 21 | |
|
18 | 22 | hg locate a |
|
19 | 23 | |
|
20 | 24 | hg locate NONEXISTENT |
|
21 | 25 | |
|
22 | 26 | hg locate |
|
23 | 27 | b |
|
24 | 28 | t.h |
|
29 | t/b | |
|
30 | t/e.h | |
|
25 | 31 | t/x |
|
26 | 32 | |
|
27 | 33 | hg locate -r 0 a |
|
28 | 34 | a |
|
29 | 35 | |
|
30 | 36 | hg locate -r 0 NONEXISTENT |
|
31 | 37 | |
|
32 | 38 | hg locate -r 0 |
|
33 | 39 | a |
|
34 | 40 | b |
|
35 | 41 | t.h |
|
42 | t/b | |
|
43 | t/e.h | |
|
36 | 44 | t/x |
|
37 | 45 | |
|
38 | 46 | % -I/-X with relative path should work |
|
39 | 47 | hg locate |
|
40 | 48 | b |
|
41 | 49 | t.h |
|
50 | t/b | |
|
51 | t/e.h | |
|
42 | 52 | t/x |
|
43 | 53 | |
|
44 | 54 | hg locate -I ../t |
|
55 | t/b | |
|
56 | t/e.h | |
|
45 | 57 | t/x |
|
46 | 58 | |
|
47 | 59 | hg locate t |
|
60 | t/b | |
|
61 | t/e.h | |
|
48 | 62 | t/x |
|
49 | 63 | |
|
64 | hg locate b | |
|
65 | ../b | |
|
66 | ../t/b | |
|
67 | ||
|
68 | hg locate *.h | |
|
69 | ../t.h | |
|
70 | ../t/e.h | |
|
71 | ||
|
72 | hg locate path:t/x | |
|
73 | ../t/x | |
|
74 | ||
|
75 | hg locate re:.*\.h | |
|
76 | ../t.h | |
|
77 | ../t/e.h | |
|
78 | ||
|
79 | hg locate -r 0 b | |
|
80 | ../b | |
|
81 | ../t/b | |
|
82 | ||
|
83 | hg locate -r 0 *.h | |
|
84 | ../t.h | |
|
85 | ../t/e.h | |
|
86 | ||
|
87 | hg locate -r 0 path:t/x | |
|
88 | ../t/x | |
|
89 | ||
|
90 | hg locate -r 0 re:.*\.h | |
|
91 | ../t.h | |
|
92 | ../t/e.h | |
|
93 |
General Comments 0
You need to be logged in to leave comments.
Login now