Show More
@@ -1,5 +1,14 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 | # |
|
2 | ||
|
3 | hglocate() | |||
|
4 | { | |||
|
5 | echo "hg locate $@" | |||
|
6 | hg locate "$@" | |||
|
7 | ret=$? | |||
|
8 | echo | |||
|
9 | return $ret | |||
|
10 | } | |||
|
11 | ||||
3 | mkdir t |
|
12 | mkdir t | |
4 | cd t |
|
13 | cd t | |
5 | hg init |
|
14 | hg init | |
@@ -10,22 +19,22 b' mkdir t' | |||||
10 | echo 0 > t/x |
|
19 | echo 0 > t/x | |
11 | hg ci -A -m m -d "1000000 0" |
|
20 | hg ci -A -m m -d "1000000 0" | |
12 | touch nottracked |
|
21 | touch nottracked | |
13 |
hg |
|
22 | hglocate a && echo locate succeeded || echo locate failed | |
14 |
hg |
|
23 | hglocate NONEXISTENT && echo locate succeeded || echo locate failed | |
15 |
hg |
|
24 | hglocate | |
16 | hg rm a |
|
25 | hg rm a | |
17 | hg ci -m m -d "1000000 0" |
|
26 | hg ci -m m -d "1000000 0" | |
18 |
hg |
|
27 | hglocate a | |
19 |
hg |
|
28 | hglocate NONEXISTENT | |
20 |
hg |
|
29 | hglocate | |
21 |
hg |
|
30 | hglocate -r 0 a | |
22 |
hg |
|
31 | hglocate -r 0 NONEXISTENT | |
23 |
hg |
|
32 | hglocate -r 0 | |
24 | echo % -I/-X with relative path should work |
|
33 | echo % -I/-X with relative path should work | |
25 | cd t |
|
34 | cd t | |
26 |
hg |
|
35 | hglocate | |
27 |
hg |
|
36 | hglocate -I ../t | |
28 | # test issue294 |
|
37 | # test issue294 | |
29 | cd .. |
|
38 | cd .. | |
30 | rm -r t |
|
39 | rm -r t | |
31 |
hg |
|
40 | hglocate t |
@@ -2,24 +2,48 b' adding a' | |||||
2 | adding b |
|
2 | adding b | |
3 | adding t.h |
|
3 | adding t.h | |
4 | adding t/x |
|
4 | adding t/x | |
|
5 | hg locate a | |||
5 | a |
|
6 | a | |
|
7 | ||||
6 | locate succeeded |
|
8 | locate succeeded | |
|
9 | hg locate NONEXISTENT | |||
|
10 | ||||
7 | locate failed |
|
11 | locate failed | |
|
12 | hg locate | |||
8 | a |
|
13 | a | |
9 | b |
|
14 | b | |
10 | t.h |
|
15 | t.h | |
11 | t/x |
|
16 | t/x | |
|
17 | ||||
|
18 | hg locate a | |||
|
19 | ||||
|
20 | hg locate NONEXISTENT | |||
|
21 | ||||
|
22 | hg locate | |||
12 | b |
|
23 | b | |
13 | t.h |
|
24 | t.h | |
14 | t/x |
|
25 | t/x | |
|
26 | ||||
|
27 | hg locate -r 0 a | |||
15 | a |
|
28 | a | |
|
29 | ||||
|
30 | hg locate -r 0 NONEXISTENT | |||
|
31 | ||||
|
32 | hg locate -r 0 | |||
16 | a |
|
33 | a | |
17 | b |
|
34 | b | |
18 | t.h |
|
35 | t.h | |
19 | t/x |
|
36 | t/x | |
|
37 | ||||
20 | % -I/-X with relative path should work |
|
38 | % -I/-X with relative path should work | |
|
39 | hg locate | |||
21 | b |
|
40 | b | |
22 | t.h |
|
41 | t.h | |
23 | t/x |
|
42 | t/x | |
|
43 | ||||
|
44 | hg locate -I ../t | |||
24 | t/x |
|
45 | t/x | |
|
46 | ||||
|
47 | hg locate t | |||
25 | t/x |
|
48 | t/x | |
|
49 |
General Comments 0
You need to be logged in to leave comments.
Login now