Show More
@@ -1,68 +1,75 b'' | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | 3 | mkdir t |
|
4 | 4 | cd t |
|
5 | 5 | hg init |
|
6 | 6 | echo import > port |
|
7 | 7 | hg add port |
|
8 | 8 | hg commit -m 0 -u spam -d '0 0' |
|
9 | 9 | echo export >> port |
|
10 | 10 | hg commit -m 1 -u eggs -d '1 0' |
|
11 | 11 | echo export > port |
|
12 | 12 | echo vaportight >> port |
|
13 | 13 | echo 'import/export' >> port |
|
14 | 14 | hg commit -m 2 -u spam -d '2 0' |
|
15 | 15 | echo 'import/export' >> port |
|
16 | 16 | hg commit -m 3 -u eggs -d '3 0' |
|
17 | 17 | head -n 3 port > port1 |
|
18 | 18 | mv port1 port |
|
19 | 19 | hg commit -m 4 -u spam -d '4 0' |
|
20 | 20 | echo % pattern error |
|
21 | 21 | hg grep '**test**' |
|
22 | 22 | echo % simple |
|
23 | 23 | hg grep port port |
|
24 | 24 | echo % all |
|
25 | 25 | hg grep --all -nu port port |
|
26 | 26 | echo % other |
|
27 | 27 | hg grep import port |
|
28 | 28 | |
|
29 | 29 | hg cp port port2 |
|
30 | 30 | hg commit -m 4 -u spam -d '5 0' |
|
31 | 31 | echo '% follow' |
|
32 | 32 | hg grep -f 'import$' port2 |
|
33 | 33 | echo deport >> port2 |
|
34 | 34 | hg commit -m 5 -u eggs -d '6 0' |
|
35 | 35 | hg grep -f --all -nu port port2 |
|
36 | 36 | |
|
37 | 37 | cd .. |
|
38 | 38 | hg init t2 |
|
39 | 39 | cd t2 |
|
40 | 40 | hg grep foobar foo |
|
41 | 41 | hg grep foobar |
|
42 | 42 | echo blue >> color |
|
43 | 43 | echo black >> color |
|
44 | 44 | hg add color |
|
45 | 45 | hg ci -m 0 -d '0 0' |
|
46 | 46 | echo orange >> color |
|
47 | 47 | hg ci -m 1 -d '0 0' |
|
48 | 48 | echo black > color |
|
49 | 49 | hg ci -m 2 -d '0 0' |
|
50 | 50 | echo orange >> color |
|
51 | 51 | echo blue >> color |
|
52 | 52 | hg ci -m 3 -d '0 0' |
|
53 | 53 | hg grep orange |
|
54 | 54 | hg grep --all orange |
|
55 | 55 | |
|
56 | echo % match in last "line" without newline | |
|
57 | python -c 'fp = open("noeol", "wb"); fp.write("no infinite loop"); fp.close();' | |
|
58 | hg ci -Amnoeol | |
|
59 | echo % last character omitted in output to avoid infinite loop | |
|
60 | hg grep loop | |
|
61 | ||
|
56 | 62 | # Got a traceback when using grep on a single |
|
57 | 63 | # revision with renamed files. |
|
58 | 64 | cd .. |
|
59 | 65 | echo % issue 685 |
|
60 | 66 | hg init issue685 |
|
61 | 67 | cd issue685 |
|
62 | 68 | echo octarine > color |
|
63 | 69 | hg ci -Amcolor |
|
64 | 70 | hg rename color colour |
|
65 | 71 | hg ci -Am rename |
|
66 | 72 | hg grep octarine |
|
67 | 73 | # Used to crash here |
|
68 | 74 | hg grep -r 1 octarine |
|
75 |
@@ -1,39 +1,43 b'' | |||
|
1 | 1 | % pattern error |
|
2 | 2 | grep: invalid match pattern: nothing to repeat |
|
3 | 3 | % simple |
|
4 | 4 | port:4:export |
|
5 | 5 | port:4:vaportight |
|
6 | 6 | port:4:import/export |
|
7 | 7 | % all |
|
8 | 8 | port:4:4:-:spam:import/export |
|
9 | 9 | port:3:4:+:eggs:import/export |
|
10 | 10 | port:2:1:-:spam:import |
|
11 | 11 | port:2:2:-:spam:export |
|
12 | 12 | port:2:1:+:spam:export |
|
13 | 13 | port:2:2:+:spam:vaportight |
|
14 | 14 | port:2:3:+:spam:import/export |
|
15 | 15 | port:1:2:+:eggs:export |
|
16 | 16 | port:0:1:+:spam:import |
|
17 | 17 | % other |
|
18 | 18 | port:4:import/export |
|
19 | 19 | % follow |
|
20 | 20 | port:0:import |
|
21 | 21 | port2:6:4:+:eggs:deport |
|
22 | 22 | port:4:4:-:spam:import/export |
|
23 | 23 | port:3:4:+:eggs:import/export |
|
24 | 24 | port:2:1:-:spam:import |
|
25 | 25 | port:2:2:-:spam:export |
|
26 | 26 | port:2:1:+:spam:export |
|
27 | 27 | port:2:2:+:spam:vaportight |
|
28 | 28 | port:2:3:+:spam:import/export |
|
29 | 29 | port:1:2:+:eggs:export |
|
30 | 30 | port:0:1:+:spam:import |
|
31 | 31 | color:3:orange |
|
32 | 32 | color:3:+:orange |
|
33 | 33 | color:2:-:orange |
|
34 | 34 | color:1:+:orange |
|
35 | % match in last line without newline | |
|
36 | adding noeol | |
|
37 | % last character omitted in output to avoid infinite loop | |
|
38 | noeol:4:no infinite loo | |
|
35 | 39 | % issue 685 |
|
36 | 40 | adding color |
|
37 | 41 | color:0:octarine |
|
38 | 42 | colour:1:octarine |
|
39 | 43 | colour:1:octarine |
General Comments 0
You need to be logged in to leave comments.
Login now