Show More
@@ -1,102 +1,103 | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | echo "[extensions]" >> $HGRCPATH |
|
3 | echo "[extensions]" >> $HGRCPATH | |
4 | echo "bookmarks=" >> $HGRCPATH |
|
4 | echo "bookmarks=" >> $HGRCPATH | |
5 |
|
5 | |||
6 | hg init |
|
6 | hg init | |
7 |
|
7 | |||
8 | echo % no bookmarks |
|
8 | echo % no bookmarks | |
9 | hg bookmarks |
|
9 | hg bookmarks | |
10 |
|
10 | |||
11 | echo % bookmark rev -1 |
|
11 | echo % bookmark rev -1 | |
12 | hg bookmark X |
|
12 | hg bookmark X | |
13 |
|
13 | |||
14 | echo % list bookmarks |
|
14 | echo % list bookmarks | |
15 | hg bookmarks |
|
15 | hg bookmarks | |
16 |
|
16 | |||
17 | echo % list bookmarks with color |
|
17 | echo % list bookmarks with color | |
18 |
hg --config extensions.color= |
|
18 | hg --config extensions.color= --config color.mode=ansi \ | |
|
19 | bookmarks --color=always | |||
19 |
|
20 | |||
20 | echo a > a |
|
21 | echo a > a | |
21 | hg add a |
|
22 | hg add a | |
22 | hg commit -m 0 |
|
23 | hg commit -m 0 | |
23 |
|
24 | |||
24 | echo % bookmark X moved to rev 0 |
|
25 | echo % bookmark X moved to rev 0 | |
25 | hg bookmarks |
|
26 | hg bookmarks | |
26 |
|
27 | |||
27 | echo % look up bookmark |
|
28 | echo % look up bookmark | |
28 | hg log -r X |
|
29 | hg log -r X | |
29 |
|
30 | |||
30 | echo % second bookmark for rev 0 |
|
31 | echo % second bookmark for rev 0 | |
31 | hg bookmark X2 |
|
32 | hg bookmark X2 | |
32 |
|
33 | |||
33 | echo % bookmark rev -1 again |
|
34 | echo % bookmark rev -1 again | |
34 | hg bookmark -r null Y |
|
35 | hg bookmark -r null Y | |
35 |
|
36 | |||
36 | echo % list bookmarks |
|
37 | echo % list bookmarks | |
37 | hg bookmarks |
|
38 | hg bookmarks | |
38 |
|
39 | |||
39 | echo b > b |
|
40 | echo b > b | |
40 | hg add b |
|
41 | hg add b | |
41 | hg commit -m 1 |
|
42 | hg commit -m 1 | |
42 |
|
43 | |||
43 | echo % bookmarks X and X2 moved to rev 1, Y at rev -1 |
|
44 | echo % bookmarks X and X2 moved to rev 1, Y at rev -1 | |
44 | hg bookmarks |
|
45 | hg bookmarks | |
45 |
|
46 | |||
46 | echo % bookmark rev 0 again |
|
47 | echo % bookmark rev 0 again | |
47 | hg bookmark -r 0 Z |
|
48 | hg bookmark -r 0 Z | |
48 |
|
49 | |||
49 | echo c > c |
|
50 | echo c > c | |
50 | hg add c |
|
51 | hg add c | |
51 | hg commit -m 2 |
|
52 | hg commit -m 2 | |
52 |
|
53 | |||
53 | echo % bookmarks X and X2 moved to rev 2, Y at rev -1, Z at rev 0 |
|
54 | echo % bookmarks X and X2 moved to rev 2, Y at rev -1, Z at rev 0 | |
54 | hg bookmarks |
|
55 | hg bookmarks | |
55 |
|
56 | |||
56 | echo % rename nonexistent bookmark |
|
57 | echo % rename nonexistent bookmark | |
57 | hg bookmark -m A B |
|
58 | hg bookmark -m A B | |
58 |
|
59 | |||
59 | echo % rename to existent bookmark |
|
60 | echo % rename to existent bookmark | |
60 | hg bookmark -m X Y |
|
61 | hg bookmark -m X Y | |
61 |
|
62 | |||
62 | echo % force rename to existent bookmark |
|
63 | echo % force rename to existent bookmark | |
63 | hg bookmark -f -m X Y |
|
64 | hg bookmark -f -m X Y | |
64 |
|
65 | |||
65 | echo % list bookmarks |
|
66 | echo % list bookmarks | |
66 | hg bookmark |
|
67 | hg bookmark | |
67 |
|
68 | |||
68 | echo % rename without new name |
|
69 | echo % rename without new name | |
69 | hg bookmark -m Y |
|
70 | hg bookmark -m Y | |
70 |
|
71 | |||
71 | echo % delete without name |
|
72 | echo % delete without name | |
72 | hg bookmark -d |
|
73 | hg bookmark -d | |
73 |
|
74 | |||
74 | echo % delete nonexistent bookmark |
|
75 | echo % delete nonexistent bookmark | |
75 | hg bookmark -d A |
|
76 | hg bookmark -d A | |
76 |
|
77 | |||
77 | echo % bookmark name with spaces should be stripped |
|
78 | echo % bookmark name with spaces should be stripped | |
78 | hg bookmark ' x y ' |
|
79 | hg bookmark ' x y ' | |
79 |
|
80 | |||
80 | echo % list bookmarks |
|
81 | echo % list bookmarks | |
81 | hg bookmarks |
|
82 | hg bookmarks | |
82 |
|
83 | |||
83 | echo % look up stripped bookmark name |
|
84 | echo % look up stripped bookmark name | |
84 | hg log -r 'x y' |
|
85 | hg log -r 'x y' | |
85 |
|
86 | |||
86 | echo % reject bookmark name with newline |
|
87 | echo % reject bookmark name with newline | |
87 | hg bookmark ' |
|
88 | hg bookmark ' | |
88 | ' |
|
89 | ' | |
89 |
|
90 | |||
90 | echo % bookmark with existing name |
|
91 | echo % bookmark with existing name | |
91 | hg bookmark Z |
|
92 | hg bookmark Z | |
92 |
|
93 | |||
93 | echo % force bookmark with existing name |
|
94 | echo % force bookmark with existing name | |
94 | hg bookmark -f Z |
|
95 | hg bookmark -f Z | |
95 |
|
96 | |||
96 | echo % list bookmarks |
|
97 | echo % list bookmarks | |
97 | hg bookmark |
|
98 | hg bookmark | |
98 |
|
99 | |||
99 | echo % revision but no bookmark name |
|
100 | echo % revision but no bookmark name | |
100 | hg bookmark -r . |
|
101 | hg bookmark -r . | |
101 |
|
102 | |||
102 | true |
|
103 | true |
@@ -1,58 +1,59 | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | echo "[extensions]" >> $HGRCPATH |
|
3 | echo "[extensions]" >> $HGRCPATH | |
4 | echo "bookmarks=" >> $HGRCPATH |
|
4 | echo "bookmarks=" >> $HGRCPATH | |
5 |
|
5 | |||
6 | echo "[bookmarks]" >> $HGRCPATH |
|
6 | echo "[bookmarks]" >> $HGRCPATH | |
7 | echo "track.current = True" >> $HGRCPATH |
|
7 | echo "track.current = True" >> $HGRCPATH | |
8 |
|
8 | |||
9 | hg init |
|
9 | hg init | |
10 |
|
10 | |||
11 | echo % no bookmarks |
|
11 | echo % no bookmarks | |
12 | hg bookmarks |
|
12 | hg bookmarks | |
13 |
|
13 | |||
14 | echo % set bookmark X |
|
14 | echo % set bookmark X | |
15 | hg bookmark X |
|
15 | hg bookmark X | |
16 |
|
16 | |||
17 | echo % list bookmarks |
|
17 | echo % list bookmarks | |
18 | hg bookmark |
|
18 | hg bookmark | |
19 |
|
19 | |||
20 | echo % list bookmarks with color |
|
20 | echo % list bookmarks with color | |
21 |
hg --config extensions.color= |
|
21 | hg --config extensions.color= --config color.mode=ansi \ | |
|
22 | bookmark --color=always | |||
22 |
|
23 | |||
23 | echo % update to bookmark X |
|
24 | echo % update to bookmark X | |
24 | hg update X |
|
25 | hg update X | |
25 |
|
26 | |||
26 | echo % list bookmarks |
|
27 | echo % list bookmarks | |
27 | hg bookmarks |
|
28 | hg bookmarks | |
28 |
|
29 | |||
29 | echo % rename |
|
30 | echo % rename | |
30 | hg bookmark -m X Z |
|
31 | hg bookmark -m X Z | |
31 |
|
32 | |||
32 | echo % list bookmarks |
|
33 | echo % list bookmarks | |
33 | hg bookmarks |
|
34 | hg bookmarks | |
34 |
|
35 | |||
35 | echo % new bookmark Y |
|
36 | echo % new bookmark Y | |
36 | hg bookmark Y |
|
37 | hg bookmark Y | |
37 |
|
38 | |||
38 | echo % list bookmarks |
|
39 | echo % list bookmarks | |
39 | hg bookmark |
|
40 | hg bookmark | |
40 |
|
41 | |||
41 | echo % commit |
|
42 | echo % commit | |
42 | echo 'b' > b |
|
43 | echo 'b' > b | |
43 | hg add b |
|
44 | hg add b | |
44 | hg commit -m'test' |
|
45 | hg commit -m'test' | |
45 |
|
46 | |||
46 | echo % list bookmarks |
|
47 | echo % list bookmarks | |
47 | hg bookmark |
|
48 | hg bookmark | |
48 |
|
49 | |||
49 | echo % delete bookmarks |
|
50 | echo % delete bookmarks | |
50 | hg bookmark -d Y |
|
51 | hg bookmark -d Y | |
51 | hg bookmark -d Z |
|
52 | hg bookmark -d Z | |
52 |
|
53 | |||
53 | echo % list bookmarks |
|
54 | echo % list bookmarks | |
54 | hg bookmark |
|
55 | hg bookmark | |
55 |
|
56 | |||
56 | echo % update to tip |
|
57 | echo % update to tip | |
57 | hg update tip |
|
58 | hg update tip | |
58 |
|
59 |
@@ -1,70 +1,71 | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | echo "[extensions]" >> $HGRCPATH |
|
3 | echo "[extensions]" >> $HGRCPATH | |
4 | echo "churn=" >> $HGRCPATH |
|
4 | echo "churn=" >> $HGRCPATH | |
5 |
|
5 | |||
6 | echo % create test repository |
|
6 | echo % create test repository | |
7 | hg init repo |
|
7 | hg init repo | |
8 | cd repo |
|
8 | cd repo | |
9 | echo a > a |
|
9 | echo a > a | |
10 | hg ci -Am adda -u user1 -d 6:00 |
|
10 | hg ci -Am adda -u user1 -d 6:00 | |
11 | echo b >> a |
|
11 | echo b >> a | |
12 | echo b > b |
|
12 | echo b > b | |
13 | hg ci -m changeba -u user2 -d 9:00 a |
|
13 | hg ci -m changeba -u user2 -d 9:00 a | |
14 | hg ci -Am addb -u user2 -d 9:30 |
|
14 | hg ci -Am addb -u user2 -d 9:30 | |
15 | echo c >> a |
|
15 | echo c >> a | |
16 | echo c >> b |
|
16 | echo c >> b | |
17 | echo c > c |
|
17 | echo c > c | |
18 | hg ci -m changeca -u user3 -d 12:00 a |
|
18 | hg ci -m changeca -u user3 -d 12:00 a | |
19 | hg ci -m changecb -u user3 -d 12:15 b |
|
19 | hg ci -m changecb -u user3 -d 12:15 b | |
20 | hg ci -Am addc -u user3 -d 12:30 |
|
20 | hg ci -Am addc -u user3 -d 12:30 | |
21 | mkdir -p d/e |
|
21 | mkdir -p d/e | |
22 | echo abc > d/e/f1.txt |
|
22 | echo abc > d/e/f1.txt | |
23 | hg ci -Am "add d/e/f1.txt" -u user1 -d 12:45 d/e/f1.txt |
|
23 | hg ci -Am "add d/e/f1.txt" -u user1 -d 12:45 d/e/f1.txt | |
24 | mkdir -p d/g |
|
24 | mkdir -p d/g | |
25 | echo def > d/g/f2.txt |
|
25 | echo def > d/g/f2.txt | |
26 | hg ci -Am "add d/g/f2.txt" -u user1 -d 13:00 d/g/f2.txt |
|
26 | hg ci -Am "add d/g/f2.txt" -u user1 -d 13:00 d/g/f2.txt | |
27 |
|
27 | |||
28 | echo % churn separate directories |
|
28 | echo % churn separate directories | |
29 | cd d |
|
29 | cd d | |
30 | hg churn e |
|
30 | hg churn e | |
31 | echo % churn all |
|
31 | echo % churn all | |
32 | hg churn |
|
32 | hg churn | |
33 | echo % churn up to rev 2 |
|
33 | echo % churn up to rev 2 | |
34 | hg churn -r :2 |
|
34 | hg churn -r :2 | |
35 | cd .. |
|
35 | cd .. | |
36 | echo % churn with aliases |
|
36 | echo % churn with aliases | |
37 | cat > ../aliases <<EOF |
|
37 | cat > ../aliases <<EOF | |
38 | user1 alias1 |
|
38 | user1 alias1 | |
39 | user3 alias3 |
|
39 | user3 alias3 | |
40 | EOF |
|
40 | EOF | |
41 | hg churn --aliases ../aliases |
|
41 | hg churn --aliases ../aliases | |
42 | echo % churn with .hgchurn |
|
42 | echo % churn with .hgchurn | |
43 | mv ../aliases .hgchurn |
|
43 | mv ../aliases .hgchurn | |
44 | hg churn |
|
44 | hg churn | |
45 | rm .hgchurn |
|
45 | rm .hgchurn | |
46 | echo % churn with column specifier |
|
46 | echo % churn with column specifier | |
47 | COLUMNS=40 hg churn |
|
47 | COLUMNS=40 hg churn | |
48 | echo % churn by hour |
|
48 | echo % churn by hour | |
49 | hg churn -f '%H' -s |
|
49 | hg churn -f '%H' -s | |
50 |
|
50 | |||
51 | echo % churn with separated added/removed lines |
|
51 | echo % churn with separated added/removed lines | |
52 | hg rm d/g/f2.txt |
|
52 | hg rm d/g/f2.txt | |
53 | hg ci -Am "removed d/g/f2.txt" -u user1 -d 14:00 d/g/f2.txt |
|
53 | hg ci -Am "removed d/g/f2.txt" -u user1 -d 14:00 d/g/f2.txt | |
54 | hg churn --diffstat |
|
54 | hg churn --diffstat | |
55 | echo % churn --diffstat with color |
|
55 | echo % churn --diffstat with color | |
56 |
hg --config extensions.color= churn -- |
|
56 | hg --config extensions.color= churn --config color.mode=ansi \ | |
|
57 | --diffstat --color=always | |||
57 |
|
58 | |||
58 | echo % changeset number churn |
|
59 | echo % changeset number churn | |
59 | hg churn -c |
|
60 | hg churn -c | |
60 |
|
61 | |||
61 | cd .. |
|
62 | cd .. | |
62 |
|
63 | |||
63 | # issue 833: ZeroDivisionError |
|
64 | # issue 833: ZeroDivisionError | |
64 | hg init issue-833 |
|
65 | hg init issue-833 | |
65 | cd issue-833 |
|
66 | cd issue-833 | |
66 | touch foo |
|
67 | touch foo | |
67 | hg ci -Am foo |
|
68 | hg ci -Am foo | |
68 | # this was failing with a ZeroDivisionError |
|
69 | # this was failing with a ZeroDivisionError | |
69 | hg churn |
|
70 | hg churn | |
70 | cd .. |
|
71 | cd .. |
@@ -1,99 +1,100 | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | mkdir t |
|
3 | mkdir t | |
4 | cd t |
|
4 | cd t | |
5 | hg init |
|
5 | hg init | |
6 | echo import > port |
|
6 | echo import > port | |
7 | hg add port |
|
7 | hg add port | |
8 | hg commit -m 0 -u spam -d '0 0' |
|
8 | hg commit -m 0 -u spam -d '0 0' | |
9 | echo export >> port |
|
9 | echo export >> port | |
10 | hg commit -m 1 -u eggs -d '1 0' |
|
10 | hg commit -m 1 -u eggs -d '1 0' | |
11 | echo export > port |
|
11 | echo export > port | |
12 | echo vaportight >> port |
|
12 | echo vaportight >> port | |
13 | echo 'import/export' >> port |
|
13 | echo 'import/export' >> port | |
14 | hg commit -m 2 -u spam -d '2 0' |
|
14 | hg commit -m 2 -u spam -d '2 0' | |
15 | echo 'import/export' >> port |
|
15 | echo 'import/export' >> port | |
16 | hg commit -m 3 -u eggs -d '3 0' |
|
16 | hg commit -m 3 -u eggs -d '3 0' | |
17 | head -n 3 port > port1 |
|
17 | head -n 3 port > port1 | |
18 | mv port1 port |
|
18 | mv port1 port | |
19 | hg commit -m 4 -u spam -d '4 0' |
|
19 | hg commit -m 4 -u spam -d '4 0' | |
20 | echo % pattern error |
|
20 | echo % pattern error | |
21 | hg grep '**test**' |
|
21 | hg grep '**test**' | |
22 | echo % simple |
|
22 | echo % simple | |
23 | hg grep port port |
|
23 | hg grep port port | |
24 | echo % simple with color |
|
24 | echo % simple with color | |
25 |
hg --config extensions.color= grep --co |
|
25 | hg --config extensions.color= grep --config color.mode=ansi \ | |
|
26 | --color=always port port | |||
26 | echo % all |
|
27 | echo % all | |
27 | hg grep --traceback --all -nu port port |
|
28 | hg grep --traceback --all -nu port port | |
28 | echo % other |
|
29 | echo % other | |
29 | hg grep import port |
|
30 | hg grep import port | |
30 |
|
31 | |||
31 | hg cp port port2 |
|
32 | hg cp port port2 | |
32 | hg commit -m 4 -u spam -d '5 0' |
|
33 | hg commit -m 4 -u spam -d '5 0' | |
33 | echo % follow |
|
34 | echo % follow | |
34 | hg grep --traceback -f 'import$' port2 |
|
35 | hg grep --traceback -f 'import$' port2 | |
35 | echo deport >> port2 |
|
36 | echo deport >> port2 | |
36 | hg commit -m 5 -u eggs -d '6 0' |
|
37 | hg commit -m 5 -u eggs -d '6 0' | |
37 | hg grep -f --all -nu port port2 |
|
38 | hg grep -f --all -nu port port2 | |
38 |
|
39 | |||
39 | cd .. |
|
40 | cd .. | |
40 | hg init t2 |
|
41 | hg init t2 | |
41 | cd t2 |
|
42 | cd t2 | |
42 | hg grep foobar foo |
|
43 | hg grep foobar foo | |
43 | hg grep foobar |
|
44 | hg grep foobar | |
44 | echo blue >> color |
|
45 | echo blue >> color | |
45 | echo black >> color |
|
46 | echo black >> color | |
46 | hg add color |
|
47 | hg add color | |
47 | hg ci -m 0 |
|
48 | hg ci -m 0 | |
48 | echo orange >> color |
|
49 | echo orange >> color | |
49 | hg ci -m 1 |
|
50 | hg ci -m 1 | |
50 | echo black > color |
|
51 | echo black > color | |
51 | hg ci -m 2 |
|
52 | hg ci -m 2 | |
52 | echo orange >> color |
|
53 | echo orange >> color | |
53 | echo blue >> color |
|
54 | echo blue >> color | |
54 | hg ci -m 3 |
|
55 | hg ci -m 3 | |
55 | hg grep orange |
|
56 | hg grep orange | |
56 | hg grep --all orange |
|
57 | hg grep --all orange | |
57 |
|
58 | |||
58 | echo % match in last "line" without newline |
|
59 | echo % match in last "line" without newline | |
59 | python -c 'fp = open("noeol", "wb"); fp.write("no infinite loop"); fp.close();' |
|
60 | python -c 'fp = open("noeol", "wb"); fp.write("no infinite loop"); fp.close();' | |
60 | hg ci -Amnoeol |
|
61 | hg ci -Amnoeol | |
61 | echo % last character omitted in output to avoid infinite loop |
|
62 | echo % last character omitted in output to avoid infinite loop | |
62 | hg grep loop |
|
63 | hg grep loop | |
63 |
|
64 | |||
64 | # Got a traceback when using grep on a single |
|
65 | # Got a traceback when using grep on a single | |
65 | # revision with renamed files. |
|
66 | # revision with renamed files. | |
66 | cd .. |
|
67 | cd .. | |
67 | echo % issue 685 |
|
68 | echo % issue 685 | |
68 | hg init issue685 |
|
69 | hg init issue685 | |
69 | cd issue685 |
|
70 | cd issue685 | |
70 | echo octarine > color |
|
71 | echo octarine > color | |
71 | hg ci -Amcolor |
|
72 | hg ci -Amcolor | |
72 | hg rename color colour |
|
73 | hg rename color colour | |
73 | hg ci -Am rename |
|
74 | hg ci -Am rename | |
74 | hg grep octarine |
|
75 | hg grep octarine | |
75 | # Used to crash here |
|
76 | # Used to crash here | |
76 | hg grep -r 1 octarine |
|
77 | hg grep -r 1 octarine | |
77 |
|
78 | |||
78 | # Issue337: test that grep follows parent-child relationships instead |
|
79 | # Issue337: test that grep follows parent-child relationships instead | |
79 | # of just using revision numbers. |
|
80 | # of just using revision numbers. | |
80 | cd .. |
|
81 | cd .. | |
81 | echo % issue 337 |
|
82 | echo % issue 337 | |
82 | hg init issue337 |
|
83 | hg init issue337 | |
83 | cd issue337 |
|
84 | cd issue337 | |
84 |
|
85 | |||
85 | echo white > color |
|
86 | echo white > color | |
86 | hg commit -A -m "0 white" |
|
87 | hg commit -A -m "0 white" | |
87 |
|
88 | |||
88 | echo red > color |
|
89 | echo red > color | |
89 | hg commit -A -m "1 red" |
|
90 | hg commit -A -m "1 red" | |
90 |
|
91 | |||
91 | hg update 0 |
|
92 | hg update 0 | |
92 | echo black > color |
|
93 | echo black > color | |
93 | hg commit -A -m "2 black" |
|
94 | hg commit -A -m "2 black" | |
94 |
|
95 | |||
95 | hg update --clean 1 |
|
96 | hg update --clean 1 | |
96 | echo blue > color |
|
97 | echo blue > color | |
97 | hg commit -A -m "3 blue" |
|
98 | hg commit -A -m "3 blue" | |
98 |
|
99 | |||
99 | hg grep --all red |
|
100 | hg grep --all red |
@@ -1,183 +1,184 | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | hg init a |
|
3 | hg init a | |
4 |
|
4 | |||
5 | cd a |
|
5 | cd a | |
6 | echo a > a |
|
6 | echo a > a | |
7 | hg ci -Ama -d '1 0' |
|
7 | hg ci -Ama -d '1 0' | |
8 |
|
8 | |||
9 | hg cp a b |
|
9 | hg cp a b | |
10 | hg ci -mb -d '2 0' |
|
10 | hg ci -mb -d '2 0' | |
11 |
|
11 | |||
12 | mkdir dir |
|
12 | mkdir dir | |
13 | hg mv b dir |
|
13 | hg mv b dir | |
14 | hg ci -mc -d '3 0' |
|
14 | hg ci -mc -d '3 0' | |
15 |
|
15 | |||
16 | hg mv a b |
|
16 | hg mv a b | |
17 | echo a > d |
|
17 | echo a > d | |
18 | hg add d |
|
18 | hg add d | |
19 | hg ci -md -d '4 0' |
|
19 | hg ci -md -d '4 0' | |
20 |
|
20 | |||
21 | hg mv dir/b e |
|
21 | hg mv dir/b e | |
22 | hg ci -me -d '5 0' |
|
22 | hg ci -me -d '5 0' | |
23 |
|
23 | |||
24 | hg log a |
|
24 | hg log a | |
25 | echo % -f, directory |
|
25 | echo % -f, directory | |
26 | hg log -f dir |
|
26 | hg log -f dir | |
27 | echo % -f, but no args |
|
27 | echo % -f, but no args | |
28 | hg log -f |
|
28 | hg log -f | |
29 | echo % one rename |
|
29 | echo % one rename | |
30 | hg log -vf a |
|
30 | hg log -vf a | |
31 | echo % many renames |
|
31 | echo % many renames | |
32 | hg log -vf e |
|
32 | hg log -vf e | |
33 |
|
33 | |||
34 | echo '% log copies with --copies' |
|
34 | echo '% log copies with --copies' | |
35 | hg log -vC --template '{rev} {file_copies}\n' |
|
35 | hg log -vC --template '{rev} {file_copies}\n' | |
36 | echo '% log copies switch without --copies, with old filecopy template' |
|
36 | echo '% log copies switch without --copies, with old filecopy template' | |
37 | hg log -v --template '{rev} {file_copies_switch%filecopy}\n' |
|
37 | hg log -v --template '{rev} {file_copies_switch%filecopy}\n' | |
38 | echo '% log copies switch with --copies' |
|
38 | echo '% log copies switch with --copies' | |
39 | hg log -vC --template '{rev} {file_copies_switch}\n' |
|
39 | hg log -vC --template '{rev} {file_copies_switch}\n' | |
40 |
|
40 | |||
41 | echo '% log copies with hardcoded style and with --style=default' |
|
41 | echo '% log copies with hardcoded style and with --style=default' | |
42 | hg log -vC -r4 |
|
42 | hg log -vC -r4 | |
43 | hg log -vC -r4 --style=default |
|
43 | hg log -vC -r4 --style=default | |
44 |
|
44 | |||
45 | echo % log copies, non-linear manifest |
|
45 | echo % log copies, non-linear manifest | |
46 | hg up -C 3 |
|
46 | hg up -C 3 | |
47 | hg mv dir/b e |
|
47 | hg mv dir/b e | |
48 | echo foo > foo |
|
48 | echo foo > foo | |
49 | hg ci -Ame2 -d '6 0' |
|
49 | hg ci -Ame2 -d '6 0' | |
50 | hg log -v --template '{rev} {file_copies}\n' -r 5 |
|
50 | hg log -v --template '{rev} {file_copies}\n' -r 5 | |
51 |
|
51 | |||
52 | echo % log copies, execute bit set |
|
52 | echo % log copies, execute bit set | |
53 | chmod +x e |
|
53 | chmod +x e | |
54 | hg ci -me3 -d '7 0' |
|
54 | hg ci -me3 -d '7 0' | |
55 | hg log -v --template '{rev} {file_copies}\n' -r 6 |
|
55 | hg log -v --template '{rev} {file_copies}\n' -r 6 | |
56 |
|
56 | |||
57 | echo '% log -p d' |
|
57 | echo '% log -p d' | |
58 | hg log -pv d |
|
58 | hg log -pv d | |
59 |
|
59 | |||
60 | # log --follow tests |
|
60 | # log --follow tests | |
61 | hg init ../follow |
|
61 | hg init ../follow | |
62 | cd ../follow |
|
62 | cd ../follow | |
63 |
|
63 | |||
64 | echo base > base |
|
64 | echo base > base | |
65 | hg ci -Ambase -d '1 0' |
|
65 | hg ci -Ambase -d '1 0' | |
66 |
|
66 | |||
67 | echo r1 >> base |
|
67 | echo r1 >> base | |
68 | hg ci -Amr1 -d '1 0' |
|
68 | hg ci -Amr1 -d '1 0' | |
69 | echo r2 >> base |
|
69 | echo r2 >> base | |
70 | hg ci -Amr2 -d '1 0' |
|
70 | hg ci -Amr2 -d '1 0' | |
71 |
|
71 | |||
72 | hg up -C 1 |
|
72 | hg up -C 1 | |
73 | echo b1 > b1 |
|
73 | echo b1 > b1 | |
74 | hg ci -Amb1 -d '1 0' |
|
74 | hg ci -Amb1 -d '1 0' | |
75 |
|
75 | |||
76 | echo % log -f |
|
76 | echo % log -f | |
77 | hg log -f |
|
77 | hg log -f | |
78 |
|
78 | |||
79 | hg up -C 0 |
|
79 | hg up -C 0 | |
80 | echo b2 > b2 |
|
80 | echo b2 > b2 | |
81 | hg ci -Amb2 -d '1 0' |
|
81 | hg ci -Amb2 -d '1 0' | |
82 |
|
82 | |||
83 | echo % log -f -r 1:tip |
|
83 | echo % log -f -r 1:tip | |
84 | hg log -f -r 1:tip |
|
84 | hg log -f -r 1:tip | |
85 |
|
85 | |||
86 | hg up -C 3 |
|
86 | hg up -C 3 | |
87 | hg merge tip |
|
87 | hg merge tip | |
88 |
|
88 | |||
89 | echo % log -r . with two parents |
|
89 | echo % log -r . with two parents | |
90 | hg log -r . |
|
90 | hg log -r . | |
91 |
|
91 | |||
92 | hg ci -mm12 -d '1 0' |
|
92 | hg ci -mm12 -d '1 0' | |
93 |
|
93 | |||
94 | echo % log -r . with one parent |
|
94 | echo % log -r . with one parent | |
95 | hg log -r . |
|
95 | hg log -r . | |
96 |
|
96 | |||
97 | echo postm >> b1 |
|
97 | echo postm >> b1 | |
98 | hg ci -Amb1.1 -d'1 0' |
|
98 | hg ci -Amb1.1 -d'1 0' | |
99 |
|
99 | |||
100 | echo % log --follow-first |
|
100 | echo % log --follow-first | |
101 | hg log --follow-first |
|
101 | hg log --follow-first | |
102 |
|
102 | |||
103 | echo % log -P 2 |
|
103 | echo % log -P 2 | |
104 | hg log -P 2 |
|
104 | hg log -P 2 | |
105 |
|
105 | |||
106 | echo '% log -r tip -p --git' |
|
106 | echo '% log -r tip -p --git' | |
107 | hg log -r tip -p --git |
|
107 | hg log -r tip -p --git | |
108 |
|
108 | |||
109 | echo '% log -r ""' |
|
109 | echo '% log -r ""' | |
110 | hg log -r '' |
|
110 | hg log -r '' | |
111 |
|
111 | |||
112 | echo '% log -r <some unknown node id>' |
|
112 | echo '% log -r <some unknown node id>' | |
113 | hg log -r 1000000000000000000000000000000000000000 |
|
113 | hg log -r 1000000000000000000000000000000000000000 | |
114 |
|
114 | |||
115 | echo '% log -k r1' |
|
115 | echo '% log -k r1' | |
116 | hg log -k r1 |
|
116 | hg log -k r1 | |
117 |
|
117 | |||
118 | echo '% log -d -1' |
|
118 | echo '% log -d -1' | |
119 | hg log -d -1 |
|
119 | hg log -d -1 | |
120 |
|
120 | |||
121 | echo '% log -p -l2 --color=always' |
|
121 | echo '% log -p -l2 --color=always' | |
122 |
hg --config extensions.color= |
|
122 | hg --config extensions.color= --config color.mode=ansi \ | |
|
123 | log -p -l2 --color=always | |||
123 |
|
124 | |||
124 | echo '% log -r tip --stat' |
|
125 | echo '% log -r tip --stat' | |
125 | hg log -r tip --stat |
|
126 | hg log -r tip --stat | |
126 |
|
127 | |||
127 | cd .. |
|
128 | cd .. | |
128 |
|
129 | |||
129 | hg init usertest |
|
130 | hg init usertest | |
130 | cd usertest |
|
131 | cd usertest | |
131 |
|
132 | |||
132 | echo a > a |
|
133 | echo a > a | |
133 | hg ci -A -m "a" -u "User One <user1@example.org>" |
|
134 | hg ci -A -m "a" -u "User One <user1@example.org>" | |
134 | echo b > b |
|
135 | echo b > b | |
135 | hg ci -A -m "b" -u "User Two <user2@example.org>" |
|
136 | hg ci -A -m "b" -u "User Two <user2@example.org>" | |
136 |
|
137 | |||
137 | hg log -u "User One <user1@example.org>" |
|
138 | hg log -u "User One <user1@example.org>" | |
138 | hg log -u "user1" -u "user2" |
|
139 | hg log -u "user1" -u "user2" | |
139 | hg log -u "user3" |
|
140 | hg log -u "user3" | |
140 |
|
141 | |||
141 | cd .. |
|
142 | cd .. | |
142 |
|
143 | |||
143 | hg init branches |
|
144 | hg init branches | |
144 | cd branches |
|
145 | cd branches | |
145 |
|
146 | |||
146 | echo a > a |
|
147 | echo a > a | |
147 | hg ci -A -m "commit on default" |
|
148 | hg ci -A -m "commit on default" | |
148 | hg branch test |
|
149 | hg branch test | |
149 | echo b > b |
|
150 | echo b > b | |
150 | hg ci -A -m "commit on test" |
|
151 | hg ci -A -m "commit on test" | |
151 |
|
152 | |||
152 | hg up default |
|
153 | hg up default | |
153 | echo c > c |
|
154 | echo c > c | |
154 | hg ci -A -m "commit on default" |
|
155 | hg ci -A -m "commit on default" | |
155 | hg up test |
|
156 | hg up test | |
156 | echo c > c |
|
157 | echo c > c | |
157 | hg ci -A -m "commit on test" |
|
158 | hg ci -A -m "commit on test" | |
158 |
|
159 | |||
159 | echo '% log -b default' |
|
160 | echo '% log -b default' | |
160 | hg log -b default |
|
161 | hg log -b default | |
161 |
|
162 | |||
162 | echo '% log -b test' |
|
163 | echo '% log -b test' | |
163 | hg log -b test |
|
164 | hg log -b test | |
164 |
|
165 | |||
165 | echo '% log -b dummy' |
|
166 | echo '% log -b dummy' | |
166 | hg log -b dummy |
|
167 | hg log -b dummy | |
167 |
|
168 | |||
168 | echo '% log -b .' |
|
169 | echo '% log -b .' | |
169 | hg log -b . |
|
170 | hg log -b . | |
170 |
|
171 | |||
171 | echo '% log -b default -b test' |
|
172 | echo '% log -b default -b test' | |
172 | hg log -b default -b test |
|
173 | hg log -b default -b test | |
173 |
|
174 | |||
174 | echo '% log -b default -b .' |
|
175 | echo '% log -b default -b .' | |
175 | hg log -b default -b . |
|
176 | hg log -b default -b . | |
176 |
|
177 | |||
177 | echo '% log -b . -b test' |
|
178 | echo '% log -b . -b test' | |
178 | hg log -b . -b test |
|
179 | hg log -b . -b test | |
179 |
|
180 | |||
180 | echo '% log -b 2' |
|
181 | echo '% log -b 2' | |
181 | hg log -b 2 |
|
182 | hg log -b 2 | |
182 |
|
183 | |||
183 | exit 0 |
|
184 | exit 0 |
@@ -1,167 +1,168 | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | echo "[extensions]" >> $HGRCPATH |
|
3 | echo "[extensions]" >> $HGRCPATH | |
4 | echo "mq=" >> $HGRCPATH |
|
4 | echo "mq=" >> $HGRCPATH | |
5 |
|
5 | |||
6 | hg init |
|
6 | hg init | |
7 | hg qinit |
|
7 | hg qinit | |
8 |
|
8 | |||
9 | echo x > x |
|
9 | echo x > x | |
10 | hg ci -Ama |
|
10 | hg ci -Ama | |
11 |
|
11 | |||
12 | hg qnew a.patch |
|
12 | hg qnew a.patch | |
13 | echo a > a |
|
13 | echo a > a | |
14 | hg add a |
|
14 | hg add a | |
15 | hg qrefresh |
|
15 | hg qrefresh | |
16 |
|
16 | |||
17 | hg qnew b.patch |
|
17 | hg qnew b.patch | |
18 | echo b > b |
|
18 | echo b > b | |
19 | hg add b |
|
19 | hg add b | |
20 | hg qrefresh |
|
20 | hg qrefresh | |
21 |
|
21 | |||
22 | hg qnew c.patch |
|
22 | hg qnew c.patch | |
23 | echo c > c |
|
23 | echo c > c | |
24 | hg add c |
|
24 | hg add c | |
25 | hg qrefresh |
|
25 | hg qrefresh | |
26 |
|
26 | |||
27 | hg qpop -a |
|
27 | hg qpop -a | |
28 |
|
28 | |||
29 | echo % should fail |
|
29 | echo % should fail | |
30 | hg qguard does-not-exist.patch +bleh |
|
30 | hg qguard does-not-exist.patch +bleh | |
31 |
|
31 | |||
32 | echo % should fail |
|
32 | echo % should fail | |
33 | hg qguard +fail |
|
33 | hg qguard +fail | |
34 |
|
34 | |||
35 | hg qpush |
|
35 | hg qpush | |
36 | echo % should guard a.patch |
|
36 | echo % should guard a.patch | |
37 | hg qguard +a |
|
37 | hg qguard +a | |
38 | echo % should print +a |
|
38 | echo % should print +a | |
39 | hg qguard |
|
39 | hg qguard | |
40 | hg qpop |
|
40 | hg qpop | |
41 |
|
41 | |||
42 | echo % should fail |
|
42 | echo % should fail | |
43 | hg qpush a.patch |
|
43 | hg qpush a.patch | |
44 |
|
44 | |||
45 | hg qguard a.patch |
|
45 | hg qguard a.patch | |
46 | echo % should push b.patch |
|
46 | echo % should push b.patch | |
47 | hg qpush |
|
47 | hg qpush | |
48 |
|
48 | |||
49 | hg qpop |
|
49 | hg qpop | |
50 | echo % test selection of an empty guard |
|
50 | echo % test selection of an empty guard | |
51 | hg qselect "" |
|
51 | hg qselect "" | |
52 | hg qselect a |
|
52 | hg qselect a | |
53 | echo % should push a.patch |
|
53 | echo % should push a.patch | |
54 | hg qpush |
|
54 | hg qpush | |
55 |
|
55 | |||
56 | hg qguard -- c.patch -a |
|
56 | hg qguard -- c.patch -a | |
57 | echo % should print -a |
|
57 | echo % should print -a | |
58 | hg qguard c.patch |
|
58 | hg qguard c.patch | |
59 |
|
59 | |||
60 | echo % should skip c.patch |
|
60 | echo % should skip c.patch | |
61 | hg qpush -a |
|
61 | hg qpush -a | |
62 | echo % should display b.patch |
|
62 | echo % should display b.patch | |
63 | hg qtop |
|
63 | hg qtop | |
64 |
|
64 | |||
65 | hg qguard -n c.patch |
|
65 | hg qguard -n c.patch | |
66 | echo % should push c.patch |
|
66 | echo % should push c.patch | |
67 | hg qpush -a |
|
67 | hg qpush -a | |
68 |
|
68 | |||
69 | hg qpop -a |
|
69 | hg qpop -a | |
70 | hg qselect -n |
|
70 | hg qselect -n | |
71 | echo % should push all |
|
71 | echo % should push all | |
72 | hg qpush -a |
|
72 | hg qpush -a | |
73 |
|
73 | |||
74 | hg qpop -a |
|
74 | hg qpop -a | |
75 | hg qguard a.patch +1 |
|
75 | hg qguard a.patch +1 | |
76 | hg qguard b.patch +2 |
|
76 | hg qguard b.patch +2 | |
77 | hg qselect 1 |
|
77 | hg qselect 1 | |
78 | echo % should push a.patch, not b.patch |
|
78 | echo % should push a.patch, not b.patch | |
79 | hg qpush |
|
79 | hg qpush | |
80 | hg qpush |
|
80 | hg qpush | |
81 | hg qpop -a |
|
81 | hg qpop -a | |
82 |
|
82 | |||
83 | hg qselect 2 |
|
83 | hg qselect 2 | |
84 | echo % should push b.patch |
|
84 | echo % should push b.patch | |
85 | hg qpush |
|
85 | hg qpush | |
86 | hg qpush -a |
|
86 | hg qpush -a | |
87 | # Used to be an issue with holes in the patch sequence |
|
87 | # Used to be an issue with holes in the patch sequence | |
88 | # So, put one hole on the base and ask for topmost patch. |
|
88 | # So, put one hole on the base and ask for topmost patch. | |
89 | hg qtop |
|
89 | hg qtop | |
90 | hg qpop -a |
|
90 | hg qpop -a | |
91 |
|
91 | |||
92 | hg qselect 1 2 |
|
92 | hg qselect 1 2 | |
93 | echo % should push a.patch, b.patch |
|
93 | echo % should push a.patch, b.patch | |
94 | hg qpush |
|
94 | hg qpush | |
95 | hg qpush |
|
95 | hg qpush | |
96 | hg qpop -a |
|
96 | hg qpop -a | |
97 |
|
97 | |||
98 | hg qguard -- a.patch +1 +2 -3 |
|
98 | hg qguard -- a.patch +1 +2 -3 | |
99 | hg qselect 1 2 3 |
|
99 | hg qselect 1 2 3 | |
100 | echo % list patches and guards |
|
100 | echo % list patches and guards | |
101 | hg qguard -l |
|
101 | hg qguard -l | |
102 | echo % list patches and guards with color |
|
102 | echo % list patches and guards with color | |
103 |
hg --config extensions.color= qguard - |
|
103 | hg --config extensions.color= qguard --config color.mode=ansi \ | |
|
104 | -l --color=always | |||
104 | echo % list series |
|
105 | echo % list series | |
105 | hg qseries -v |
|
106 | hg qseries -v | |
106 | echo % list guards |
|
107 | echo % list guards | |
107 | hg qselect |
|
108 | hg qselect | |
108 | echo % should push b.patch |
|
109 | echo % should push b.patch | |
109 | hg qpush |
|
110 | hg qpush | |
110 |
|
111 | |||
111 | hg qpush -a |
|
112 | hg qpush -a | |
112 | hg qselect -n --reapply |
|
113 | hg qselect -n --reapply | |
113 | echo % guards in series file: +1 +2 -3 |
|
114 | echo % guards in series file: +1 +2 -3 | |
114 | hg qselect -s |
|
115 | hg qselect -s | |
115 | echo % should show c.patch |
|
116 | echo % should show c.patch | |
116 | hg qapplied |
|
117 | hg qapplied | |
117 |
|
118 | |||
118 | hg qrename a.patch new.patch |
|
119 | hg qrename a.patch new.patch | |
119 | echo % should show : |
|
120 | echo % should show : | |
120 | echo % new.patch: +1 +2 -3 |
|
121 | echo % new.patch: +1 +2 -3 | |
121 | echo % b.patch: +2 |
|
122 | echo % b.patch: +2 | |
122 | echo % c.patch: unguarded |
|
123 | echo % c.patch: unguarded | |
123 | hg qguard -l |
|
124 | hg qguard -l | |
124 |
|
125 | |||
125 | hg qnew d.patch |
|
126 | hg qnew d.patch | |
126 | hg qpop |
|
127 | hg qpop | |
127 | echo % should show new.patch and b.patch as Guarded, c.patch as Applied |
|
128 | echo % should show new.patch and b.patch as Guarded, c.patch as Applied | |
128 | echo % and d.patch as Unapplied |
|
129 | echo % and d.patch as Unapplied | |
129 | hg qseries -v |
|
130 | hg qseries -v | |
130 | echo % qseries again, but with color |
|
131 | echo % qseries again, but with color | |
131 | hg --config extensions.color= qseries -v --color=always |
|
132 | hg --config extensions.color= qseries -v --color=always | |
132 |
|
133 | |||
133 | hg qguard d.patch +2 |
|
134 | hg qguard d.patch +2 | |
134 | echo % new.patch, b.patch: Guarded. c.patch: Applied. d.patch: Guarded. |
|
135 | echo % new.patch, b.patch: Guarded. c.patch: Applied. d.patch: Guarded. | |
135 | hg qseries -v |
|
136 | hg qseries -v | |
136 |
|
137 | |||
137 | qappunappv() |
|
138 | qappunappv() | |
138 | { |
|
139 | { | |
139 | for command in qapplied "qapplied -v" qunapplied "qunapplied -v"; do |
|
140 | for command in qapplied "qapplied -v" qunapplied "qunapplied -v"; do | |
140 | echo % hg $command |
|
141 | echo % hg $command | |
141 | hg $command |
|
142 | hg $command | |
142 | done |
|
143 | done | |
143 | } |
|
144 | } | |
144 |
|
145 | |||
145 | hg qpop -a |
|
146 | hg qpop -a | |
146 | hg qguard -l |
|
147 | hg qguard -l | |
147 | qappunappv |
|
148 | qappunappv | |
148 | hg qselect 1 |
|
149 | hg qselect 1 | |
149 | qappunappv |
|
150 | qappunappv | |
150 | hg qpush -a |
|
151 | hg qpush -a | |
151 | qappunappv |
|
152 | qappunappv | |
152 | hg qselect 2 |
|
153 | hg qselect 2 | |
153 | qappunappv |
|
154 | qappunappv | |
154 |
|
155 | |||
155 | for patch in `hg qseries`; do |
|
156 | for patch in `hg qseries`; do | |
156 | echo % hg qapplied $patch |
|
157 | echo % hg qapplied $patch | |
157 | hg qapplied $patch |
|
158 | hg qapplied $patch | |
158 | echo % hg qunapplied $patch |
|
159 | echo % hg qunapplied $patch | |
159 | hg qunapplied $patch |
|
160 | hg qunapplied $patch | |
160 | done |
|
161 | done | |
161 |
|
162 | |||
162 | echo % hg qseries -m: only b.patch should be shown |
|
163 | echo % hg qseries -m: only b.patch should be shown | |
163 | echo the guards file was not ignored in the past |
|
164 | echo the guards file was not ignored in the past | |
164 | hg qdelete -k b.patch |
|
165 | hg qdelete -k b.patch | |
165 | hg qseries -m |
|
166 | hg qseries -m | |
166 | echo % hg qseries -m with color |
|
167 | echo % hg qseries -m with color | |
167 | hg --config extensions.color= qseries -m --color=always |
|
168 | hg --config extensions.color= qseries -m --color=always |
@@ -1,120 +1,122 | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | echo "[extensions]" >> $HGRCPATH |
|
3 | echo "[extensions]" >> $HGRCPATH | |
4 | echo "color=" >> $HGRCPATH |
|
4 | echo "color=" >> $HGRCPATH | |
|
5 | echo "[color]" >> $HGRCPATH | |||
|
6 | echo "mode=ansi" >> $HGRCPATH | |||
5 |
|
7 | |||
6 | hg init repo1 |
|
8 | hg init repo1 | |
7 | cd repo1 |
|
9 | cd repo1 | |
8 | mkdir a b a/1 b/1 b/2 |
|
10 | mkdir a b a/1 b/1 b/2 | |
9 | touch in_root a/in_a b/in_b a/1/in_a_1 b/1/in_b_1 b/2/in_b_2 |
|
11 | touch in_root a/in_a b/in_b a/1/in_a_1 b/1/in_b_1 b/2/in_b_2 | |
10 | echo "hg status in repo root:" |
|
12 | echo "hg status in repo root:" | |
11 | hg status --color=always |
|
13 | hg status --color=always | |
12 | echo "hg status . in repo root:" |
|
14 | echo "hg status . in repo root:" | |
13 | hg status --color=always . |
|
15 | hg status --color=always . | |
14 | for dir in a b a/1 b/1 b/2; do |
|
16 | for dir in a b a/1 b/1 b/2; do | |
15 | echo "hg status in $dir:" |
|
17 | echo "hg status in $dir:" | |
16 | hg status --color=always --cwd "$dir" |
|
18 | hg status --color=always --cwd "$dir" | |
17 | echo "hg status . in $dir:" |
|
19 | echo "hg status . in $dir:" | |
18 | hg status --color=always --cwd "$dir" . |
|
20 | hg status --color=always --cwd "$dir" . | |
19 | echo "hg status .. in $dir:" |
|
21 | echo "hg status .. in $dir:" | |
20 | hg status --color=always --cwd "$dir" .. |
|
22 | hg status --color=always --cwd "$dir" .. | |
21 | done |
|
23 | done | |
22 | cd .. |
|
24 | cd .. | |
23 |
|
25 | |||
24 | hg init repo2 |
|
26 | hg init repo2 | |
25 | cd repo2 |
|
27 | cd repo2 | |
26 | touch modified removed deleted ignored |
|
28 | touch modified removed deleted ignored | |
27 | echo "^ignored$" > .hgignore |
|
29 | echo "^ignored$" > .hgignore | |
28 | hg ci -A -m 'initial checkin' -d "1000000 0" |
|
30 | hg ci -A -m 'initial checkin' -d "1000000 0" | |
29 | touch modified added unknown ignored |
|
31 | touch modified added unknown ignored | |
30 | hg add added |
|
32 | hg add added | |
31 | hg remove removed |
|
33 | hg remove removed | |
32 | rm deleted |
|
34 | rm deleted | |
33 | echo "hg status:" |
|
35 | echo "hg status:" | |
34 | hg status --color=always |
|
36 | hg status --color=always | |
35 | echo "hg status modified added removed deleted unknown never-existed ignored:" |
|
37 | echo "hg status modified added removed deleted unknown never-existed ignored:" | |
36 | hg status --color=always modified added removed deleted unknown never-existed ignored |
|
38 | hg status --color=always modified added removed deleted unknown never-existed ignored | |
37 | hg copy modified copied |
|
39 | hg copy modified copied | |
38 | echo "hg status -C:" |
|
40 | echo "hg status -C:" | |
39 | hg status --color=always -C |
|
41 | hg status --color=always -C | |
40 | echo "hg status -A:" |
|
42 | echo "hg status -A:" | |
41 | hg status --color=always -A |
|
43 | hg status --color=always -A | |
42 | echo "^ignoreddir$" > .hgignore |
|
44 | echo "^ignoreddir$" > .hgignore | |
43 | mkdir ignoreddir |
|
45 | mkdir ignoreddir | |
44 | touch ignoreddir/file |
|
46 | touch ignoreddir/file | |
45 | echo "hg status ignoreddir/file:" |
|
47 | echo "hg status ignoreddir/file:" | |
46 | hg status --color=always ignoreddir/file |
|
48 | hg status --color=always ignoreddir/file | |
47 | echo "hg status -i ignoreddir/file:" |
|
49 | echo "hg status -i ignoreddir/file:" | |
48 | hg status --color=always -i ignoreddir/file |
|
50 | hg status --color=always -i ignoreddir/file | |
49 | cd .. |
|
51 | cd .. | |
50 |
|
52 | |||
51 | # check 'status -q' and some combinations |
|
53 | # check 'status -q' and some combinations | |
52 | hg init repo3 |
|
54 | hg init repo3 | |
53 | cd repo3 |
|
55 | cd repo3 | |
54 | touch modified removed deleted ignored |
|
56 | touch modified removed deleted ignored | |
55 | echo "^ignored$" > .hgignore |
|
57 | echo "^ignored$" > .hgignore | |
56 | hg commit -A -m 'initial checkin' |
|
58 | hg commit -A -m 'initial checkin' | |
57 | touch added unknown ignored |
|
59 | touch added unknown ignored | |
58 | hg add added |
|
60 | hg add added | |
59 | echo "test" >> modified |
|
61 | echo "test" >> modified | |
60 | hg remove removed |
|
62 | hg remove removed | |
61 | rm deleted |
|
63 | rm deleted | |
62 | hg copy modified copied |
|
64 | hg copy modified copied | |
63 |
|
65 | |||
64 | echo "% test unknown color" |
|
66 | echo "% test unknown color" | |
65 | hg --config color.status.modified=periwinkle status --color=always |
|
67 | hg --config color.status.modified=periwinkle status --color=always | |
66 |
|
68 | |||
67 | # Run status with 2 different flags. |
|
69 | # Run status with 2 different flags. | |
68 | # Check if result is the same or different. |
|
70 | # Check if result is the same or different. | |
69 | # If result is not as expected, raise error |
|
71 | # If result is not as expected, raise error | |
70 | assert() { |
|
72 | assert() { | |
71 | hg status --color=always $1 > ../a |
|
73 | hg status --color=always $1 > ../a | |
72 | hg status --color=always $2 > ../b |
|
74 | hg status --color=always $2 > ../b | |
73 | out=`diff ../a ../b` |
|
75 | out=`diff ../a ../b` | |
74 | if [ $? -ne 0 ]; then |
|
76 | if [ $? -ne 0 ]; then | |
75 | out=1 |
|
77 | out=1 | |
76 | else |
|
78 | else | |
77 | out=0 |
|
79 | out=0 | |
78 | fi |
|
80 | fi | |
79 | if [ $3 -eq 0 ]; then |
|
81 | if [ $3 -eq 0 ]; then | |
80 | df="same" |
|
82 | df="same" | |
81 | else |
|
83 | else | |
82 | df="different" |
|
84 | df="different" | |
83 | fi |
|
85 | fi | |
84 | if [ $out -ne $3 ]; then |
|
86 | if [ $out -ne $3 ]; then | |
85 | echo "Error on $1 and $2, should be $df." |
|
87 | echo "Error on $1 and $2, should be $df." | |
86 | fi |
|
88 | fi | |
87 | } |
|
89 | } | |
88 |
|
90 | |||
89 | # assert flag1 flag2 [0-same | 1-different] |
|
91 | # assert flag1 flag2 [0-same | 1-different] | |
90 | assert "-q" "-mard" 0 |
|
92 | assert "-q" "-mard" 0 | |
91 | assert "-A" "-marduicC" 0 |
|
93 | assert "-A" "-marduicC" 0 | |
92 | assert "-qA" "-mardcC" 0 |
|
94 | assert "-qA" "-mardcC" 0 | |
93 | assert "-qAui" "-A" 0 |
|
95 | assert "-qAui" "-A" 0 | |
94 | assert "-qAu" "-marducC" 0 |
|
96 | assert "-qAu" "-marducC" 0 | |
95 | assert "-qAi" "-mardicC" 0 |
|
97 | assert "-qAi" "-mardicC" 0 | |
96 | assert "-qu" "-u" 0 |
|
98 | assert "-qu" "-u" 0 | |
97 | assert "-q" "-u" 1 |
|
99 | assert "-q" "-u" 1 | |
98 | assert "-m" "-a" 1 |
|
100 | assert "-m" "-a" 1 | |
99 | assert "-r" "-d" 1 |
|
101 | assert "-r" "-d" 1 | |
100 |
|
102 | |||
101 | cd .. |
|
103 | cd .. | |
102 |
|
104 | |||
103 | # test 'resolve -l' |
|
105 | # test 'resolve -l' | |
104 | hg init repo4 |
|
106 | hg init repo4 | |
105 | cd repo4 |
|
107 | cd repo4 | |
106 | echo "file a" > a |
|
108 | echo "file a" > a | |
107 | echo "file b" > b |
|
109 | echo "file b" > b | |
108 | hg add a b |
|
110 | hg add a b | |
109 | hg commit -m "initial" |
|
111 | hg commit -m "initial" | |
110 | echo "file a change 1" > a |
|
112 | echo "file a change 1" > a | |
111 | echo "file b change 1" > b |
|
113 | echo "file b change 1" > b | |
112 | hg commit -m "head 1" |
|
114 | hg commit -m "head 1" | |
113 | hg update 0 |
|
115 | hg update 0 | |
114 | echo "file a change 2" > a |
|
116 | echo "file a change 2" > a | |
115 | echo "file b change 2" > b |
|
117 | echo "file b change 2" > b | |
116 | hg commit -m "head 2" |
|
118 | hg commit -m "head 2" | |
117 | hg merge |
|
119 | hg merge | |
118 | hg resolve -m b |
|
120 | hg resolve -m b | |
119 | echo "hg resolve with one unresolved, one resolved:" |
|
121 | echo "hg resolve with one unresolved, one resolved:" | |
120 | hg resolve --color=always -l |
|
122 | hg resolve --color=always -l |
General Comments 0
You need to be logged in to leave comments.
Login now