Show More
@@ -1,47 +1,47 b'' | |||||
1 | $ hg init rep |
|
1 | $ hg init rep | |
2 | $ cd rep |
|
2 | $ cd rep | |
3 | $ mkdir dir |
|
3 | $ mkdir dir | |
4 | $ touch foo dir/bar |
|
4 | $ touch foo dir/bar | |
5 | $ hg -v addremove |
|
5 | $ hg -v addremove | |
6 | adding dir/bar |
|
6 | adding dir/bar | |
7 | adding foo |
|
7 | adding foo | |
8 |
$ hg -v commit -m "add 1" |
|
8 | $ hg -v commit -m "add 1" | |
9 | dir/bar |
|
9 | dir/bar | |
10 | foo |
|
10 | foo | |
11 |
committed changeset 0: |
|
11 | committed changeset 0:6f7f953567a2 | |
12 | $ cd dir/ |
|
12 | $ cd dir/ | |
13 | $ touch ../foo_2 bar_2 |
|
13 | $ touch ../foo_2 bar_2 | |
14 | $ hg -v addremove |
|
14 | $ hg -v addremove | |
15 | adding dir/bar_2 |
|
15 | adding dir/bar_2 | |
16 | adding foo_2 |
|
16 | adding foo_2 | |
17 |
$ hg -v commit -m "add 2" |
|
17 | $ hg -v commit -m "add 2" | |
18 | dir/bar_2 |
|
18 | dir/bar_2 | |
19 | foo_2 |
|
19 | foo_2 | |
20 |
committed changeset 1: |
|
20 | committed changeset 1:e65414bf35c5 | |
21 |
|
21 | |||
22 | $ cd .. |
|
22 | $ cd .. | |
23 | $ hg init sim |
|
23 | $ hg init sim | |
24 | $ cd sim |
|
24 | $ cd sim | |
25 | $ echo a > a |
|
25 | $ echo a > a | |
26 | $ echo a >> a |
|
26 | $ echo a >> a | |
27 | $ echo a >> a |
|
27 | $ echo a >> a | |
28 | $ echo c > c |
|
28 | $ echo c > c | |
29 | $ hg commit -Ama |
|
29 | $ hg commit -Ama | |
30 | adding a |
|
30 | adding a | |
31 | adding c |
|
31 | adding c | |
32 | $ mv a b |
|
32 | $ mv a b | |
33 | $ rm c |
|
33 | $ rm c | |
34 | $ echo d > d |
|
34 | $ echo d > d | |
35 | $ hg addremove -n -s 50 # issue 1696 |
|
35 | $ hg addremove -n -s 50 # issue 1696 | |
36 | removing a |
|
36 | removing a | |
37 | adding b |
|
37 | adding b | |
38 | removing c |
|
38 | removing c | |
39 | adding d |
|
39 | adding d | |
40 | recording removal of a as rename to b (100% similar) |
|
40 | recording removal of a as rename to b (100% similar) | |
41 | $ hg addremove -s 50 |
|
41 | $ hg addremove -s 50 | |
42 | removing a |
|
42 | removing a | |
43 | adding b |
|
43 | adding b | |
44 | removing c |
|
44 | removing c | |
45 | adding d |
|
45 | adding d | |
46 | recording removal of a as rename to b (100% similar) |
|
46 | recording removal of a as rename to b (100% similar) | |
47 | $ hg commit -mb |
|
47 | $ hg commit -mb |
@@ -1,16 +1,16 b'' | |||||
1 | $ hg init |
|
1 | $ hg init | |
2 | $ echo This is file a1 > a |
|
2 | $ echo This is file a1 > a | |
3 | $ hg add a |
|
3 | $ hg add a | |
4 |
$ hg commit -m "commit #0" |
|
4 | $ hg commit -m "commit #0" | |
5 | $ ls |
|
5 | $ ls | |
6 | a |
|
6 | a | |
7 | $ echo This is file b1 > b |
|
7 | $ echo This is file b1 > b | |
8 | $ hg add b |
|
8 | $ hg add b | |
9 |
$ hg commit -m "commit #1" |
|
9 | $ hg commit -m "commit #1" | |
10 | $ hg co 0 |
|
10 | $ hg co 0 | |
11 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
11 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
12 |
|
12 | |||
13 | B should disappear |
|
13 | B should disappear | |
14 |
|
14 | |||
15 | $ ls |
|
15 | $ ls | |
16 | a |
|
16 | a |
@@ -1,40 +1,40 b'' | |||||
1 | Create a repository: |
|
1 | Create a repository: | |
2 |
|
2 | |||
3 | $ mkdir t |
|
3 | $ mkdir t | |
4 | $ cd t |
|
4 | $ cd t | |
5 | $ hg init |
|
5 | $ hg init | |
6 |
|
6 | |||
7 | Make a changeset: |
|
7 | Make a changeset: | |
8 |
|
8 | |||
9 | $ echo a > a |
|
9 | $ echo a > a | |
10 | $ hg add a |
|
10 | $ hg add a | |
11 |
$ hg commit -m test |
|
11 | $ hg commit -m test | |
12 |
|
12 | |||
13 | This command is ancient: |
|
13 | This command is ancient: | |
14 |
|
14 | |||
15 | $ hg history |
|
15 | $ hg history | |
16 |
changeset: 0: |
|
16 | changeset: 0:acb14030fe0a | |
17 | tag: tip |
|
17 | tag: tip | |
18 | user: test |
|
18 | user: test | |
19 |
date: |
|
19 | date: Thu Jan 01 00:00:00 1970 +0000 | |
20 | summary: test |
|
20 | summary: test | |
21 |
|
21 | |||
22 |
|
22 | |||
23 | Poke around at hashes: |
|
23 | Poke around at hashes: | |
24 |
|
24 | |||
25 | $ hg manifest --debug |
|
25 | $ hg manifest --debug | |
26 | b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 644 a |
|
26 | b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 644 a | |
27 |
|
27 | |||
28 | $ hg cat a |
|
28 | $ hg cat a | |
29 | a |
|
29 | a | |
30 |
|
30 | |||
31 | Verify should succeed: |
|
31 | Verify should succeed: | |
32 |
|
32 | |||
33 | $ hg verify |
|
33 | $ hg verify | |
34 | checking changesets |
|
34 | checking changesets | |
35 | checking manifests |
|
35 | checking manifests | |
36 | crosschecking files in changesets and manifests |
|
36 | crosschecking files in changesets and manifests | |
37 | checking files |
|
37 | checking files | |
38 | 1 files, 1 changesets, 1 total revisions |
|
38 | 1 files, 1 changesets, 1 total revisions | |
39 |
|
39 | |||
40 | At the end... |
|
40 | At the end... |
@@ -1,60 +1,60 b'' | |||||
1 | $ echo "[extensions]" >> $HGRCPATH |
|
1 | $ echo "[extensions]" >> $HGRCPATH | |
2 | $ echo "bookmarks=" >> $HGRCPATH |
|
2 | $ echo "bookmarks=" >> $HGRCPATH | |
3 | $ echo "mq=" >> $HGRCPATH |
|
3 | $ echo "mq=" >> $HGRCPATH | |
4 |
|
4 | |||
5 | $ hg init |
|
5 | $ hg init | |
6 |
|
6 | |||
7 | $ echo qqq>qqq.txt |
|
7 | $ echo qqq>qqq.txt | |
8 |
|
8 | |||
9 | add file |
|
9 | add file | |
10 |
|
10 | |||
11 | $ hg add |
|
11 | $ hg add | |
12 | adding qqq.txt |
|
12 | adding qqq.txt | |
13 |
|
13 | |||
14 | commit first revision |
|
14 | commit first revision | |
15 |
|
15 | |||
16 |
$ hg ci -m 1 |
|
16 | $ hg ci -m 1 | |
17 |
|
17 | |||
18 | set bookmark |
|
18 | set bookmark | |
19 |
|
19 | |||
20 | $ hg book test |
|
20 | $ hg book test | |
21 |
|
21 | |||
22 | $ echo www>>qqq.txt |
|
22 | $ echo www>>qqq.txt | |
23 |
|
23 | |||
24 | commit second revision |
|
24 | commit second revision | |
25 |
|
25 | |||
26 |
$ hg ci -m 2 |
|
26 | $ hg ci -m 2 | |
27 |
|
27 | |||
28 | set bookmark |
|
28 | set bookmark | |
29 |
|
29 | |||
30 | $ hg book test2 |
|
30 | $ hg book test2 | |
31 |
|
31 | |||
32 | update to -2 |
|
32 | update to -2 | |
33 |
|
33 | |||
34 | $ hg update -r -2 |
|
34 | $ hg update -r -2 | |
35 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
35 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
36 |
|
36 | |||
37 | $ echo eee>>qqq.txt |
|
37 | $ echo eee>>qqq.txt | |
38 |
|
38 | |||
39 | commit new head |
|
39 | commit new head | |
40 |
|
40 | |||
41 |
$ hg ci -m 3 |
|
41 | $ hg ci -m 3 | |
42 | created new head |
|
42 | created new head | |
43 |
|
43 | |||
44 | bookmarks updated? |
|
44 | bookmarks updated? | |
45 |
|
45 | |||
46 | $ hg book |
|
46 | $ hg book | |
47 |
test 1: |
|
47 | test 1:25e1ee7a0081 | |
48 |
test2 1: |
|
48 | test2 1:25e1ee7a0081 | |
49 |
|
49 | |||
50 | strip to revision 1 |
|
50 | strip to revision 1 | |
51 |
|
51 | |||
52 | $ hg strip 1 |
|
52 | $ hg strip 1 | |
53 | saved backup bundle to .* |
|
53 | saved backup bundle to .* | |
54 |
|
54 | |||
55 | list bookmarks |
|
55 | list bookmarks | |
56 |
|
56 | |||
57 | $ hg book |
|
57 | $ hg book | |
58 |
* test 1: |
|
58 | * test 1:8cf31af87a2b | |
59 |
* test2 1: |
|
59 | * test2 1:8cf31af87a2b | |
60 |
|
60 |
@@ -1,367 +1,367 b'' | |||||
1 | $ hg init test |
|
1 | $ hg init test | |
2 | $ cd test |
|
2 | $ cd test | |
3 | $ echo "0" >> afile |
|
3 | $ echo "0" >> afile | |
4 | $ hg add afile |
|
4 | $ hg add afile | |
5 |
$ hg commit -m "0.0" |
|
5 | $ hg commit -m "0.0" | |
6 | $ echo "1" >> afile |
|
6 | $ echo "1" >> afile | |
7 |
$ hg commit -m "0.1" |
|
7 | $ hg commit -m "0.1" | |
8 | $ echo "2" >> afile |
|
8 | $ echo "2" >> afile | |
9 |
$ hg commit -m "0.2" |
|
9 | $ hg commit -m "0.2" | |
10 | $ echo "3" >> afile |
|
10 | $ echo "3" >> afile | |
11 |
$ hg commit -m "0.3" |
|
11 | $ hg commit -m "0.3" | |
12 | $ hg update -C 0 |
|
12 | $ hg update -C 0 | |
13 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
13 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
14 | $ echo "1" >> afile |
|
14 | $ echo "1" >> afile | |
15 |
$ hg commit -m "1.1" |
|
15 | $ hg commit -m "1.1" | |
16 | created new head |
|
16 | created new head | |
17 | $ echo "2" >> afile |
|
17 | $ echo "2" >> afile | |
18 |
$ hg commit -m "1.2" |
|
18 | $ hg commit -m "1.2" | |
19 | $ echo "a line" > fred |
|
19 | $ echo "a line" > fred | |
20 | $ echo "3" >> afile |
|
20 | $ echo "3" >> afile | |
21 | $ hg add fred |
|
21 | $ hg add fred | |
22 |
$ hg commit -m "1.3" |
|
22 | $ hg commit -m "1.3" | |
23 | $ hg mv afile adifferentfile |
|
23 | $ hg mv afile adifferentfile | |
24 |
$ hg commit -m "1.3m" |
|
24 | $ hg commit -m "1.3m" | |
25 | $ hg update -C 3 |
|
25 | $ hg update -C 3 | |
26 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
26 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
27 | $ hg mv afile anotherfile |
|
27 | $ hg mv afile anotherfile | |
28 |
$ hg commit -m "0.3m" |
|
28 | $ hg commit -m "0.3m" | |
29 | $ hg debugindex .hg/store/data/afile.i |
|
29 | $ hg debugindex .hg/store/data/afile.i | |
30 | rev offset length base linkrev nodeid p1 p2 |
|
30 | rev offset length base linkrev nodeid p1 p2 | |
31 | 0 0 3 0 0 362fef284ce2 000000000000 000000000000 |
|
31 | 0 0 3 0 0 362fef284ce2 000000000000 000000000000 | |
32 | 1 3 5 1 1 125144f7e028 362fef284ce2 000000000000 |
|
32 | 1 3 5 1 1 125144f7e028 362fef284ce2 000000000000 | |
33 | 2 8 7 2 2 4c982badb186 125144f7e028 000000000000 |
|
33 | 2 8 7 2 2 4c982badb186 125144f7e028 000000000000 | |
34 | 3 15 9 3 3 19b1fc555737 4c982badb186 000000000000 |
|
34 | 3 15 9 3 3 19b1fc555737 4c982badb186 000000000000 | |
35 | $ hg debugindex .hg/store/data/adifferentfile.i |
|
35 | $ hg debugindex .hg/store/data/adifferentfile.i | |
36 | rev offset length base linkrev nodeid p1 p2 |
|
36 | rev offset length base linkrev nodeid p1 p2 | |
37 | 0 0 75 0 7 2565f3199a74 000000000000 000000000000 |
|
37 | 0 0 75 0 7 2565f3199a74 000000000000 000000000000 | |
38 | $ hg debugindex .hg/store/data/anotherfile.i |
|
38 | $ hg debugindex .hg/store/data/anotherfile.i | |
39 | rev offset length base linkrev nodeid p1 p2 |
|
39 | rev offset length base linkrev nodeid p1 p2 | |
40 | 0 0 75 0 8 2565f3199a74 000000000000 000000000000 |
|
40 | 0 0 75 0 8 2565f3199a74 000000000000 000000000000 | |
41 | $ hg debugindex .hg/store/data/fred.i |
|
41 | $ hg debugindex .hg/store/data/fred.i | |
42 | rev offset length base linkrev nodeid p1 p2 |
|
42 | rev offset length base linkrev nodeid p1 p2 | |
43 | 0 0 8 0 6 12ab3bcc5ea4 000000000000 000000000000 |
|
43 | 0 0 8 0 6 12ab3bcc5ea4 000000000000 000000000000 | |
44 | $ hg debugindex .hg/store/00manifest.i |
|
44 | $ hg debugindex .hg/store/00manifest.i | |
45 | rev offset length base linkrev nodeid p1 p2 |
|
45 | rev offset length base linkrev nodeid p1 p2 | |
46 | 0 0 48 0 0 43eadb1d2d06 000000000000 000000000000 |
|
46 | 0 0 48 0 0 43eadb1d2d06 000000000000 000000000000 | |
47 | 1 48 48 1 1 8b89697eba2c 43eadb1d2d06 000000000000 |
|
47 | 1 48 48 1 1 8b89697eba2c 43eadb1d2d06 000000000000 | |
48 | 2 96 48 2 2 626a32663c2f 8b89697eba2c 000000000000 |
|
48 | 2 96 48 2 2 626a32663c2f 8b89697eba2c 000000000000 | |
49 | 3 144 48 3 3 f54c32f13478 626a32663c2f 000000000000 |
|
49 | 3 144 48 3 3 f54c32f13478 626a32663c2f 000000000000 | |
50 | 4 192 58 3 6 de68e904d169 626a32663c2f 000000000000 |
|
50 | 4 192 58 3 6 de68e904d169 626a32663c2f 000000000000 | |
51 | 5 250 68 3 7 09bb521d218d de68e904d169 000000000000 |
|
51 | 5 250 68 3 7 09bb521d218d de68e904d169 000000000000 | |
52 | 6 318 54 6 8 1fde233dfb0f f54c32f13478 000000000000 |
|
52 | 6 318 54 6 8 1fde233dfb0f f54c32f13478 000000000000 | |
53 | $ hg verify |
|
53 | $ hg verify | |
54 | checking changesets |
|
54 | checking changesets | |
55 | checking manifests |
|
55 | checking manifests | |
56 | crosschecking files in changesets and manifests |
|
56 | crosschecking files in changesets and manifests | |
57 | checking files |
|
57 | checking files | |
58 | 4 files, 9 changesets, 7 total revisions |
|
58 | 4 files, 9 changesets, 7 total revisions | |
59 | $ cd .. |
|
59 | $ cd .. | |
60 | $ for i in 0 1 2 3 4 5 6 7 8; do |
|
60 | $ for i in 0 1 2 3 4 5 6 7 8; do | |
61 | > mkdir test-"$i" |
|
61 | > mkdir test-"$i" | |
62 | > hg --cwd test-"$i" init |
|
62 | > hg --cwd test-"$i" init | |
63 | > hg -R test bundle -r "$i" test-"$i".hg test-"$i" |
|
63 | > hg -R test bundle -r "$i" test-"$i".hg test-"$i" | |
64 | > cd test-"$i" |
|
64 | > cd test-"$i" | |
65 | > hg unbundle ../test-"$i".hg |
|
65 | > hg unbundle ../test-"$i".hg | |
66 | > hg verify |
|
66 | > hg verify | |
67 | > hg tip -q |
|
67 | > hg tip -q | |
68 | > cd .. |
|
68 | > cd .. | |
69 | > done |
|
69 | > done | |
70 | searching for changes |
|
70 | searching for changes | |
71 | 1 changesets found |
|
71 | 1 changesets found | |
72 | adding changesets |
|
72 | adding changesets | |
73 | adding manifests |
|
73 | adding manifests | |
74 | adding file changes |
|
74 | adding file changes | |
75 | added 1 changesets with 1 changes to 1 files |
|
75 | added 1 changesets with 1 changes to 1 files | |
76 | (run 'hg update' to get a working copy) |
|
76 | (run 'hg update' to get a working copy) | |
77 | checking changesets |
|
77 | checking changesets | |
78 | checking manifests |
|
78 | checking manifests | |
79 | crosschecking files in changesets and manifests |
|
79 | crosschecking files in changesets and manifests | |
80 | checking files |
|
80 | checking files | |
81 | 1 files, 1 changesets, 1 total revisions |
|
81 | 1 files, 1 changesets, 1 total revisions | |
82 | 0:5649c9d34dd8 |
|
82 | 0:f9ee2f85a263 | |
83 | searching for changes |
|
83 | searching for changes | |
84 | 2 changesets found |
|
84 | 2 changesets found | |
85 | adding changesets |
|
85 | adding changesets | |
86 | adding manifests |
|
86 | adding manifests | |
87 | adding file changes |
|
87 | adding file changes | |
88 | added 2 changesets with 2 changes to 1 files |
|
88 | added 2 changesets with 2 changes to 1 files | |
89 | (run 'hg update' to get a working copy) |
|
89 | (run 'hg update' to get a working copy) | |
90 | checking changesets |
|
90 | checking changesets | |
91 | checking manifests |
|
91 | checking manifests | |
92 | crosschecking files in changesets and manifests |
|
92 | crosschecking files in changesets and manifests | |
93 | checking files |
|
93 | checking files | |
94 | 1 files, 2 changesets, 2 total revisions |
|
94 | 1 files, 2 changesets, 2 total revisions | |
95 | 1:10b2180f755b |
|
95 | 1:34c2bf6b0626 | |
96 | searching for changes |
|
96 | searching for changes | |
97 | 3 changesets found |
|
97 | 3 changesets found | |
98 | adding changesets |
|
98 | adding changesets | |
99 | adding manifests |
|
99 | adding manifests | |
100 | adding file changes |
|
100 | adding file changes | |
101 | added 3 changesets with 3 changes to 1 files |
|
101 | added 3 changesets with 3 changes to 1 files | |
102 | (run 'hg update' to get a working copy) |
|
102 | (run 'hg update' to get a working copy) | |
103 | checking changesets |
|
103 | checking changesets | |
104 | checking manifests |
|
104 | checking manifests | |
105 | crosschecking files in changesets and manifests |
|
105 | crosschecking files in changesets and manifests | |
106 | checking files |
|
106 | checking files | |
107 | 1 files, 3 changesets, 3 total revisions |
|
107 | 1 files, 3 changesets, 3 total revisions | |
108 | 2:d62976ca1e50 |
|
108 | 2:e38ba6f5b7e0 | |
109 | searching for changes |
|
109 | searching for changes | |
110 | 4 changesets found |
|
110 | 4 changesets found | |
111 | adding changesets |
|
111 | adding changesets | |
112 | adding manifests |
|
112 | adding manifests | |
113 | adding file changes |
|
113 | adding file changes | |
114 | added 4 changesets with 4 changes to 1 files |
|
114 | added 4 changesets with 4 changes to 1 files | |
115 | (run 'hg update' to get a working copy) |
|
115 | (run 'hg update' to get a working copy) | |
116 | checking changesets |
|
116 | checking changesets | |
117 | checking manifests |
|
117 | checking manifests | |
118 | crosschecking files in changesets and manifests |
|
118 | crosschecking files in changesets and manifests | |
119 | checking files |
|
119 | checking files | |
120 | 1 files, 4 changesets, 4 total revisions |
|
120 | 1 files, 4 changesets, 4 total revisions | |
121 | 3:ac69c658229d |
|
121 | 3:eebf5a27f8ca | |
122 | searching for changes |
|
122 | searching for changes | |
123 | 2 changesets found |
|
123 | 2 changesets found | |
124 | adding changesets |
|
124 | adding changesets | |
125 | adding manifests |
|
125 | adding manifests | |
126 | adding file changes |
|
126 | adding file changes | |
127 | added 2 changesets with 2 changes to 1 files |
|
127 | added 2 changesets with 2 changes to 1 files | |
128 | (run 'hg update' to get a working copy) |
|
128 | (run 'hg update' to get a working copy) | |
129 | checking changesets |
|
129 | checking changesets | |
130 | checking manifests |
|
130 | checking manifests | |
131 | crosschecking files in changesets and manifests |
|
131 | crosschecking files in changesets and manifests | |
132 | checking files |
|
132 | checking files | |
133 | 1 files, 2 changesets, 2 total revisions |
|
133 | 1 files, 2 changesets, 2 total revisions | |
134 | 1:5f4f3ceb285e |
|
134 | 1:095197eb4973 | |
135 | searching for changes |
|
135 | searching for changes | |
136 | 3 changesets found |
|
136 | 3 changesets found | |
137 | adding changesets |
|
137 | adding changesets | |
138 | adding manifests |
|
138 | adding manifests | |
139 | adding file changes |
|
139 | adding file changes | |
140 | added 3 changesets with 3 changes to 1 files |
|
140 | added 3 changesets with 3 changes to 1 files | |
141 | (run 'hg update' to get a working copy) |
|
141 | (run 'hg update' to get a working copy) | |
142 | checking changesets |
|
142 | checking changesets | |
143 | checking manifests |
|
143 | checking manifests | |
144 | crosschecking files in changesets and manifests |
|
144 | crosschecking files in changesets and manifests | |
145 | checking files |
|
145 | checking files | |
146 | 1 files, 3 changesets, 3 total revisions |
|
146 | 1 files, 3 changesets, 3 total revisions | |
147 | 2:024e4e7df376 |
|
147 | 2:1bb50a9436a7 | |
148 | searching for changes |
|
148 | searching for changes | |
149 | 4 changesets found |
|
149 | 4 changesets found | |
150 | adding changesets |
|
150 | adding changesets | |
151 | adding manifests |
|
151 | adding manifests | |
152 | adding file changes |
|
152 | adding file changes | |
153 | added 4 changesets with 5 changes to 2 files |
|
153 | added 4 changesets with 5 changes to 2 files | |
154 | (run 'hg update' to get a working copy) |
|
154 | (run 'hg update' to get a working copy) | |
155 | checking changesets |
|
155 | checking changesets | |
156 | checking manifests |
|
156 | checking manifests | |
157 | crosschecking files in changesets and manifests |
|
157 | crosschecking files in changesets and manifests | |
158 | checking files |
|
158 | checking files | |
159 | 2 files, 4 changesets, 5 total revisions |
|
159 | 2 files, 4 changesets, 5 total revisions | |
160 | 3:1e3f6b843bd6 |
|
160 | 3:7373c1169842 | |
161 | searching for changes |
|
161 | searching for changes | |
162 | 5 changesets found |
|
162 | 5 changesets found | |
163 | adding changesets |
|
163 | adding changesets | |
164 | adding manifests |
|
164 | adding manifests | |
165 | adding file changes |
|
165 | adding file changes | |
166 | added 5 changesets with 6 changes to 3 files |
|
166 | added 5 changesets with 6 changes to 3 files | |
167 | (run 'hg update' to get a working copy) |
|
167 | (run 'hg update' to get a working copy) | |
168 | checking changesets |
|
168 | checking changesets | |
169 | checking manifests |
|
169 | checking manifests | |
170 | crosschecking files in changesets and manifests |
|
170 | crosschecking files in changesets and manifests | |
171 | checking files |
|
171 | checking files | |
172 | 3 files, 5 changesets, 6 total revisions |
|
172 | 3 files, 5 changesets, 6 total revisions | |
173 | 4:27f57c869697 |
|
173 | 4:a6a34bfa0076 | |
174 | searching for changes |
|
174 | searching for changes | |
175 | 5 changesets found |
|
175 | 5 changesets found | |
176 | adding changesets |
|
176 | adding changesets | |
177 | adding manifests |
|
177 | adding manifests | |
178 | adding file changes |
|
178 | adding file changes | |
179 | added 5 changesets with 5 changes to 2 files |
|
179 | added 5 changesets with 5 changes to 2 files | |
180 | (run 'hg update' to get a working copy) |
|
180 | (run 'hg update' to get a working copy) | |
181 | checking changesets |
|
181 | checking changesets | |
182 | checking manifests |
|
182 | checking manifests | |
183 | crosschecking files in changesets and manifests |
|
183 | crosschecking files in changesets and manifests | |
184 | checking files |
|
184 | checking files | |
185 | 2 files, 5 changesets, 5 total revisions |
|
185 | 2 files, 5 changesets, 5 total revisions | |
186 | 4:088ff9d6e1e1 |
|
186 | 4:aa35859c02ea | |
187 | $ cd test-8 |
|
187 | $ cd test-8 | |
188 | $ hg pull ../test-7 |
|
188 | $ hg pull ../test-7 | |
189 | pulling from ../test-7 |
|
189 | pulling from ../test-7 | |
190 | searching for changes |
|
190 | searching for changes | |
191 | adding changesets |
|
191 | adding changesets | |
192 | adding manifests |
|
192 | adding manifests | |
193 | adding file changes |
|
193 | adding file changes | |
194 | added 4 changesets with 2 changes to 3 files (+1 heads) |
|
194 | added 4 changesets with 2 changes to 3 files (+1 heads) | |
195 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
195 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
196 | $ hg verify |
|
196 | $ hg verify | |
197 | checking changesets |
|
197 | checking changesets | |
198 | checking manifests |
|
198 | checking manifests | |
199 | crosschecking files in changesets and manifests |
|
199 | crosschecking files in changesets and manifests | |
200 | checking files |
|
200 | checking files | |
201 | 4 files, 9 changesets, 7 total revisions |
|
201 | 4 files, 9 changesets, 7 total revisions | |
202 | $ hg rollback |
|
202 | $ hg rollback | |
203 | rolling back to revision 4 (undo pull) |
|
203 | rolling back to revision 4 (undo pull) | |
204 | $ cd .. |
|
204 | $ cd .. | |
205 |
|
205 | |||
206 | should fail |
|
206 | should fail | |
207 |
|
207 | |||
208 | $ hg -R test bundle --base 2 -r tip test-bundle-branch1.hg test-3 |
|
208 | $ hg -R test bundle --base 2 -r tip test-bundle-branch1.hg test-3 | |
209 | abort: --base is incompatible with specifying a destination |
|
209 | abort: --base is incompatible with specifying a destination | |
210 | $ hg -R test bundle -r tip test-bundle-branch1.hg |
|
210 | $ hg -R test bundle -r tip test-bundle-branch1.hg | |
211 | abort: repository default-push not found! |
|
211 | abort: repository default-push not found! | |
212 |
|
212 | |||
213 | $ hg -R test bundle --base 2 -r tip test-bundle-branch1.hg |
|
213 | $ hg -R test bundle --base 2 -r tip test-bundle-branch1.hg | |
214 | 2 changesets found |
|
214 | 2 changesets found | |
215 | $ hg -R test bundle --base 2 -r 7 test-bundle-branch2.hg |
|
215 | $ hg -R test bundle --base 2 -r 7 test-bundle-branch2.hg | |
216 | 4 changesets found |
|
216 | 4 changesets found | |
217 | $ hg -R test bundle --base 2 test-bundle-all.hg |
|
217 | $ hg -R test bundle --base 2 test-bundle-all.hg | |
218 | 6 changesets found |
|
218 | 6 changesets found | |
219 | $ hg -R test bundle --base 3 -r tip test-bundle-should-fail.hg |
|
219 | $ hg -R test bundle --base 3 -r tip test-bundle-should-fail.hg | |
220 | 1 changesets found |
|
220 | 1 changesets found | |
221 |
|
221 | |||
222 | empty bundle |
|
222 | empty bundle | |
223 |
|
223 | |||
224 | $ hg -R test bundle --base 7 --base 8 test-bundle-empty.hg |
|
224 | $ hg -R test bundle --base 7 --base 8 test-bundle-empty.hg | |
225 | no changes found |
|
225 | no changes found | |
226 |
|
226 | |||
227 | issue76 msg2163 |
|
227 | issue76 msg2163 | |
228 |
|
228 | |||
229 | $ hg -R test bundle --base 3 -r 3 -r 3 test-bundle-cset-3.hg |
|
229 | $ hg -R test bundle --base 3 -r 3 -r 3 test-bundle-cset-3.hg | |
230 | 1 changesets found |
|
230 | 1 changesets found | |
231 |
|
231 | |||
232 | issue1910 |
|
232 | issue1910 | |
233 |
|
233 | |||
234 | $ hg -R test bundle --base 7 test-bundle-cset-7.hg |
|
234 | $ hg -R test bundle --base 7 test-bundle-cset-7.hg | |
235 | 4 changesets found |
|
235 | 4 changesets found | |
236 |
|
236 | |||
237 | $ hg clone test-2 test-9 |
|
237 | $ hg clone test-2 test-9 | |
238 | updating to branch default |
|
238 | updating to branch default | |
239 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
239 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
240 | $ cd test-9 |
|
240 | $ cd test-9 | |
241 |
|
241 | |||
242 | revision 2 |
|
242 | revision 2 | |
243 |
|
243 | |||
244 | $ hg tip -q |
|
244 | $ hg tip -q | |
245 | 2:d62976ca1e50 |
|
245 | 2:e38ba6f5b7e0 | |
246 | $ hg unbundle ../test-bundle-should-fail.hg |
|
246 | $ hg unbundle ../test-bundle-should-fail.hg | |
247 | adding changesets |
|
247 | adding changesets | |
248 | transaction abort! |
|
248 | transaction abort! | |
249 | rollback completed |
|
249 | rollback completed | |
250 |
abort: 00changelog.i@ |
|
250 | abort: 00changelog.i@eebf5a27f8ca: unknown parent! | |
251 |
|
251 | |||
252 | revision 2 |
|
252 | revision 2 | |
253 |
|
253 | |||
254 | $ hg tip -q |
|
254 | $ hg tip -q | |
255 | 2:d62976ca1e50 |
|
255 | 2:e38ba6f5b7e0 | |
256 | $ hg unbundle ../test-bundle-all.hg |
|
256 | $ hg unbundle ../test-bundle-all.hg | |
257 | adding changesets |
|
257 | adding changesets | |
258 | adding manifests |
|
258 | adding manifests | |
259 | adding file changes |
|
259 | adding file changes | |
260 | added 6 changesets with 4 changes to 4 files (+1 heads) |
|
260 | added 6 changesets with 4 changes to 4 files (+1 heads) | |
261 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
261 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
262 |
|
262 | |||
263 | revision 8 |
|
263 | revision 8 | |
264 |
|
264 | |||
265 | $ hg tip -q |
|
265 | $ hg tip -q | |
266 | 8:088ff9d6e1e1 |
|
266 | 8:aa35859c02ea | |
267 | $ hg verify |
|
267 | $ hg verify | |
268 | checking changesets |
|
268 | checking changesets | |
269 | checking manifests |
|
269 | checking manifests | |
270 | crosschecking files in changesets and manifests |
|
270 | crosschecking files in changesets and manifests | |
271 | checking files |
|
271 | checking files | |
272 | 4 files, 9 changesets, 7 total revisions |
|
272 | 4 files, 9 changesets, 7 total revisions | |
273 | $ hg rollback |
|
273 | $ hg rollback | |
274 | rolling back to revision 2 (undo unbundle) |
|
274 | rolling back to revision 2 (undo unbundle) | |
275 |
|
275 | |||
276 | revision 2 |
|
276 | revision 2 | |
277 |
|
277 | |||
278 | $ hg tip -q |
|
278 | $ hg tip -q | |
279 | 2:d62976ca1e50 |
|
279 | 2:e38ba6f5b7e0 | |
280 | $ hg unbundle ../test-bundle-branch1.hg |
|
280 | $ hg unbundle ../test-bundle-branch1.hg | |
281 | adding changesets |
|
281 | adding changesets | |
282 | adding manifests |
|
282 | adding manifests | |
283 | adding file changes |
|
283 | adding file changes | |
284 | added 2 changesets with 2 changes to 2 files |
|
284 | added 2 changesets with 2 changes to 2 files | |
285 | (run 'hg update' to get a working copy) |
|
285 | (run 'hg update' to get a working copy) | |
286 |
|
286 | |||
287 | revision 4 |
|
287 | revision 4 | |
288 |
|
288 | |||
289 | $ hg tip -q |
|
289 | $ hg tip -q | |
290 | 4:088ff9d6e1e1 |
|
290 | 4:aa35859c02ea | |
291 | $ hg verify |
|
291 | $ hg verify | |
292 | checking changesets |
|
292 | checking changesets | |
293 | checking manifests |
|
293 | checking manifests | |
294 | crosschecking files in changesets and manifests |
|
294 | crosschecking files in changesets and manifests | |
295 | checking files |
|
295 | checking files | |
296 | 2 files, 5 changesets, 5 total revisions |
|
296 | 2 files, 5 changesets, 5 total revisions | |
297 | $ hg rollback |
|
297 | $ hg rollback | |
298 | rolling back to revision 2 (undo unbundle) |
|
298 | rolling back to revision 2 (undo unbundle) | |
299 | $ hg unbundle ../test-bundle-branch2.hg |
|
299 | $ hg unbundle ../test-bundle-branch2.hg | |
300 | adding changesets |
|
300 | adding changesets | |
301 | adding manifests |
|
301 | adding manifests | |
302 | adding file changes |
|
302 | adding file changes | |
303 | added 4 changesets with 3 changes to 3 files (+1 heads) |
|
303 | added 4 changesets with 3 changes to 3 files (+1 heads) | |
304 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
304 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
305 |
|
305 | |||
306 | revision 6 |
|
306 | revision 6 | |
307 |
|
307 | |||
308 | $ hg tip -q |
|
308 | $ hg tip -q | |
309 | 6:27f57c869697 |
|
309 | 6:a6a34bfa0076 | |
310 | $ hg verify |
|
310 | $ hg verify | |
311 | checking changesets |
|
311 | checking changesets | |
312 | checking manifests |
|
312 | checking manifests | |
313 | crosschecking files in changesets and manifests |
|
313 | crosschecking files in changesets and manifests | |
314 | checking files |
|
314 | checking files | |
315 | 3 files, 7 changesets, 6 total revisions |
|
315 | 3 files, 7 changesets, 6 total revisions | |
316 | $ hg rollback |
|
316 | $ hg rollback | |
317 | rolling back to revision 2 (undo unbundle) |
|
317 | rolling back to revision 2 (undo unbundle) | |
318 | $ hg unbundle ../test-bundle-cset-7.hg |
|
318 | $ hg unbundle ../test-bundle-cset-7.hg | |
319 | adding changesets |
|
319 | adding changesets | |
320 | adding manifests |
|
320 | adding manifests | |
321 | adding file changes |
|
321 | adding file changes | |
322 | added 2 changesets with 2 changes to 2 files |
|
322 | added 2 changesets with 2 changes to 2 files | |
323 | (run 'hg update' to get a working copy) |
|
323 | (run 'hg update' to get a working copy) | |
324 |
|
324 | |||
325 | revision 4 |
|
325 | revision 4 | |
326 |
|
326 | |||
327 | $ hg tip -q |
|
327 | $ hg tip -q | |
328 | 4:088ff9d6e1e1 |
|
328 | 4:aa35859c02ea | |
329 | $ hg verify |
|
329 | $ hg verify | |
330 | checking changesets |
|
330 | checking changesets | |
331 | checking manifests |
|
331 | checking manifests | |
332 | crosschecking files in changesets and manifests |
|
332 | crosschecking files in changesets and manifests | |
333 | checking files |
|
333 | checking files | |
334 | 2 files, 5 changesets, 5 total revisions |
|
334 | 2 files, 5 changesets, 5 total revisions | |
335 |
|
335 | |||
336 | $ cd ../test |
|
336 | $ cd ../test | |
337 | $ hg merge 7 |
|
337 | $ hg merge 7 | |
338 | warning: detected divergent renames of afile to: |
|
338 | warning: detected divergent renames of afile to: | |
339 | anotherfile |
|
339 | anotherfile | |
340 | adifferentfile |
|
340 | adifferentfile | |
341 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
341 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
342 | (branch merge, don't forget to commit) |
|
342 | (branch merge, don't forget to commit) | |
343 |
$ hg ci -m merge |
|
343 | $ hg ci -m merge | |
344 | $ cd .. |
|
344 | $ cd .. | |
345 | $ hg -R test bundle --base 2 test-bundle-head.hg |
|
345 | $ hg -R test bundle --base 2 test-bundle-head.hg | |
346 | 7 changesets found |
|
346 | 7 changesets found | |
347 | $ hg clone test-2 test-10 |
|
347 | $ hg clone test-2 test-10 | |
348 | updating to branch default |
|
348 | updating to branch default | |
349 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
349 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
350 | $ cd test-10 |
|
350 | $ cd test-10 | |
351 | $ hg unbundle ../test-bundle-head.hg |
|
351 | $ hg unbundle ../test-bundle-head.hg | |
352 | adding changesets |
|
352 | adding changesets | |
353 | adding manifests |
|
353 | adding manifests | |
354 | adding file changes |
|
354 | adding file changes | |
355 | added 7 changesets with 4 changes to 4 files |
|
355 | added 7 changesets with 4 changes to 4 files | |
356 | (run 'hg update' to get a working copy) |
|
356 | (run 'hg update' to get a working copy) | |
357 |
|
357 | |||
358 | revision 9 |
|
358 | revision 9 | |
359 |
|
359 | |||
360 | $ hg tip -q |
|
360 | $ hg tip -q | |
361 | 9:e3061ea42e4c |
|
361 | 9:905597b0d5d4 | |
362 | $ hg verify |
|
362 | $ hg verify | |
363 | checking changesets |
|
363 | checking changesets | |
364 | checking manifests |
|
364 | checking manifests | |
365 | crosschecking files in changesets and manifests |
|
365 | crosschecking files in changesets and manifests | |
366 | checking files |
|
366 | checking files | |
367 | 4 files, 10 changesets, 7 total revisions |
|
367 | 4 files, 10 changesets, 7 total revisions |
@@ -1,558 +1,558 b'' | |||||
1 | $ cp "$TESTDIR"/printenv.py . |
|
1 | $ cp "$TESTDIR"/printenv.py . | |
2 |
|
2 | |||
3 | Setting up test |
|
3 | Setting up test | |
4 |
|
4 | |||
5 | $ hg init test |
|
5 | $ hg init test | |
6 | $ cd test |
|
6 | $ cd test | |
7 | $ echo 0 > afile |
|
7 | $ echo 0 > afile | |
8 | $ hg add afile |
|
8 | $ hg add afile | |
9 |
$ hg commit -m "0.0" |
|
9 | $ hg commit -m "0.0" | |
10 | $ echo 1 >> afile |
|
10 | $ echo 1 >> afile | |
11 |
$ hg commit -m "0.1" |
|
11 | $ hg commit -m "0.1" | |
12 | $ echo 2 >> afile |
|
12 | $ echo 2 >> afile | |
13 |
$ hg commit -m "0.2" |
|
13 | $ hg commit -m "0.2" | |
14 | $ echo 3 >> afile |
|
14 | $ echo 3 >> afile | |
15 |
$ hg commit -m "0.3" |
|
15 | $ hg commit -m "0.3" | |
16 | $ hg update -C 0 |
|
16 | $ hg update -C 0 | |
17 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
17 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
18 | $ echo 1 >> afile |
|
18 | $ echo 1 >> afile | |
19 |
$ hg commit -m "1.1" |
|
19 | $ hg commit -m "1.1" | |
20 | created new head |
|
20 | created new head | |
21 | $ echo 2 >> afile |
|
21 | $ echo 2 >> afile | |
22 |
$ hg commit -m "1.2" |
|
22 | $ hg commit -m "1.2" | |
23 | $ echo "a line" > fred |
|
23 | $ echo "a line" > fred | |
24 | $ echo 3 >> afile |
|
24 | $ echo 3 >> afile | |
25 | $ hg add fred |
|
25 | $ hg add fred | |
26 |
$ hg commit -m "1.3" |
|
26 | $ hg commit -m "1.3" | |
27 | $ hg mv afile adifferentfile |
|
27 | $ hg mv afile adifferentfile | |
28 |
$ hg commit -m "1.3m" |
|
28 | $ hg commit -m "1.3m" | |
29 | $ hg update -C 3 |
|
29 | $ hg update -C 3 | |
30 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
30 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
31 | $ hg mv afile anotherfile |
|
31 | $ hg mv afile anotherfile | |
32 |
$ hg commit -m "0.3m" |
|
32 | $ hg commit -m "0.3m" | |
33 | $ hg verify |
|
33 | $ hg verify | |
34 | checking changesets |
|
34 | checking changesets | |
35 | checking manifests |
|
35 | checking manifests | |
36 | crosschecking files in changesets and manifests |
|
36 | crosschecking files in changesets and manifests | |
37 | checking files |
|
37 | checking files | |
38 | 4 files, 9 changesets, 7 total revisions |
|
38 | 4 files, 9 changesets, 7 total revisions | |
39 | $ cd .. |
|
39 | $ cd .. | |
40 | $ hg init empty |
|
40 | $ hg init empty | |
41 |
|
41 | |||
42 | Bundle --all |
|
42 | Bundle --all | |
43 |
|
43 | |||
44 | $ hg -R test bundle --all all.hg |
|
44 | $ hg -R test bundle --all all.hg | |
45 | 9 changesets found |
|
45 | 9 changesets found | |
46 |
|
46 | |||
47 | Bundle test to full.hg |
|
47 | Bundle test to full.hg | |
48 |
|
48 | |||
49 | $ hg -R test bundle full.hg empty |
|
49 | $ hg -R test bundle full.hg empty | |
50 | searching for changes |
|
50 | searching for changes | |
51 | 9 changesets found |
|
51 | 9 changesets found | |
52 |
|
52 | |||
53 | Unbundle full.hg in test |
|
53 | Unbundle full.hg in test | |
54 |
|
54 | |||
55 | $ hg -R test unbundle full.hg |
|
55 | $ hg -R test unbundle full.hg | |
56 | adding changesets |
|
56 | adding changesets | |
57 | adding manifests |
|
57 | adding manifests | |
58 | adding file changes |
|
58 | adding file changes | |
59 | added 0 changesets with 0 changes to 4 files |
|
59 | added 0 changesets with 0 changes to 4 files | |
60 | (run 'hg update' to get a working copy) |
|
60 | (run 'hg update' to get a working copy) | |
61 |
|
61 | |||
62 | Verify empty |
|
62 | Verify empty | |
63 |
|
63 | |||
64 | $ hg -R empty heads |
|
64 | $ hg -R empty heads | |
65 | $ hg -R empty verify |
|
65 | $ hg -R empty verify | |
66 | checking changesets |
|
66 | checking changesets | |
67 | checking manifests |
|
67 | checking manifests | |
68 | crosschecking files in changesets and manifests |
|
68 | crosschecking files in changesets and manifests | |
69 | checking files |
|
69 | checking files | |
70 | 0 files, 0 changesets, 0 total revisions |
|
70 | 0 files, 0 changesets, 0 total revisions | |
71 |
|
71 | |||
72 | Pull full.hg into test (using --cwd) |
|
72 | Pull full.hg into test (using --cwd) | |
73 |
|
73 | |||
74 | $ hg --cwd test pull ../full.hg |
|
74 | $ hg --cwd test pull ../full.hg | |
75 | pulling from ../full.hg |
|
75 | pulling from ../full.hg | |
76 | searching for changes |
|
76 | searching for changes | |
77 | no changes found |
|
77 | no changes found | |
78 |
|
78 | |||
79 | Pull full.hg into empty (using --cwd) |
|
79 | Pull full.hg into empty (using --cwd) | |
80 |
|
80 | |||
81 | $ hg --cwd empty pull ../full.hg |
|
81 | $ hg --cwd empty pull ../full.hg | |
82 | pulling from ../full.hg |
|
82 | pulling from ../full.hg | |
83 | requesting all changes |
|
83 | requesting all changes | |
84 | adding changesets |
|
84 | adding changesets | |
85 | adding manifests |
|
85 | adding manifests | |
86 | adding file changes |
|
86 | adding file changes | |
87 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
87 | added 9 changesets with 7 changes to 4 files (+1 heads) | |
88 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
88 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
89 |
|
89 | |||
90 | Rollback empty |
|
90 | Rollback empty | |
91 |
|
91 | |||
92 | $ hg -R empty rollback |
|
92 | $ hg -R empty rollback | |
93 | rolling back to revision -1 (undo pull) |
|
93 | rolling back to revision -1 (undo pull) | |
94 |
|
94 | |||
95 | Pull full.hg into empty again (using --cwd) |
|
95 | Pull full.hg into empty again (using --cwd) | |
96 |
|
96 | |||
97 | $ hg --cwd empty pull ../full.hg |
|
97 | $ hg --cwd empty pull ../full.hg | |
98 | pulling from ../full.hg |
|
98 | pulling from ../full.hg | |
99 | requesting all changes |
|
99 | requesting all changes | |
100 | adding changesets |
|
100 | adding changesets | |
101 | adding manifests |
|
101 | adding manifests | |
102 | adding file changes |
|
102 | adding file changes | |
103 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
103 | added 9 changesets with 7 changes to 4 files (+1 heads) | |
104 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
104 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
105 |
|
105 | |||
106 | Pull full.hg into test (using -R) |
|
106 | Pull full.hg into test (using -R) | |
107 |
|
107 | |||
108 | $ hg -R test pull full.hg |
|
108 | $ hg -R test pull full.hg | |
109 | pulling from full.hg |
|
109 | pulling from full.hg | |
110 | searching for changes |
|
110 | searching for changes | |
111 | no changes found |
|
111 | no changes found | |
112 |
|
112 | |||
113 | Pull full.hg into empty (using -R) |
|
113 | Pull full.hg into empty (using -R) | |
114 |
|
114 | |||
115 | $ hg -R empty pull full.hg |
|
115 | $ hg -R empty pull full.hg | |
116 | pulling from full.hg |
|
116 | pulling from full.hg | |
117 | searching for changes |
|
117 | searching for changes | |
118 | no changes found |
|
118 | no changes found | |
119 |
|
119 | |||
120 | Rollback empty |
|
120 | Rollback empty | |
121 |
|
121 | |||
122 | $ hg -R empty rollback |
|
122 | $ hg -R empty rollback | |
123 | rolling back to revision -1 (undo pull) |
|
123 | rolling back to revision -1 (undo pull) | |
124 |
|
124 | |||
125 | Pull full.hg into empty again (using -R) |
|
125 | Pull full.hg into empty again (using -R) | |
126 |
|
126 | |||
127 | $ hg -R empty pull full.hg |
|
127 | $ hg -R empty pull full.hg | |
128 | pulling from full.hg |
|
128 | pulling from full.hg | |
129 | requesting all changes |
|
129 | requesting all changes | |
130 | adding changesets |
|
130 | adding changesets | |
131 | adding manifests |
|
131 | adding manifests | |
132 | adding file changes |
|
132 | adding file changes | |
133 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
133 | added 9 changesets with 7 changes to 4 files (+1 heads) | |
134 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
134 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
135 |
|
135 | |||
136 | Log -R full.hg in fresh empty |
|
136 | Log -R full.hg in fresh empty | |
137 |
|
137 | |||
138 | $ rm -r empty |
|
138 | $ rm -r empty | |
139 | $ hg init empty |
|
139 | $ hg init empty | |
140 | $ cd empty |
|
140 | $ cd empty | |
141 | $ hg -R bundle://../full.hg log |
|
141 | $ hg -R bundle://../full.hg log | |
142 |
changeset: 8: |
|
142 | changeset: 8:aa35859c02ea | |
143 | tag: tip |
|
143 | tag: tip | |
144 |
parent: 3: |
|
144 | parent: 3:eebf5a27f8ca | |
145 | user: test |
|
145 | user: test | |
146 |
date: |
|
146 | date: Thu Jan 01 00:00:00 1970 +0000 | |
147 | summary: 0.3m |
|
147 | summary: 0.3m | |
148 |
|
148 | |||
149 |
changeset: 7: |
|
149 | changeset: 7:a6a34bfa0076 | |
150 | user: test |
|
150 | user: test | |
151 |
date: |
|
151 | date: Thu Jan 01 00:00:00 1970 +0000 | |
152 | summary: 1.3m |
|
152 | summary: 1.3m | |
153 |
|
153 | |||
154 |
changeset: 6: |
|
154 | changeset: 6:7373c1169842 | |
155 | user: test |
|
155 | user: test | |
156 |
date: |
|
156 | date: Thu Jan 01 00:00:00 1970 +0000 | |
157 | summary: 1.3 |
|
157 | summary: 1.3 | |
158 |
|
158 | |||
159 |
changeset: 5: |
|
159 | changeset: 5:1bb50a9436a7 | |
160 | user: test |
|
160 | user: test | |
161 |
date: |
|
161 | date: Thu Jan 01 00:00:00 1970 +0000 | |
162 | summary: 1.2 |
|
162 | summary: 1.2 | |
163 |
|
163 | |||
164 |
changeset: 4: |
|
164 | changeset: 4:095197eb4973 | |
165 |
parent: 0:56 |
|
165 | parent: 0:f9ee2f85a263 | |
166 | user: test |
|
166 | user: test | |
167 |
date: |
|
167 | date: Thu Jan 01 00:00:00 1970 +0000 | |
168 | summary: 1.1 |
|
168 | summary: 1.1 | |
169 |
|
169 | |||
170 |
changeset: 3: |
|
170 | changeset: 3:eebf5a27f8ca | |
171 | user: test |
|
171 | user: test | |
172 |
date: |
|
172 | date: Thu Jan 01 00:00:00 1970 +0000 | |
173 | summary: 0.3 |
|
173 | summary: 0.3 | |
174 |
|
174 | |||
175 |
changeset: 2: |
|
175 | changeset: 2:e38ba6f5b7e0 | |
176 | user: test |
|
176 | user: test | |
177 |
date: |
|
177 | date: Thu Jan 01 00:00:00 1970 +0000 | |
178 | summary: 0.2 |
|
178 | summary: 0.2 | |
179 |
|
179 | |||
180 |
changeset: 1: |
|
180 | changeset: 1:34c2bf6b0626 | |
181 | user: test |
|
181 | user: test | |
182 |
date: |
|
182 | date: Thu Jan 01 00:00:00 1970 +0000 | |
183 | summary: 0.1 |
|
183 | summary: 0.1 | |
184 |
|
184 | |||
185 |
changeset: 0:56 |
|
185 | changeset: 0:f9ee2f85a263 | |
186 | user: test |
|
186 | user: test | |
187 |
date: |
|
187 | date: Thu Jan 01 00:00:00 1970 +0000 | |
188 | summary: 0.0 |
|
188 | summary: 0.0 | |
189 |
|
189 | |||
190 |
|
190 | |||
191 | Pull ../full.hg into empty (with hook) |
|
191 | Pull ../full.hg into empty (with hook) | |
192 |
|
192 | |||
193 | $ echo '[hooks]' >> .hg/hgrc |
|
193 | $ echo '[hooks]' >> .hg/hgrc | |
194 | $ echo 'changegroup = python ../printenv.py changegroup' >> .hg/hgrc |
|
194 | $ echo 'changegroup = python ../printenv.py changegroup' >> .hg/hgrc | |
195 |
|
195 | |||
196 | doesn't work (yet ?) |
|
196 | doesn't work (yet ?) | |
197 |
|
197 | |||
198 | hg -R bundle://../full.hg verify |
|
198 | hg -R bundle://../full.hg verify | |
199 |
|
199 | |||
200 | $ hg pull bundle://../full.hg |
|
200 | $ hg pull bundle://../full.hg | |
201 |
changegroup hook: HG_NODE= |
|
201 | changegroup hook: HG_NODE=f9ee2f85a263049e9ae6d37a0e67e96194ffb735 HG_SOURCE=pull HG_URL=bundle:../full.hg | |
202 | pulling from bundle://../full.hg |
|
202 | pulling from bundle://../full.hg | |
203 | requesting all changes |
|
203 | requesting all changes | |
204 | adding changesets |
|
204 | adding changesets | |
205 | adding manifests |
|
205 | adding manifests | |
206 | adding file changes |
|
206 | adding file changes | |
207 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
207 | added 9 changesets with 7 changes to 4 files (+1 heads) | |
208 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
208 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
209 |
|
209 | |||
210 | Rollback empty |
|
210 | Rollback empty | |
211 |
|
211 | |||
212 | $ hg rollback |
|
212 | $ hg rollback | |
213 | rolling back to revision -1 (undo pull) |
|
213 | rolling back to revision -1 (undo pull) | |
214 | $ cd .. |
|
214 | $ cd .. | |
215 |
|
215 | |||
216 | Log -R bundle:empty+full.hg |
|
216 | Log -R bundle:empty+full.hg | |
217 |
|
217 | |||
218 | $ hg -R bundle:empty+full.hg log --template="{rev} "; echo "" |
|
218 | $ hg -R bundle:empty+full.hg log --template="{rev} "; echo "" | |
219 | 8 7 6 5 4 3 2 1 0 |
|
219 | 8 7 6 5 4 3 2 1 0 | |
220 |
|
220 | |||
221 | Pull full.hg into empty again (using -R; with hook) |
|
221 | Pull full.hg into empty again (using -R; with hook) | |
222 |
|
222 | |||
223 | $ hg -R empty pull full.hg |
|
223 | $ hg -R empty pull full.hg | |
224 |
changegroup hook: HG_NODE= |
|
224 | changegroup hook: HG_NODE=f9ee2f85a263049e9ae6d37a0e67e96194ffb735 HG_SOURCE=pull HG_URL=bundle:empty+full.hg | |
225 | pulling from full.hg |
|
225 | pulling from full.hg | |
226 | requesting all changes |
|
226 | requesting all changes | |
227 | adding changesets |
|
227 | adding changesets | |
228 | adding manifests |
|
228 | adding manifests | |
229 | adding file changes |
|
229 | adding file changes | |
230 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
230 | added 9 changesets with 7 changes to 4 files (+1 heads) | |
231 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
231 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
232 |
|
232 | |||
233 | Create partial clones |
|
233 | Create partial clones | |
234 |
|
234 | |||
235 | $ rm -r empty |
|
235 | $ rm -r empty | |
236 | $ hg init empty |
|
236 | $ hg init empty | |
237 | $ hg clone -r 3 test partial |
|
237 | $ hg clone -r 3 test partial | |
238 | requesting all changes |
|
238 | requesting all changes | |
239 | adding changesets |
|
239 | adding changesets | |
240 | adding manifests |
|
240 | adding manifests | |
241 | adding file changes |
|
241 | adding file changes | |
242 | added 4 changesets with 4 changes to 1 files |
|
242 | added 4 changesets with 4 changes to 1 files | |
243 | updating to branch default |
|
243 | updating to branch default | |
244 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
244 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
245 | $ hg clone partial partial2 |
|
245 | $ hg clone partial partial2 | |
246 | updating to branch default |
|
246 | updating to branch default | |
247 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
247 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
248 | $ cd partial |
|
248 | $ cd partial | |
249 |
|
249 | |||
250 | Log -R full.hg in partial |
|
250 | Log -R full.hg in partial | |
251 |
|
251 | |||
252 | $ hg -R bundle://../full.hg log |
|
252 | $ hg -R bundle://../full.hg log | |
253 |
changeset: 8: |
|
253 | changeset: 8:aa35859c02ea | |
254 | tag: tip |
|
254 | tag: tip | |
255 |
parent: 3: |
|
255 | parent: 3:eebf5a27f8ca | |
256 | user: test |
|
256 | user: test | |
257 |
date: |
|
257 | date: Thu Jan 01 00:00:00 1970 +0000 | |
258 | summary: 0.3m |
|
258 | summary: 0.3m | |
259 |
|
259 | |||
260 |
changeset: 7: |
|
260 | changeset: 7:a6a34bfa0076 | |
261 | user: test |
|
261 | user: test | |
262 |
date: |
|
262 | date: Thu Jan 01 00:00:00 1970 +0000 | |
263 | summary: 1.3m |
|
263 | summary: 1.3m | |
264 |
|
264 | |||
265 |
changeset: 6: |
|
265 | changeset: 6:7373c1169842 | |
266 | user: test |
|
266 | user: test | |
267 |
date: |
|
267 | date: Thu Jan 01 00:00:00 1970 +0000 | |
268 | summary: 1.3 |
|
268 | summary: 1.3 | |
269 |
|
269 | |||
270 |
changeset: 5: |
|
270 | changeset: 5:1bb50a9436a7 | |
271 | user: test |
|
271 | user: test | |
272 |
date: |
|
272 | date: Thu Jan 01 00:00:00 1970 +0000 | |
273 | summary: 1.2 |
|
273 | summary: 1.2 | |
274 |
|
274 | |||
275 |
changeset: 4: |
|
275 | changeset: 4:095197eb4973 | |
276 |
parent: 0:56 |
|
276 | parent: 0:f9ee2f85a263 | |
277 | user: test |
|
277 | user: test | |
278 |
date: |
|
278 | date: Thu Jan 01 00:00:00 1970 +0000 | |
279 | summary: 1.1 |
|
279 | summary: 1.1 | |
280 |
|
280 | |||
281 |
changeset: 3: |
|
281 | changeset: 3:eebf5a27f8ca | |
282 | user: test |
|
282 | user: test | |
283 |
date: |
|
283 | date: Thu Jan 01 00:00:00 1970 +0000 | |
284 | summary: 0.3 |
|
284 | summary: 0.3 | |
285 |
|
285 | |||
286 |
changeset: 2: |
|
286 | changeset: 2:e38ba6f5b7e0 | |
287 | user: test |
|
287 | user: test | |
288 |
date: |
|
288 | date: Thu Jan 01 00:00:00 1970 +0000 | |
289 | summary: 0.2 |
|
289 | summary: 0.2 | |
290 |
|
290 | |||
291 |
changeset: 1: |
|
291 | changeset: 1:34c2bf6b0626 | |
292 | user: test |
|
292 | user: test | |
293 |
date: |
|
293 | date: Thu Jan 01 00:00:00 1970 +0000 | |
294 | summary: 0.1 |
|
294 | summary: 0.1 | |
295 |
|
295 | |||
296 |
changeset: 0:56 |
|
296 | changeset: 0:f9ee2f85a263 | |
297 | user: test |
|
297 | user: test | |
298 |
date: |
|
298 | date: Thu Jan 01 00:00:00 1970 +0000 | |
299 | summary: 0.0 |
|
299 | summary: 0.0 | |
300 |
|
300 | |||
301 |
|
301 | |||
302 | Incoming full.hg in partial |
|
302 | Incoming full.hg in partial | |
303 |
|
303 | |||
304 | $ hg incoming bundle://../full.hg |
|
304 | $ hg incoming bundle://../full.hg | |
305 | comparing with bundle://../full.hg |
|
305 | comparing with bundle://../full.hg | |
306 | searching for changes |
|
306 | searching for changes | |
307 |
changeset: 4: |
|
307 | changeset: 4:095197eb4973 | |
308 |
parent: 0:56 |
|
308 | parent: 0:f9ee2f85a263 | |
309 | user: test |
|
309 | user: test | |
310 |
date: |
|
310 | date: Thu Jan 01 00:00:00 1970 +0000 | |
311 | summary: 1.1 |
|
311 | summary: 1.1 | |
312 |
|
312 | |||
313 |
changeset: 5: |
|
313 | changeset: 5:1bb50a9436a7 | |
314 | user: test |
|
314 | user: test | |
315 |
date: |
|
315 | date: Thu Jan 01 00:00:00 1970 +0000 | |
316 | summary: 1.2 |
|
316 | summary: 1.2 | |
317 |
|
317 | |||
318 |
changeset: 6: |
|
318 | changeset: 6:7373c1169842 | |
319 | user: test |
|
319 | user: test | |
320 |
date: |
|
320 | date: Thu Jan 01 00:00:00 1970 +0000 | |
321 | summary: 1.3 |
|
321 | summary: 1.3 | |
322 |
|
322 | |||
323 |
changeset: 7: |
|
323 | changeset: 7:a6a34bfa0076 | |
324 | user: test |
|
324 | user: test | |
325 |
date: |
|
325 | date: Thu Jan 01 00:00:00 1970 +0000 | |
326 | summary: 1.3m |
|
326 | summary: 1.3m | |
327 |
|
327 | |||
328 |
changeset: 8: |
|
328 | changeset: 8:aa35859c02ea | |
329 | tag: tip |
|
329 | tag: tip | |
330 |
parent: 3: |
|
330 | parent: 3:eebf5a27f8ca | |
331 | user: test |
|
331 | user: test | |
332 |
date: |
|
332 | date: Thu Jan 01 00:00:00 1970 +0000 | |
333 | summary: 0.3m |
|
333 | summary: 0.3m | |
334 |
|
334 | |||
335 |
|
335 | |||
336 | Outgoing -R full.hg vs partial2 in partial |
|
336 | Outgoing -R full.hg vs partial2 in partial | |
337 |
|
337 | |||
338 | $ hg -R bundle://../full.hg outgoing ../partial2 |
|
338 | $ hg -R bundle://../full.hg outgoing ../partial2 | |
339 | comparing with ../partial2 |
|
339 | comparing with ../partial2 | |
340 | searching for changes |
|
340 | searching for changes | |
341 |
changeset: 4: |
|
341 | changeset: 4:095197eb4973 | |
342 |
parent: 0:56 |
|
342 | parent: 0:f9ee2f85a263 | |
343 | user: test |
|
343 | user: test | |
344 |
date: |
|
344 | date: Thu Jan 01 00:00:00 1970 +0000 | |
345 | summary: 1.1 |
|
345 | summary: 1.1 | |
346 |
|
346 | |||
347 |
changeset: 5: |
|
347 | changeset: 5:1bb50a9436a7 | |
348 | user: test |
|
348 | user: test | |
349 |
date: |
|
349 | date: Thu Jan 01 00:00:00 1970 +0000 | |
350 | summary: 1.2 |
|
350 | summary: 1.2 | |
351 |
|
351 | |||
352 |
changeset: 6: |
|
352 | changeset: 6:7373c1169842 | |
353 | user: test |
|
353 | user: test | |
354 |
date: |
|
354 | date: Thu Jan 01 00:00:00 1970 +0000 | |
355 | summary: 1.3 |
|
355 | summary: 1.3 | |
356 |
|
356 | |||
357 |
changeset: 7: |
|
357 | changeset: 7:a6a34bfa0076 | |
358 | user: test |
|
358 | user: test | |
359 |
date: |
|
359 | date: Thu Jan 01 00:00:00 1970 +0000 | |
360 | summary: 1.3m |
|
360 | summary: 1.3m | |
361 |
|
361 | |||
362 |
changeset: 8: |
|
362 | changeset: 8:aa35859c02ea | |
363 | tag: tip |
|
363 | tag: tip | |
364 |
parent: 3: |
|
364 | parent: 3:eebf5a27f8ca | |
365 | user: test |
|
365 | user: test | |
366 |
date: |
|
366 | date: Thu Jan 01 00:00:00 1970 +0000 | |
367 | summary: 0.3m |
|
367 | summary: 0.3m | |
368 |
|
368 | |||
369 |
|
369 | |||
370 | Outgoing -R does-not-exist.hg vs partial2 in partial |
|
370 | Outgoing -R does-not-exist.hg vs partial2 in partial | |
371 |
|
371 | |||
372 | $ hg -R bundle://../does-not-exist.hg outgoing ../partial2 |
|
372 | $ hg -R bundle://../does-not-exist.hg outgoing ../partial2 | |
373 | abort: No such file or directory: ../does-not-exist.hg |
|
373 | abort: No such file or directory: ../does-not-exist.hg | |
374 | $ cd .. |
|
374 | $ cd .. | |
375 |
|
375 | |||
376 | Direct clone from bundle (all-history) |
|
376 | Direct clone from bundle (all-history) | |
377 |
|
377 | |||
378 | $ hg clone full.hg full-clone |
|
378 | $ hg clone full.hg full-clone | |
379 | requesting all changes |
|
379 | requesting all changes | |
380 | adding changesets |
|
380 | adding changesets | |
381 | adding manifests |
|
381 | adding manifests | |
382 | adding file changes |
|
382 | adding file changes | |
383 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
383 | added 9 changesets with 7 changes to 4 files (+1 heads) | |
384 | updating to branch default |
|
384 | updating to branch default | |
385 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
385 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
386 | $ hg -R full-clone heads |
|
386 | $ hg -R full-clone heads | |
387 |
changeset: 8: |
|
387 | changeset: 8:aa35859c02ea | |
388 | tag: tip |
|
388 | tag: tip | |
389 |
parent: 3: |
|
389 | parent: 3:eebf5a27f8ca | |
390 | user: test |
|
390 | user: test | |
391 |
date: |
|
391 | date: Thu Jan 01 00:00:00 1970 +0000 | |
392 | summary: 0.3m |
|
392 | summary: 0.3m | |
393 |
|
393 | |||
394 |
changeset: 7: |
|
394 | changeset: 7:a6a34bfa0076 | |
395 | user: test |
|
395 | user: test | |
396 |
date: |
|
396 | date: Thu Jan 01 00:00:00 1970 +0000 | |
397 | summary: 1.3m |
|
397 | summary: 1.3m | |
398 |
|
398 | |||
399 | $ rm -r full-clone |
|
399 | $ rm -r full-clone | |
400 |
|
400 | |||
401 | test for http://mercurial.selenic.com/bts/issue216 |
|
401 | test for http://mercurial.selenic.com/bts/issue216 | |
402 |
|
402 | |||
403 | Unbundle incremental bundles into fresh empty in one go |
|
403 | Unbundle incremental bundles into fresh empty in one go | |
404 |
|
404 | |||
405 | $ rm -r empty |
|
405 | $ rm -r empty | |
406 | $ hg init empty |
|
406 | $ hg init empty | |
407 | $ hg -R test bundle --base null -r 0 ../0.hg |
|
407 | $ hg -R test bundle --base null -r 0 ../0.hg | |
408 | 1 changesets found |
|
408 | 1 changesets found | |
409 | $ hg -R test bundle --base 0 -r 1 ../1.hg |
|
409 | $ hg -R test bundle --base 0 -r 1 ../1.hg | |
410 | 1 changesets found |
|
410 | 1 changesets found | |
411 | $ hg -R empty unbundle -u ../0.hg ../1.hg |
|
411 | $ hg -R empty unbundle -u ../0.hg ../1.hg | |
412 | adding changesets |
|
412 | adding changesets | |
413 | adding manifests |
|
413 | adding manifests | |
414 | adding file changes |
|
414 | adding file changes | |
415 | added 1 changesets with 1 changes to 1 files |
|
415 | added 1 changesets with 1 changes to 1 files | |
416 | adding changesets |
|
416 | adding changesets | |
417 | adding manifests |
|
417 | adding manifests | |
418 | adding file changes |
|
418 | adding file changes | |
419 | added 1 changesets with 1 changes to 1 files |
|
419 | added 1 changesets with 1 changes to 1 files | |
420 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
420 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
421 |
|
421 | |||
422 | test for 540d1059c802 |
|
422 | test for 540d1059c802 | |
423 |
|
423 | |||
424 | test for 540d1059c802 |
|
424 | test for 540d1059c802 | |
425 |
|
425 | |||
426 | $ hg init orig |
|
426 | $ hg init orig | |
427 | $ cd orig |
|
427 | $ cd orig | |
428 | $ echo foo > foo |
|
428 | $ echo foo > foo | |
429 | $ hg add foo |
|
429 | $ hg add foo | |
430 | $ hg ci -m 'add foo' |
|
430 | $ hg ci -m 'add foo' | |
431 |
|
431 | |||
432 | $ hg clone . ../copy |
|
432 | $ hg clone . ../copy | |
433 | updating to branch default |
|
433 | updating to branch default | |
434 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
434 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
435 | $ hg tag foo |
|
435 | $ hg tag foo | |
436 |
|
436 | |||
437 | $ cd ../copy |
|
437 | $ cd ../copy | |
438 | $ echo >> foo |
|
438 | $ echo >> foo | |
439 | $ hg ci -m 'change foo' |
|
439 | $ hg ci -m 'change foo' | |
440 | $ hg bundle ../bundle.hg ../orig |
|
440 | $ hg bundle ../bundle.hg ../orig | |
441 | searching for changes |
|
441 | searching for changes | |
442 | 1 changesets found |
|
442 | 1 changesets found | |
443 |
|
443 | |||
444 | $ cd ../orig |
|
444 | $ cd ../orig | |
445 | $ hg incoming ../bundle.hg |
|
445 | $ hg incoming ../bundle.hg | |
446 | comparing with ../bundle.hg |
|
446 | comparing with ../bundle.hg | |
447 | searching for changes |
|
447 | searching for changes | |
448 | changeset: 2:ed1b79f46b9a |
|
448 | changeset: 2:ed1b79f46b9a | |
449 | tag: tip |
|
449 | tag: tip | |
450 | parent: 0:bbd179dfa0a7 |
|
450 | parent: 0:bbd179dfa0a7 | |
451 | user: test |
|
451 | user: test | |
452 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
452 | date: Thu Jan 01 00:00:00 1970 +0000 | |
453 | summary: change foo |
|
453 | summary: change foo | |
454 |
|
454 | |||
455 | $ cd .. |
|
455 | $ cd .. | |
456 |
|
456 | |||
457 | test for http://mercurial.selenic.com/bts/issue1144 |
|
457 | test for http://mercurial.selenic.com/bts/issue1144 | |
458 |
|
458 | |||
459 | test that verify bundle does not traceback |
|
459 | test that verify bundle does not traceback | |
460 |
|
460 | |||
461 | partial history bundle, fails w/ unkown parent |
|
461 | partial history bundle, fails w/ unkown parent | |
462 |
|
462 | |||
463 | $ hg -R bundle.hg verify |
|
463 | $ hg -R bundle.hg verify | |
464 | abort: 00changelog.i@bbd179dfa0a7: unknown parent! |
|
464 | abort: 00changelog.i@bbd179dfa0a7: unknown parent! | |
465 |
|
465 | |||
466 | full history bundle, refuses to verify non-local repo |
|
466 | full history bundle, refuses to verify non-local repo | |
467 |
|
467 | |||
468 | $ hg -R all.hg verify |
|
468 | $ hg -R all.hg verify | |
469 | abort: cannot verify bundle or remote repos |
|
469 | abort: cannot verify bundle or remote repos | |
470 |
|
470 | |||
471 | but, regular verify must continue to work |
|
471 | but, regular verify must continue to work | |
472 |
|
472 | |||
473 | $ hg -R orig verify |
|
473 | $ hg -R orig verify | |
474 | checking changesets |
|
474 | checking changesets | |
475 | checking manifests |
|
475 | checking manifests | |
476 | crosschecking files in changesets and manifests |
|
476 | crosschecking files in changesets and manifests | |
477 | checking files |
|
477 | checking files | |
478 | 2 files, 2 changesets, 2 total revisions |
|
478 | 2 files, 2 changesets, 2 total revisions | |
479 |
|
479 | |||
480 | diff against bundle |
|
480 | diff against bundle | |
481 |
|
481 | |||
482 | $ hg init b |
|
482 | $ hg init b | |
483 | $ cd b |
|
483 | $ cd b | |
484 | $ hg -R ../all.hg diff -r tip |
|
484 | $ hg -R ../all.hg diff -r tip | |
485 |
diff -r |
|
485 | diff -r aa35859c02ea anotherfile | |
486 |
--- a/anotherfile |
|
486 | --- a/anotherfile Thu Jan 01 00:00:00 1970 +0000 | |
487 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
487 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
488 | @@ -1,4 +0,0 @@ |
|
488 | @@ -1,4 +0,0 @@ | |
489 | -0 |
|
489 | -0 | |
490 | -1 |
|
490 | -1 | |
491 | -2 |
|
491 | -2 | |
492 | -3 |
|
492 | -3 | |
493 | $ cd .. |
|
493 | $ cd .. | |
494 |
|
494 | |||
495 | bundle single branch |
|
495 | bundle single branch | |
496 |
|
496 | |||
497 | $ hg init branchy |
|
497 | $ hg init branchy | |
498 | $ cd branchy |
|
498 | $ cd branchy | |
499 | $ echo a >a |
|
499 | $ echo a >a | |
500 | $ hg ci -Ama |
|
500 | $ hg ci -Ama | |
501 | adding a |
|
501 | adding a | |
502 | $ echo b >b |
|
502 | $ echo b >b | |
503 | $ hg ci -Amb |
|
503 | $ hg ci -Amb | |
504 | adding b |
|
504 | adding b | |
505 | $ echo b1 >b1 |
|
505 | $ echo b1 >b1 | |
506 | $ hg ci -Amb1 |
|
506 | $ hg ci -Amb1 | |
507 | adding b1 |
|
507 | adding b1 | |
508 | $ hg up 0 |
|
508 | $ hg up 0 | |
509 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
509 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
510 | $ echo c >c |
|
510 | $ echo c >c | |
511 | $ hg ci -Amc |
|
511 | $ hg ci -Amc | |
512 | adding c |
|
512 | adding c | |
513 | created new head |
|
513 | created new head | |
514 | $ echo c1 >c1 |
|
514 | $ echo c1 >c1 | |
515 | $ hg ci -Amc1 |
|
515 | $ hg ci -Amc1 | |
516 | adding c1 |
|
516 | adding c1 | |
517 | $ hg clone -q .#tip part |
|
517 | $ hg clone -q .#tip part | |
518 |
|
518 | |||
519 | == bundling via incoming |
|
519 | == bundling via incoming | |
520 |
|
520 | |||
521 | $ hg in -R part --bundle incoming.hg --template "{node}\n" . |
|
521 | $ hg in -R part --bundle incoming.hg --template "{node}\n" . | |
522 | comparing with . |
|
522 | comparing with . | |
523 | searching for changes |
|
523 | searching for changes | |
524 | d2ae7f538514cd87c17547b0de4cea71fe1af9fb |
|
524 | d2ae7f538514cd87c17547b0de4cea71fe1af9fb | |
525 | 5ece8e77363e2b5269e27c66828b72da29e4341a |
|
525 | 5ece8e77363e2b5269e27c66828b72da29e4341a | |
526 |
|
526 | |||
527 | == bundling |
|
527 | == bundling | |
528 |
|
528 | |||
529 | $ hg bundle bundle.hg part --debug |
|
529 | $ hg bundle bundle.hg part --debug | |
530 | searching for changes |
|
530 | searching for changes | |
531 | common changesets up to c0025332f9ed |
|
531 | common changesets up to c0025332f9ed | |
532 | 2 changesets found |
|
532 | 2 changesets found | |
533 | list of changesets: |
|
533 | list of changesets: | |
534 | d2ae7f538514cd87c17547b0de4cea71fe1af9fb |
|
534 | d2ae7f538514cd87c17547b0de4cea71fe1af9fb | |
535 | 5ece8e77363e2b5269e27c66828b72da29e4341a |
|
535 | 5ece8e77363e2b5269e27c66828b72da29e4341a | |
536 | bundling changes: 0 chunks |
|
536 | bundling changes: 0 chunks | |
537 | bundling changes: 1 chunks |
|
537 | bundling changes: 1 chunks | |
538 | bundling changes: 2 chunks |
|
538 | bundling changes: 2 chunks | |
539 | bundling changes: 3 chunks |
|
539 | bundling changes: 3 chunks | |
540 | bundling changes: 4 chunks |
|
540 | bundling changes: 4 chunks | |
541 | bundling changes: 5 chunks |
|
541 | bundling changes: 5 chunks | |
542 | bundling changes: 6 chunks |
|
542 | bundling changes: 6 chunks | |
543 | bundling manifests: 0 chunks |
|
543 | bundling manifests: 0 chunks | |
544 | bundling manifests: 1 chunks |
|
544 | bundling manifests: 1 chunks | |
545 | bundling manifests: 2 chunks |
|
545 | bundling manifests: 2 chunks | |
546 | bundling manifests: 3 chunks |
|
546 | bundling manifests: 3 chunks | |
547 | bundling manifests: 4 chunks |
|
547 | bundling manifests: 4 chunks | |
548 | bundling manifests: 5 chunks |
|
548 | bundling manifests: 5 chunks | |
549 | bundling manifests: 6 chunks |
|
549 | bundling manifests: 6 chunks | |
550 | bundling files: b 0 chunks |
|
550 | bundling files: b 0 chunks | |
551 | bundling files: b 1 chunks |
|
551 | bundling files: b 1 chunks | |
552 | bundling files: b 2 chunks |
|
552 | bundling files: b 2 chunks | |
553 | bundling files: b 3 chunks |
|
553 | bundling files: b 3 chunks | |
554 | bundling files: b1 4 chunks |
|
554 | bundling files: b1 4 chunks | |
555 | bundling files: b1 5 chunks |
|
555 | bundling files: b1 5 chunks | |
556 | bundling files: b1 6 chunks |
|
556 | bundling files: b1 6 chunks | |
557 | bundling files: b1 7 chunks |
|
557 | bundling files: b1 7 chunks | |
558 |
|
558 |
@@ -1,24 +1,22 b'' | |||||
1 | $ mkdir t |
|
|||
2 | $ cd t |
|
|||
3 |
|
|
1 | $ hg init | |
4 | $ echo 0 > a |
|
2 | $ echo 0 > a | |
5 | $ echo 0 > b |
|
3 | $ echo 0 > b | |
6 |
$ hg ci -A -m m |
|
4 | $ hg ci -A -m m | |
7 | adding a |
|
5 | adding a | |
8 | adding b |
|
6 | adding b | |
9 | $ hg rm a |
|
7 | $ hg rm a | |
10 | $ hg cat a |
|
8 | $ hg cat a | |
11 | 0 |
|
9 | 0 | |
12 | $ hg cat --decode a # more tests in test-encode |
|
10 | $ hg cat --decode a # more tests in test-encode | |
13 | 0 |
|
11 | 0 | |
14 | $ echo 1 > b |
|
12 | $ echo 1 > b | |
15 |
$ hg ci -m m |
|
13 | $ hg ci -m m | |
16 |
$ |
|
14 | $ echo 2 > b | |
17 |
$ |
|
15 | $ hg cat -r 0 a | |
18 | 0 |
|
16 | 0 | |
19 | $ hg cat -r 0 b |
|
17 | $ hg cat -r 0 b | |
20 | 0 |
|
18 | 0 | |
21 | $ hg cat -r 1 a |
|
19 | $ hg cat -r 1 a | |
22 |
a: no such file in rev |
|
20 | a: no such file in rev 7040230c159c | |
23 | $ hg cat -r 1 b |
|
21 | $ hg cat -r 1 b | |
24 | 1 |
|
22 | 1 |
@@ -1,253 +1,253 b'' | |||||
1 | commit date test |
|
1 | commit date test | |
2 |
|
2 | |||
3 | $ hg init test |
|
3 | $ hg init test | |
4 | $ cd test |
|
4 | $ cd test | |
5 | $ echo foo > foo |
|
5 | $ echo foo > foo | |
6 | $ hg add foo |
|
6 | $ hg add foo | |
7 | $ HGEDITOR=true hg commit -m "" |
|
7 | $ HGEDITOR=true hg commit -m "" | |
8 | abort: empty commit message |
|
8 | abort: empty commit message | |
9 | $ hg commit -d '0 0' -m commit-1 |
|
9 | $ hg commit -d '0 0' -m commit-1 | |
10 | $ echo foo >> foo |
|
10 | $ echo foo >> foo | |
11 | $ hg commit -d '1 4444444' -m commit-3 |
|
11 | $ hg commit -d '1 4444444' -m commit-3 | |
12 | abort: impossible time zone offset: 4444444 |
|
12 | abort: impossible time zone offset: 4444444 | |
13 | $ hg commit -d '1 15.1' -m commit-4 |
|
13 | $ hg commit -d '1 15.1' -m commit-4 | |
14 | abort: invalid date: '1\t15.1' |
|
14 | abort: invalid date: '1\t15.1' | |
15 | $ hg commit -d 'foo bar' -m commit-5 |
|
15 | $ hg commit -d 'foo bar' -m commit-5 | |
16 | abort: invalid date: 'foo bar' |
|
16 | abort: invalid date: 'foo bar' | |
17 | $ hg commit -d ' 1 4444' -m commit-6 |
|
17 | $ hg commit -d ' 1 4444' -m commit-6 | |
18 | $ hg commit -d '111111111111 0' -m commit-7 |
|
18 | $ hg commit -d '111111111111 0' -m commit-7 | |
19 | abort: date exceeds 32 bits: 111111111111 |
|
19 | abort: date exceeds 32 bits: 111111111111 | |
20 |
|
20 | |||
21 | commit added file that has been deleted |
|
21 | commit added file that has been deleted | |
22 |
|
22 | |||
23 | $ echo bar > bar |
|
23 | $ echo bar > bar | |
24 | $ hg add bar |
|
24 | $ hg add bar | |
25 | $ rm bar |
|
25 | $ rm bar | |
26 |
$ hg commit - |
|
26 | $ hg commit -m commit-8 | |
27 | nothing changed |
|
27 | nothing changed | |
28 |
$ hg commit |
|
28 | $ hg commit -m commit-8-2 bar | |
29 | abort: bar: file not found! |
|
29 | abort: bar: file not found! | |
30 |
|
30 | |||
31 | $ hg -q revert -a --no-backup |
|
31 | $ hg -q revert -a --no-backup | |
32 |
|
32 | |||
33 | $ mkdir dir |
|
33 | $ mkdir dir | |
34 | $ echo boo > dir/file |
|
34 | $ echo boo > dir/file | |
35 | $ hg add |
|
35 | $ hg add | |
36 | adding dir/file |
|
36 | adding dir/file | |
37 | $ hg -v commit -m commit-9 dir |
|
37 | $ hg -v commit -m commit-9 dir | |
38 | dir/file |
|
38 | dir/file | |
39 | committed changeset 2:d2a76177cb42 |
|
39 | committed changeset 2:d2a76177cb42 | |
40 |
|
40 | |||
41 | $ echo > dir.file |
|
41 | $ echo > dir.file | |
42 | $ hg add |
|
42 | $ hg add | |
43 | adding dir.file |
|
43 | adding dir.file | |
44 | $ hg commit -m commit-10 dir dir.file |
|
44 | $ hg commit -m commit-10 dir dir.file | |
45 | abort: dir: no match under directory! |
|
45 | abort: dir: no match under directory! | |
46 |
|
46 | |||
47 | $ echo >> dir/file |
|
47 | $ echo >> dir/file | |
48 | $ mkdir bleh |
|
48 | $ mkdir bleh | |
49 | $ mkdir dir2 |
|
49 | $ mkdir dir2 | |
50 | $ cd bleh |
|
50 | $ cd bleh | |
51 | $ hg commit -m commit-11 . |
|
51 | $ hg commit -m commit-11 . | |
52 | abort: bleh: no match under directory! |
|
52 | abort: bleh: no match under directory! | |
53 | $ hg commit -m commit-12 ../dir ../dir2 |
|
53 | $ hg commit -m commit-12 ../dir ../dir2 | |
54 | abort: dir2: no match under directory! |
|
54 | abort: dir2: no match under directory! | |
55 | $ hg -v commit -m commit-13 ../dir |
|
55 | $ hg -v commit -m commit-13 ../dir | |
56 | dir/file |
|
56 | dir/file | |
57 | committed changeset 3:1cd62a2d8db5 |
|
57 | committed changeset 3:1cd62a2d8db5 | |
58 | $ cd .. |
|
58 | $ cd .. | |
59 |
|
59 | |||
60 | $ hg commit -m commit-14 does-not-exist |
|
60 | $ hg commit -m commit-14 does-not-exist | |
61 | abort: does-not-exist: No such file or directory |
|
61 | abort: does-not-exist: No such file or directory | |
62 | $ ln -s foo baz |
|
62 | $ ln -s foo baz | |
63 | $ hg commit -m commit-15 baz |
|
63 | $ hg commit -m commit-15 baz | |
64 | abort: baz: file not tracked! |
|
64 | abort: baz: file not tracked! | |
65 | $ touch quux |
|
65 | $ touch quux | |
66 | $ hg commit -m commit-16 quux |
|
66 | $ hg commit -m commit-16 quux | |
67 | abort: quux: file not tracked! |
|
67 | abort: quux: file not tracked! | |
68 | $ echo >> dir/file |
|
68 | $ echo >> dir/file | |
69 | $ hg -v commit -m commit-17 dir/file |
|
69 | $ hg -v commit -m commit-17 dir/file | |
70 | dir/file |
|
70 | dir/file | |
71 | committed changeset 4:49176991390e |
|
71 | committed changeset 4:49176991390e | |
72 |
|
72 | |||
73 | An empty date was interpreted as epoch origin |
|
73 | An empty date was interpreted as epoch origin | |
74 |
|
74 | |||
75 | $ echo foo >> foo |
|
75 | $ echo foo >> foo | |
76 | $ hg commit -d '' -m commit-no-date |
|
76 | $ hg commit -d '' -m commit-no-date | |
77 | $ hg tip --template '{date|isodate}\n' | grep '1970' |
|
77 | $ hg tip --template '{date|isodate}\n' | grep '1970' | |
78 | $ cd .. |
|
78 | $ cd .. | |
79 |
|
79 | |||
80 |
|
80 | |||
81 | partial subdir commit test |
|
81 | partial subdir commit test | |
82 |
|
82 | |||
83 | $ hg init test2 |
|
83 | $ hg init test2 | |
84 | $ cd test2 |
|
84 | $ cd test2 | |
85 | $ mkdir foo |
|
85 | $ mkdir foo | |
86 | $ echo foo > foo/foo |
|
86 | $ echo foo > foo/foo | |
87 | $ mkdir bar |
|
87 | $ mkdir bar | |
88 | $ echo bar > bar/bar |
|
88 | $ echo bar > bar/bar | |
89 | $ hg add |
|
89 | $ hg add | |
90 | adding bar/bar |
|
90 | adding bar/bar | |
91 | adding foo/foo |
|
91 | adding foo/foo | |
92 |
$ hg ci |
|
92 | $ hg ci -m commit-subdir-1 foo | |
93 |
$ hg ci |
|
93 | $ hg ci -m commit-subdir-2 bar | |
94 |
|
94 | |||
95 | subdir log 1 |
|
95 | subdir log 1 | |
96 |
|
96 | |||
97 | $ hg log -v foo |
|
97 | $ hg log -v foo | |
98 |
changeset: 0: |
|
98 | changeset: 0:f97e73a25882 | |
99 | user: test |
|
99 | user: test | |
100 |
date: |
|
100 | date: Thu Jan 01 00:00:00 1970 +0000 | |
101 | files: foo/foo |
|
101 | files: foo/foo | |
102 | description: |
|
102 | description: | |
103 | commit-subdir-1 |
|
103 | commit-subdir-1 | |
104 |
|
104 | |||
105 |
|
105 | |||
106 |
|
106 | |||
107 | subdir log 2 |
|
107 | subdir log 2 | |
108 |
|
108 | |||
109 | $ hg log -v bar |
|
109 | $ hg log -v bar | |
110 |
changeset: 1: |
|
110 | changeset: 1:aa809156d50d | |
111 | tag: tip |
|
111 | tag: tip | |
112 | user: test |
|
112 | user: test | |
113 |
date: |
|
113 | date: Thu Jan 01 00:00:00 1970 +0000 | |
114 | files: bar/bar |
|
114 | files: bar/bar | |
115 | description: |
|
115 | description: | |
116 | commit-subdir-2 |
|
116 | commit-subdir-2 | |
117 |
|
117 | |||
118 |
|
118 | |||
119 |
|
119 | |||
120 | full log |
|
120 | full log | |
121 |
|
121 | |||
122 | $ hg log -v |
|
122 | $ hg log -v | |
123 |
changeset: 1: |
|
123 | changeset: 1:aa809156d50d | |
124 | tag: tip |
|
124 | tag: tip | |
125 | user: test |
|
125 | user: test | |
126 |
date: |
|
126 | date: Thu Jan 01 00:00:00 1970 +0000 | |
127 | files: bar/bar |
|
127 | files: bar/bar | |
128 | description: |
|
128 | description: | |
129 | commit-subdir-2 |
|
129 | commit-subdir-2 | |
130 |
|
130 | |||
131 |
|
131 | |||
132 |
changeset: 0: |
|
132 | changeset: 0:f97e73a25882 | |
133 | user: test |
|
133 | user: test | |
134 |
date: |
|
134 | date: Thu Jan 01 00:00:00 1970 +0000 | |
135 | files: foo/foo |
|
135 | files: foo/foo | |
136 | description: |
|
136 | description: | |
137 | commit-subdir-1 |
|
137 | commit-subdir-1 | |
138 |
|
138 | |||
139 |
|
139 | |||
140 | $ cd .. |
|
140 | $ cd .. | |
141 |
|
141 | |||
142 |
|
142 | |||
143 | dot and subdir commit test |
|
143 | dot and subdir commit test | |
144 |
|
144 | |||
145 | $ hg init test3 |
|
145 | $ hg init test3 | |
146 | $ cd test3 |
|
146 | $ cd test3 | |
147 | $ mkdir foo |
|
147 | $ mkdir foo | |
148 | $ echo foo content > foo/plain-file |
|
148 | $ echo foo content > foo/plain-file | |
149 | $ hg add foo/plain-file |
|
149 | $ hg add foo/plain-file | |
150 |
$ hg ci |
|
150 | $ hg ci -m commit-foo-subdir foo | |
151 | $ echo modified foo content > foo/plain-file |
|
151 | $ echo modified foo content > foo/plain-file | |
152 |
$ hg ci |
|
152 | $ hg ci -m commit-foo-dot . | |
153 |
|
153 | |||
154 | full log |
|
154 | full log | |
155 |
|
155 | |||
156 | $ hg log -v |
|
156 | $ hg log -v | |
157 |
changeset: 1: |
|
157 | changeset: 1:95b38e3a5b2e | |
158 | tag: tip |
|
158 | tag: tip | |
159 | user: test |
|
159 | user: test | |
160 |
date: |
|
160 | date: Thu Jan 01 00:00:00 1970 +0000 | |
161 | files: foo/plain-file |
|
161 | files: foo/plain-file | |
162 | description: |
|
162 | description: | |
163 | commit-foo-dot |
|
163 | commit-foo-dot | |
164 |
|
164 | |||
165 |
|
165 | |||
166 |
changeset: 0: |
|
166 | changeset: 0:65d4e9386227 | |
167 | user: test |
|
167 | user: test | |
168 |
date: |
|
168 | date: Thu Jan 01 00:00:00 1970 +0000 | |
169 | files: foo/plain-file |
|
169 | files: foo/plain-file | |
170 | description: |
|
170 | description: | |
171 | commit-foo-subdir |
|
171 | commit-foo-subdir | |
172 |
|
172 | |||
173 |
|
173 | |||
174 |
|
174 | |||
175 | subdir log |
|
175 | subdir log | |
176 |
|
176 | |||
177 | $ cd foo |
|
177 | $ cd foo | |
178 | $ hg log . |
|
178 | $ hg log . | |
179 |
changeset: 1: |
|
179 | changeset: 1:95b38e3a5b2e | |
180 | tag: tip |
|
180 | tag: tip | |
181 | user: test |
|
181 | user: test | |
182 |
date: |
|
182 | date: Thu Jan 01 00:00:00 1970 +0000 | |
183 | summary: commit-foo-dot |
|
183 | summary: commit-foo-dot | |
184 |
|
184 | |||
185 |
changeset: 0: |
|
185 | changeset: 0:65d4e9386227 | |
186 | user: test |
|
186 | user: test | |
187 |
date: |
|
187 | date: Thu Jan 01 00:00:00 1970 +0000 | |
188 | summary: commit-foo-subdir |
|
188 | summary: commit-foo-subdir | |
189 |
|
189 | |||
190 | $ cd .. |
|
190 | $ cd .. | |
191 | $ cd .. |
|
191 | $ cd .. | |
192 |
|
192 | |||
193 | $ cd .. |
|
193 | $ cd .. | |
194 | $ hg init issue1049 |
|
194 | $ hg init issue1049 | |
195 | $ cd issue1049 |
|
195 | $ cd issue1049 | |
196 | $ echo a > a |
|
196 | $ echo a > a | |
197 | $ hg ci -Ama |
|
197 | $ hg ci -Ama | |
198 | adding a |
|
198 | adding a | |
199 | $ echo a >> a |
|
199 | $ echo a >> a | |
200 | $ hg ci -mb |
|
200 | $ hg ci -mb | |
201 | $ hg up 0 |
|
201 | $ hg up 0 | |
202 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
202 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
203 | $ echo b >> a |
|
203 | $ echo b >> a | |
204 | $ hg ci -mc |
|
204 | $ hg ci -mc | |
205 | created new head |
|
205 | created new head | |
206 | $ HGMERGE=true hg merge |
|
206 | $ HGMERGE=true hg merge | |
207 | merging a |
|
207 | merging a | |
208 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
208 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
209 | (branch merge, don't forget to commit) |
|
209 | (branch merge, don't forget to commit) | |
210 |
|
210 | |||
211 | should fail because we are specifying a file name |
|
211 | should fail because we are specifying a file name | |
212 |
|
212 | |||
213 | $ hg ci -mmerge a |
|
213 | $ hg ci -mmerge a | |
214 | abort: cannot partially commit a merge (do not specify files or patterns) |
|
214 | abort: cannot partially commit a merge (do not specify files or patterns) | |
215 |
|
215 | |||
216 | should fail because we are specifying a pattern |
|
216 | should fail because we are specifying a pattern | |
217 |
|
217 | |||
218 | $ hg ci -mmerge -I a |
|
218 | $ hg ci -mmerge -I a | |
219 | abort: cannot partially commit a merge (do not specify files or patterns) |
|
219 | abort: cannot partially commit a merge (do not specify files or patterns) | |
220 |
|
220 | |||
221 | should succeed |
|
221 | should succeed | |
222 |
|
222 | |||
223 | $ hg ci -mmerge |
|
223 | $ hg ci -mmerge | |
224 | $ cd .. |
|
224 | $ cd .. | |
225 |
|
225 | |||
226 |
|
226 | |||
227 | test commit message content |
|
227 | test commit message content | |
228 |
|
228 | |||
229 | $ hg init commitmsg |
|
229 | $ hg init commitmsg | |
230 | $ cd commitmsg |
|
230 | $ cd commitmsg | |
231 | $ echo changed > changed |
|
231 | $ echo changed > changed | |
232 | $ echo removed > removed |
|
232 | $ echo removed > removed | |
233 | $ hg ci -qAm init |
|
233 | $ hg ci -qAm init | |
234 |
|
234 | |||
235 | $ hg rm removed |
|
235 | $ hg rm removed | |
236 | $ echo changed >> changed |
|
236 | $ echo changed >> changed | |
237 | $ echo added > added |
|
237 | $ echo added > added | |
238 | $ hg add added |
|
238 | $ hg add added | |
239 | $ HGEDITOR=cat hg ci -A |
|
239 | $ HGEDITOR=cat hg ci -A | |
240 |
|
240 | |||
241 |
|
241 | |||
242 | HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
242 | HG: Enter commit message. Lines beginning with 'HG:' are removed. | |
243 | HG: Leave message empty to abort commit. |
|
243 | HG: Leave message empty to abort commit. | |
244 | HG: -- |
|
244 | HG: -- | |
245 | HG: user: test |
|
245 | HG: user: test | |
246 | HG: branch 'default' |
|
246 | HG: branch 'default' | |
247 | HG: added added |
|
247 | HG: added added | |
248 | HG: changed changed |
|
248 | HG: changed changed | |
249 | HG: removed removed |
|
249 | HG: removed removed | |
250 | abort: empty commit message |
|
250 | abort: empty commit message | |
251 | $ cd .. |
|
251 | $ cd .. | |
252 |
|
252 | |||
253 | $ exit 0 |
|
253 | $ exit 0 |
@@ -1,63 +1,63 b'' | |||||
1 | $ unset HGUSER |
|
1 | $ unset HGUSER | |
2 | $ EMAIL="My Name <myname@example.com>" |
|
2 | $ EMAIL="My Name <myname@example.com>" | |
3 | $ export EMAIL |
|
3 | $ export EMAIL | |
4 |
|
4 | |||
5 | $ hg init test |
|
5 | $ hg init test | |
6 | $ cd test |
|
6 | $ cd test | |
7 | $ touch asdf |
|
7 | $ touch asdf | |
8 | $ hg add asdf |
|
8 | $ hg add asdf | |
9 |
$ hg commit - |
|
9 | $ hg commit -m commit-1 | |
10 | $ hg tip |
|
10 | $ hg tip | |
11 |
changeset: 0: |
|
11 | changeset: 0:53f268a58230 | |
12 | tag: tip |
|
12 | tag: tip | |
13 | user: My Name <myname@example.com> |
|
13 | user: My Name <myname@example.com> | |
14 |
date: |
|
14 | date: Thu Jan 01 00:00:00 1970 +0000 | |
15 | summary: commit-1 |
|
15 | summary: commit-1 | |
16 |
|
16 | |||
17 |
|
17 | |||
18 | $ unset EMAIL |
|
18 | $ unset EMAIL | |
19 | $ echo 1234 > asdf |
|
19 | $ echo 1234 > asdf | |
20 |
$ hg commit |
|
20 | $ hg commit -u "foo@bar.com" -m commit-1 | |
21 | $ hg tip |
|
21 | $ hg tip | |
22 |
changeset: 1: |
|
22 | changeset: 1:3871b2a9e9bf | |
23 | tag: tip |
|
23 | tag: tip | |
24 | user: foo@bar.com |
|
24 | user: foo@bar.com | |
25 |
date: |
|
25 | date: Thu Jan 01 00:00:00 1970 +0000 | |
26 | summary: commit-1 |
|
26 | summary: commit-1 | |
27 |
|
27 | |||
28 | $ echo "[ui]" >> .hg/hgrc |
|
28 | $ echo "[ui]" >> .hg/hgrc | |
29 | $ echo "username = foobar <foo@bar.com>" >> .hg/hgrc |
|
29 | $ echo "username = foobar <foo@bar.com>" >> .hg/hgrc | |
30 | $ echo 12 > asdf |
|
30 | $ echo 12 > asdf | |
31 |
$ hg commit - |
|
31 | $ hg commit -m commit-1 | |
32 | $ hg tip |
|
32 | $ hg tip | |
33 |
changeset: 2: |
|
33 | changeset: 2:8eeac6695c1c | |
34 | tag: tip |
|
34 | tag: tip | |
35 | user: foobar <foo@bar.com> |
|
35 | user: foobar <foo@bar.com> | |
36 |
date: |
|
36 | date: Thu Jan 01 00:00:00 1970 +0000 | |
37 | summary: commit-1 |
|
37 | summary: commit-1 | |
38 |
|
38 | |||
39 | $ echo 1 > asdf |
|
39 | $ echo 1 > asdf | |
40 |
$ hg commit |
|
40 | $ hg commit -u "foo@bar.com" -m commit-1 | |
41 | $ hg tip |
|
41 | $ hg tip | |
42 |
changeset: 3: |
|
42 | changeset: 3:957606a725e4 | |
43 | tag: tip |
|
43 | tag: tip | |
44 | user: foo@bar.com |
|
44 | user: foo@bar.com | |
45 |
date: |
|
45 | date: Thu Jan 01 00:00:00 1970 +0000 | |
46 | summary: commit-1 |
|
46 | summary: commit-1 | |
47 |
|
47 | |||
48 | $ echo 123 > asdf |
|
48 | $ echo 123 > asdf | |
49 | $ echo "[ui]" > .hg/hgrc |
|
49 | $ echo "[ui]" > .hg/hgrc | |
50 | $ echo "username = " >> .hg/hgrc |
|
50 | $ echo "username = " >> .hg/hgrc | |
51 |
$ hg commit - |
|
51 | $ hg commit -m commit-1 | |
52 | abort: no username supplied (see "hg help config") |
|
52 | abort: no username supplied (see "hg help config") | |
53 | $ rm .hg/hgrc |
|
53 | $ rm .hg/hgrc | |
54 |
$ hg commit |
|
54 | $ hg commit -m commit-1 2>&1 | |
55 | No username found, using '[^']*' instead |
|
55 | No username found, using '[^']*' instead | |
56 |
|
56 | |||
57 | $ echo space > asdf |
|
57 | $ echo space > asdf | |
58 |
$ hg commit - |
|
58 | $ hg commit -u ' ' -m commit-1 | |
59 | transaction abort! |
|
59 | transaction abort! | |
60 | rollback completed |
|
60 | rollback completed | |
61 | abort: empty username! |
|
61 | abort: empty username! | |
62 |
|
62 | |||
63 | $ true |
|
63 | $ true |
@@ -1,32 +1,32 b'' | |||||
1 | $ hg init |
|
1 | $ hg init | |
2 | $ echo "nothing" > a |
|
2 | $ echo "nothing" > a | |
3 | $ hg add a |
|
3 | $ hg add a | |
4 |
$ hg commit -m ancestor |
|
4 | $ hg commit -m ancestor | |
5 |
$ |
|
5 | $ echo "something" > a | |
6 |
$ |
|
6 | $ hg commit -m branch1 | |
7 |
$ |
|
7 | $ hg co 0 | |
8 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
8 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
9 | $ echo "something else" > a |
|
9 | $ echo "something else" > a | |
10 |
$ hg commit -m branch2 |
|
10 | $ hg commit -m branch2 | |
11 | created new head |
|
11 | created new head | |
12 |
|
12 | |||
13 | $ hg merge 1 |
|
13 | $ hg merge 1 | |
14 | merging a |
|
14 | merging a | |
15 | warning: conflicts during merge. |
|
15 | warning: conflicts during merge. | |
16 | merging a failed! |
|
16 | merging a failed! | |
17 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
17 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
18 | use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon |
|
18 | use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon | |
19 |
|
19 | |||
20 | $ hg id |
|
20 | $ hg id | |
21 | e7fe8eb3e180+0d24b7662d3e+ tip |
|
21 | 32e80765d7fe+75234512624c+ tip | |
22 |
|
22 | |||
23 | $ cat a |
|
23 | $ cat a | |
24 | <<<<<<< local |
|
24 | <<<<<<< local | |
25 | something else |
|
25 | something else | |
26 | ======= |
|
26 | ======= | |
27 | something |
|
27 | something | |
28 | >>>>>>> other |
|
28 | >>>>>>> other | |
29 |
|
29 | |||
30 | $ hg status |
|
30 | $ hg status | |
31 | M a |
|
31 | M a | |
32 | ? a.orig |
|
32 | ? a.orig |
@@ -1,55 +1,55 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | hg init |
|
3 | hg init | |
4 | echo foo > a |
|
4 | echo foo > a | |
5 | hg add a |
|
5 | hg add a | |
6 |
hg commit -m "1" |
|
6 | hg commit -m "1" | |
7 |
|
7 | |||
8 | echo bar > b |
|
8 | echo bar > b | |
9 | hg add b |
|
9 | hg add b | |
10 | hg remove a |
|
10 | hg remove a | |
11 |
|
11 | |||
12 | echo "%%% should show a removed and b added" |
|
12 | echo "%%% should show a removed and b added" | |
13 | hg status |
|
13 | hg status | |
14 |
|
14 | |||
15 | echo "reverting..." |
|
15 | echo "reverting..." | |
16 | hg revert --all |
|
16 | hg revert --all | |
17 |
|
17 | |||
18 | echo "%%% should show b unknown and a back to normal" |
|
18 | echo "%%% should show b unknown and a back to normal" | |
19 | hg status |
|
19 | hg status | |
20 |
|
20 | |||
21 | rm b |
|
21 | rm b | |
22 |
|
22 | |||
23 | hg co -C 0 |
|
23 | hg co -C 0 | |
24 | echo foo-a > a |
|
24 | echo foo-a > a | |
25 |
hg commit -m "2a" |
|
25 | hg commit -m "2a" | |
26 |
|
26 | |||
27 | hg co -C 0 |
|
27 | hg co -C 0 | |
28 | echo foo-b > a |
|
28 | echo foo-b > a | |
29 |
hg commit -m "2b" |
|
29 | hg commit -m "2b" | |
30 |
|
30 | |||
31 | HGMERGE=true hg merge 1 |
|
31 | HGMERGE=true hg merge 1 | |
32 |
|
32 | |||
33 | echo "%%% should show foo-b" |
|
33 | echo "%%% should show foo-b" | |
34 | cat a |
|
34 | cat a | |
35 |
|
35 | |||
36 | echo bar > b |
|
36 | echo bar > b | |
37 | hg add b |
|
37 | hg add b | |
38 | rm a |
|
38 | rm a | |
39 | hg remove a |
|
39 | hg remove a | |
40 |
|
40 | |||
41 | echo "%%% should show a removed and b added" |
|
41 | echo "%%% should show a removed and b added" | |
42 | hg status |
|
42 | hg status | |
43 |
|
43 | |||
44 | echo "%%% revert should fail" |
|
44 | echo "%%% revert should fail" | |
45 | hg revert --all |
|
45 | hg revert --all | |
46 |
|
46 | |||
47 | echo "%%% revert should be ok now" |
|
47 | echo "%%% revert should be ok now" | |
48 | hg revert -r2 --all |
|
48 | hg revert -r2 --all | |
49 |
|
49 | |||
50 | echo "%%% should show b unknown and a marked modified (merged)" |
|
50 | echo "%%% should show b unknown and a marked modified (merged)" | |
51 | hg status |
|
51 | hg status | |
52 |
|
52 | |||
53 | echo "%%% should show foo-b" |
|
53 | echo "%%% should show foo-b" | |
54 | cat a |
|
54 | cat a | |
55 |
|
55 |
@@ -1,63 +1,63 b'' | |||||
1 | $ mkdir t |
|
1 | $ mkdir t | |
2 | $ cd t |
|
2 | $ cd t | |
3 | $ hg init |
|
3 | $ hg init | |
4 |
|
4 | |||
5 | $ echo 1 > a |
|
5 | $ echo 1 > a | |
6 |
$ hg ci -qAm "first" |
|
6 | $ hg ci -qAm "first" | |
7 |
|
7 | |||
8 | $ hg cp a b |
|
8 | $ hg cp a b | |
9 | $ hg mv a c |
|
9 | $ hg mv a c | |
10 | $ echo 2 >> b |
|
10 | $ echo 2 >> b | |
11 | $ echo 2 >> c |
|
11 | $ echo 2 >> c | |
12 |
|
12 | |||
13 |
$ hg ci -qAm "second" |
|
13 | $ hg ci -qAm "second" | |
14 |
|
14 | |||
15 | $ hg co -C 0 |
|
15 | $ hg co -C 0 | |
16 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
16 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
17 |
|
17 | |||
18 | $ echo 0 > a |
|
18 | $ echo 0 > a | |
19 | $ echo 1 >> a |
|
19 | $ echo 1 >> a | |
20 |
|
20 | |||
21 |
$ hg ci -qAm "other" |
|
21 | $ hg ci -qAm "other" | |
22 |
|
22 | |||
23 | $ hg merge --debug |
|
23 | $ hg merge --debug | |
24 | searching for copies back to rev 1 |
|
24 | searching for copies back to rev 1 | |
25 | unmatched files in other: |
|
25 | unmatched files in other: | |
26 | b |
|
26 | b | |
27 | c |
|
27 | c | |
28 | all copies found (* = to merge, ! = divergent): |
|
28 | all copies found (* = to merge, ! = divergent): | |
29 | c -> a * |
|
29 | c -> a * | |
30 | b -> a * |
|
30 | b -> a * | |
31 | checking for directory renames |
|
31 | checking for directory renames | |
32 | resolving manifests |
|
32 | resolving manifests | |
33 | overwrite None partial False |
|
33 | overwrite None partial False | |
34 | ancestor 583c7b748052 local fb3948d97f07+ remote 7f1309517659 |
|
34 | ancestor b8bf91eeebbc local add3f11052fa+ remote 17c05bb7fcb6 | |
35 | a: remote moved to c -> m |
|
35 | a: remote moved to c -> m | |
36 | a: remote moved to b -> m |
|
36 | a: remote moved to b -> m | |
37 | preserving a for resolve of b |
|
37 | preserving a for resolve of b | |
38 | preserving a for resolve of c |
|
38 | preserving a for resolve of c | |
39 | removing a |
|
39 | removing a | |
40 | updating: a 1/2 files (50.00%) |
|
40 | updating: a 1/2 files (50.00%) | |
41 | picked tool 'internal:merge' for b (binary False symlink False) |
|
41 | picked tool 'internal:merge' for b (binary False symlink False) | |
42 | merging a and b to b |
|
42 | merging a and b to b | |
43 | my b@fb3948d97f07+ other b@7f1309517659 ancestor a@583c7b748052 |
|
43 | my b@add3f11052fa+ other b@17c05bb7fcb6 ancestor a@b8bf91eeebbc | |
44 | premerge successful |
|
44 | premerge successful | |
45 | updating: a 2/2 files (100.00%) |
|
45 | updating: a 2/2 files (100.00%) | |
46 | picked tool 'internal:merge' for c (binary False symlink False) |
|
46 | picked tool 'internal:merge' for c (binary False symlink False) | |
47 | merging a and c to c |
|
47 | merging a and c to c | |
48 | my c@fb3948d97f07+ other c@7f1309517659 ancestor a@583c7b748052 |
|
48 | my c@add3f11052fa+ other c@17c05bb7fcb6 ancestor a@b8bf91eeebbc | |
49 | premerge successful |
|
49 | premerge successful | |
50 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
50 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
51 | (branch merge, don't forget to commit) |
|
51 | (branch merge, don't forget to commit) | |
52 |
|
52 | |||
53 | file b |
|
53 | file b | |
54 | $ cat b |
|
54 | $ cat b | |
55 | 0 |
|
55 | 0 | |
56 | 1 |
|
56 | 1 | |
57 | 2 |
|
57 | 2 | |
58 |
|
58 | |||
59 | file c |
|
59 | file c | |
60 | $ cat c |
|
60 | $ cat c | |
61 | 0 |
|
61 | 0 | |
62 | 1 |
|
62 | 1 | |
63 | 2 |
|
63 | 2 |
@@ -1,91 +1,91 b'' | |||||
1 | $ hg init |
|
1 | $ hg init | |
2 | $ echo a > a |
|
2 | $ echo a > a | |
3 | $ hg add a |
|
3 | $ hg add a | |
4 |
$ hg commit -m "1" |
|
4 | $ hg commit -m "1" | |
5 | $ hg status |
|
5 | $ hg status | |
6 | $ hg copy a b |
|
6 | $ hg copy a b | |
7 | $ hg status |
|
7 | $ hg status | |
8 | A b |
|
8 | A b | |
9 | $ hg sum |
|
9 | $ hg sum | |
10 |
parent: 0: |
|
10 | parent: 0:c19d34741b0a tip | |
11 | 1 |
|
11 | 1 | |
12 | branch: default |
|
12 | branch: default | |
13 | commit: 1 copied |
|
13 | commit: 1 copied | |
14 | update: (current) |
|
14 | update: (current) | |
15 |
$ hg --debug commit -m "2" |
|
15 | $ hg --debug commit -m "2" | |
16 | b |
|
16 | b | |
17 | b: copy a:b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 |
|
17 | b: copy a:b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 | |
18 | committed changeset 1:76973b01f66a012648546c979ea4c41de9e7d8cd |
|
18 | committed changeset 1:93580a2c28a50a56f63526fb305067e6fbf739c4 | |
19 |
|
19 | |||
20 | we should see two history entries |
|
20 | we should see two history entries | |
21 |
|
21 | |||
22 | $ hg history -v |
|
22 | $ hg history -v | |
23 |
changeset: 1: |
|
23 | changeset: 1:93580a2c28a5 | |
24 | tag: tip |
|
24 | tag: tip | |
25 | user: test |
|
25 | user: test | |
26 |
date: |
|
26 | date: Thu Jan 01 00:00:00 1970 +0000 | |
27 | files: b |
|
27 | files: b | |
28 | description: |
|
28 | description: | |
29 | 2 |
|
29 | 2 | |
30 |
|
30 | |||
31 |
|
31 | |||
32 |
changeset: 0: |
|
32 | changeset: 0:c19d34741b0a | |
33 | user: test |
|
33 | user: test | |
34 |
date: |
|
34 | date: Thu Jan 01 00:00:00 1970 +0000 | |
35 | files: a |
|
35 | files: a | |
36 | description: |
|
36 | description: | |
37 | 1 |
|
37 | 1 | |
38 |
|
38 | |||
39 |
|
39 | |||
40 |
|
40 | |||
41 | we should see one log entry for a |
|
41 | we should see one log entry for a | |
42 |
|
42 | |||
43 | $ hg log a |
|
43 | $ hg log a | |
44 |
changeset: 0: |
|
44 | changeset: 0:c19d34741b0a | |
45 | user: test |
|
45 | user: test | |
46 |
date: |
|
46 | date: Thu Jan 01 00:00:00 1970 +0000 | |
47 | summary: 1 |
|
47 | summary: 1 | |
48 |
|
48 | |||
49 |
|
49 | |||
50 | this should show a revision linked to changeset 0 |
|
50 | this should show a revision linked to changeset 0 | |
51 |
|
51 | |||
52 | $ hg debugindex .hg/store/data/a.i |
|
52 | $ hg debugindex .hg/store/data/a.i | |
53 | rev offset length base linkrev nodeid p1 p2 |
|
53 | rev offset length base linkrev nodeid p1 p2 | |
54 | 0 0 3 0 0 b789fdd96dc2 000000000000 000000000000 |
|
54 | 0 0 3 0 0 b789fdd96dc2 000000000000 000000000000 | |
55 |
|
55 | |||
56 | we should see one log entry for b |
|
56 | we should see one log entry for b | |
57 |
|
57 | |||
58 | $ hg log b |
|
58 | $ hg log b | |
59 |
changeset: 1: |
|
59 | changeset: 1:93580a2c28a5 | |
60 | tag: tip |
|
60 | tag: tip | |
61 | user: test |
|
61 | user: test | |
62 |
date: |
|
62 | date: Thu Jan 01 00:00:00 1970 +0000 | |
63 | summary: 2 |
|
63 | summary: 2 | |
64 |
|
64 | |||
65 |
|
65 | |||
66 | this should show a revision linked to changeset 1 |
|
66 | this should show a revision linked to changeset 1 | |
67 |
|
67 | |||
68 | $ hg debugindex .hg/store/data/b.i |
|
68 | $ hg debugindex .hg/store/data/b.i | |
69 | rev offset length base linkrev nodeid p1 p2 |
|
69 | rev offset length base linkrev nodeid p1 p2 | |
70 | 0 0 65 0 1 37d9b5d994ea 000000000000 000000000000 |
|
70 | 0 0 65 0 1 37d9b5d994ea 000000000000 000000000000 | |
71 |
|
71 | |||
72 | this should show the rename information in the metadata |
|
72 | this should show the rename information in the metadata | |
73 |
|
73 | |||
74 | $ hg debugdata .hg/store/data/b.d 0 | head -3 | tail -2 |
|
74 | $ hg debugdata .hg/store/data/b.d 0 | head -3 | tail -2 | |
75 | copy: a |
|
75 | copy: a | |
76 | copyrev: b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 |
|
76 | copyrev: b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 | |
77 |
|
77 | |||
78 | $ $TESTDIR/md5sum.py .hg/store/data/b.i |
|
78 | $ $TESTDIR/md5sum.py .hg/store/data/b.i | |
79 | 4999f120a3b88713bbefddd195cf5133 .hg/store/data/b.i |
|
79 | 4999f120a3b88713bbefddd195cf5133 .hg/store/data/b.i | |
80 | $ hg cat b > bsum |
|
80 | $ hg cat b > bsum | |
81 | $ $TESTDIR/md5sum.py bsum |
|
81 | $ $TESTDIR/md5sum.py bsum | |
82 | 60b725f10c9c85c70d97880dfe8191b3 bsum |
|
82 | 60b725f10c9c85c70d97880dfe8191b3 bsum | |
83 | $ hg cat a > asum |
|
83 | $ hg cat a > asum | |
84 | $ $TESTDIR/md5sum.py asum |
|
84 | $ $TESTDIR/md5sum.py asum | |
85 | 60b725f10c9c85c70d97880dfe8191b3 asum |
|
85 | 60b725f10c9c85c70d97880dfe8191b3 asum | |
86 | $ hg verify |
|
86 | $ hg verify | |
87 | checking changesets |
|
87 | checking changesets | |
88 | checking manifests |
|
88 | checking manifests | |
89 | crosschecking files in changesets and manifests |
|
89 | crosschecking files in changesets and manifests | |
90 | checking files |
|
90 | checking files | |
91 | 2 files, 2 changesets, 2 total revisions |
|
91 | 2 files, 2 changesets, 2 total revisions |
@@ -1,45 +1,45 b'' | |||||
1 | $ hg init a |
|
1 | $ hg init a | |
2 | $ cd a |
|
2 | $ cd a | |
3 |
|
3 | |||
4 | $ hg diff inexistent1 inexistent2 |
|
4 | $ hg diff inexistent1 inexistent2 | |
5 | inexistent1: No such file or directory |
|
5 | inexistent1: No such file or directory | |
6 | inexistent2: No such file or directory |
|
6 | inexistent2: No such file or directory | |
7 |
|
7 | |||
8 | $ echo bar > foo |
|
8 | $ echo bar > foo | |
9 | $ hg add foo |
|
9 | $ hg add foo | |
10 |
$ hg ci -m 'add foo' |
|
10 | $ hg ci -m 'add foo' | |
11 |
|
11 | |||
12 | $ echo foobar > foo |
|
12 | $ echo foobar > foo | |
13 |
$ hg ci -m 'change foo' |
|
13 | $ hg ci -m 'change foo' | |
14 |
|
14 | |||
15 | $ hg --quiet diff -r 0 -r 1 |
|
15 | $ hg --quiet diff -r 0 -r 1 | |
16 |
--- a/foo |
|
16 | --- a/foo Thu Jan 01 00:00:00 1970 +0000 | |
17 |
+++ b/foo |
|
17 | +++ b/foo Thu Jan 01 00:00:00 1970 +0000 | |
18 | @@ -1,1 +1,1 @@ |
|
18 | @@ -1,1 +1,1 @@ | |
19 | -bar |
|
19 | -bar | |
20 | +foobar |
|
20 | +foobar | |
21 |
|
21 | |||
22 | $ hg diff -r 0 -r 1 |
|
22 | $ hg diff -r 0 -r 1 | |
23 | diff -r 74de3f1392e2 -r b8b5f023a6ad foo |
|
23 | diff -r a99fb63adac3 -r 9b8568d3af2f foo | |
24 |
--- a/foo |
|
24 | --- a/foo Thu Jan 01 00:00:00 1970 +0000 | |
25 |
+++ b/foo |
|
25 | +++ b/foo Thu Jan 01 00:00:00 1970 +0000 | |
26 | @@ -1,1 +1,1 @@ |
|
26 | @@ -1,1 +1,1 @@ | |
27 | -bar |
|
27 | -bar | |
28 | +foobar |
|
28 | +foobar | |
29 |
|
29 | |||
30 | $ hg --verbose diff -r 0 -r 1 |
|
30 | $ hg --verbose diff -r 0 -r 1 | |
31 | diff -r 74de3f1392e2 -r b8b5f023a6ad foo |
|
31 | diff -r a99fb63adac3 -r 9b8568d3af2f foo | |
32 |
--- a/foo |
|
32 | --- a/foo Thu Jan 01 00:00:00 1970 +0000 | |
33 |
+++ b/foo |
|
33 | +++ b/foo Thu Jan 01 00:00:00 1970 +0000 | |
34 | @@ -1,1 +1,1 @@ |
|
34 | @@ -1,1 +1,1 @@ | |
35 | -bar |
|
35 | -bar | |
36 | +foobar |
|
36 | +foobar | |
37 |
|
37 | |||
38 | $ hg --debug diff -r 0 -r 1 |
|
38 | $ hg --debug diff -r 0 -r 1 | |
39 | diff -r 74de3f1392e2d67856fb155963441f2610494e1a -r b8b5f023a6ad77fc378bd95cf3fa00cd1414d107 foo |
|
39 | diff -r a99fb63adac3f31816a22f665bc3b7a7655b30f4 -r 9b8568d3af2f1749445eef03aede868a6f39f210 foo | |
40 |
--- a/foo |
|
40 | --- a/foo Thu Jan 01 00:00:00 1970 +0000 | |
41 |
+++ b/foo |
|
41 | +++ b/foo Thu Jan 01 00:00:00 1970 +0000 | |
42 | @@ -1,1 +1,1 @@ |
|
42 | @@ -1,1 +1,1 @@ | |
43 | -bar |
|
43 | -bar | |
44 | +foobar |
|
44 | +foobar | |
45 |
|
45 |
@@ -1,40 +1,40 b'' | |||||
1 | $ hg init |
|
1 | $ hg init | |
2 | $ touch a |
|
2 | $ touch a | |
3 | $ hg add a |
|
3 | $ hg add a | |
4 |
$ hg ci -m "a" |
|
4 | $ hg ci -m "a" | |
5 |
|
5 | |||
6 | $ echo 123 > b |
|
6 | $ echo 123 > b | |
7 | $ hg add b |
|
7 | $ hg add b | |
8 | $ hg diff --nodates |
|
8 | $ hg diff --nodates | |
9 |
diff -r |
|
9 | diff -r 3903775176ed b | |
10 | --- /dev/null |
|
10 | --- /dev/null | |
11 | +++ b/b |
|
11 | +++ b/b | |
12 | @@ -0,0 +1,1 @@ |
|
12 | @@ -0,0 +1,1 @@ | |
13 | +123 |
|
13 | +123 | |
14 |
|
14 | |||
15 | $ hg diff --nodates -r tip |
|
15 | $ hg diff --nodates -r tip | |
16 |
diff -r |
|
16 | diff -r 3903775176ed b | |
17 | --- /dev/null |
|
17 | --- /dev/null | |
18 | +++ b/b |
|
18 | +++ b/b | |
19 | @@ -0,0 +1,1 @@ |
|
19 | @@ -0,0 +1,1 @@ | |
20 | +123 |
|
20 | +123 | |
21 |
|
21 | |||
22 | $ echo foo > a |
|
22 | $ echo foo > a | |
23 | $ hg diff --nodates |
|
23 | $ hg diff --nodates | |
24 |
diff -r |
|
24 | diff -r 3903775176ed a | |
25 | --- a/a |
|
25 | --- a/a | |
26 | +++ b/a |
|
26 | +++ b/a | |
27 | @@ -0,0 +1,1 @@ |
|
27 | @@ -0,0 +1,1 @@ | |
28 | +foo |
|
28 | +foo | |
29 |
diff -r |
|
29 | diff -r 3903775176ed b | |
30 | --- /dev/null |
|
30 | --- /dev/null | |
31 | +++ b/b |
|
31 | +++ b/b | |
32 | @@ -0,0 +1,1 @@ |
|
32 | @@ -0,0 +1,1 @@ | |
33 | +123 |
|
33 | +123 | |
34 |
|
34 | |||
35 | $ hg diff -r "" |
|
35 | $ hg diff -r "" | |
36 | abort: 00changelog.i@: ambiguous identifier! |
|
36 | abort: 00changelog.i@: ambiguous identifier! | |
37 | $ hg diff -r tip -r "" |
|
37 | $ hg diff -r tip -r "" | |
38 | abort: 00changelog.i@: ambiguous identifier! |
|
38 | abort: 00changelog.i@: ambiguous identifier! | |
39 |
|
39 | |||
40 | $ true |
|
40 | $ true |
@@ -1,65 +1,65 b'' | |||||
1 | $ hg init repo |
|
1 | $ hg init repo | |
2 | $ cd repo |
|
2 | $ cd repo | |
3 |
|
3 | |||
4 | $ echo line 1 > foo |
|
4 | $ echo line 1 > foo | |
5 |
$ hg ci -qAm 'add foo' |
|
5 | $ hg ci -qAm 'add foo' | |
6 |
|
6 | |||
7 | copy foo to bar and change both files |
|
7 | copy foo to bar and change both files | |
8 | $ hg cp foo bar |
|
8 | $ hg cp foo bar | |
9 | $ echo line 2-1 >> foo |
|
9 | $ echo line 2-1 >> foo | |
10 | $ echo line 2-2 >> bar |
|
10 | $ echo line 2-2 >> bar | |
11 |
$ hg ci -m 'cp foo bar; change both' |
|
11 | $ hg ci -m 'cp foo bar; change both' | |
12 |
|
12 | |||
13 | in another branch, change foo in a way that doesn't conflict with |
|
13 | in another branch, change foo in a way that doesn't conflict with | |
14 | the other changes |
|
14 | the other changes | |
15 | $ hg up -qC 0 |
|
15 | $ hg up -qC 0 | |
16 | $ echo line 0 > foo |
|
16 | $ echo line 0 > foo | |
17 | $ hg cat foo >> foo |
|
17 | $ hg cat foo >> foo | |
18 |
$ hg ci -m 'change foo' |
|
18 | $ hg ci -m 'change foo' | |
19 | created new head |
|
19 | created new head | |
20 |
|
20 | |||
21 | we get conflicts that shouldn't be there |
|
21 | we get conflicts that shouldn't be there | |
22 | $ hg merge -P |
|
22 | $ hg merge -P | |
23 |
changeset: 1: |
|
23 | changeset: 1:484bf6903104 | |
24 | user: test |
|
24 | user: test | |
25 |
date: |
|
25 | date: Thu Jan 01 00:00:00 1970 +0000 | |
26 | summary: cp foo bar; change both |
|
26 | summary: cp foo bar; change both | |
27 |
|
27 | |||
28 | $ hg merge --debug |
|
28 | $ hg merge --debug | |
29 | searching for copies back to rev 1 |
|
29 | searching for copies back to rev 1 | |
30 | unmatched files in other: |
|
30 | unmatched files in other: | |
31 | bar |
|
31 | bar | |
32 | all copies found (* = to merge, ! = divergent): |
|
32 | all copies found (* = to merge, ! = divergent): | |
33 | bar -> foo * |
|
33 | bar -> foo * | |
34 | checking for directory renames |
|
34 | checking for directory renames | |
35 | resolving manifests |
|
35 | resolving manifests | |
36 | overwrite None partial False |
|
36 | overwrite None partial False | |
37 | ancestor 310fd17130da local 2092631ce82b+ remote d9da848d0adf |
|
37 | ancestor e6dc8efe11cc local 6a0df1dad128+ remote 484bf6903104 | |
38 | foo: versions differ -> m |
|
38 | foo: versions differ -> m | |
39 | foo: remote copied to bar -> m |
|
39 | foo: remote copied to bar -> m | |
40 | preserving foo for resolve of bar |
|
40 | preserving foo for resolve of bar | |
41 | preserving foo for resolve of foo |
|
41 | preserving foo for resolve of foo | |
42 | updating: foo 1/2 files (50.00%) |
|
42 | updating: foo 1/2 files (50.00%) | |
43 | picked tool 'internal:merge' for bar (binary False symlink False) |
|
43 | picked tool 'internal:merge' for bar (binary False symlink False) | |
44 | merging foo and bar to bar |
|
44 | merging foo and bar to bar | |
45 | my bar@2092631ce82b+ other bar@d9da848d0adf ancestor foo@310fd17130da |
|
45 | my bar@6a0df1dad128+ other bar@484bf6903104 ancestor foo@e6dc8efe11cc | |
46 | premerge successful |
|
46 | premerge successful | |
47 | updating: foo 2/2 files (100.00%) |
|
47 | updating: foo 2/2 files (100.00%) | |
48 | picked tool 'internal:merge' for foo (binary False symlink False) |
|
48 | picked tool 'internal:merge' for foo (binary False symlink False) | |
49 | merging foo |
|
49 | merging foo | |
50 | my foo@2092631ce82b+ other foo@d9da848d0adf ancestor foo@310fd17130da |
|
50 | my foo@6a0df1dad128+ other foo@484bf6903104 ancestor foo@e6dc8efe11cc | |
51 | premerge successful |
|
51 | premerge successful | |
52 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
52 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
53 | (branch merge, don't forget to commit) |
|
53 | (branch merge, don't forget to commit) | |
54 |
|
54 | |||
55 | contents of foo |
|
55 | contents of foo | |
56 | $ cat foo |
|
56 | $ cat foo | |
57 | line 0 |
|
57 | line 0 | |
58 | line 1 |
|
58 | line 1 | |
59 | line 2-1 |
|
59 | line 2-1 | |
60 |
|
60 | |||
61 | contents of bar |
|
61 | contents of bar | |
62 | $ cat bar |
|
62 | $ cat bar | |
63 | line 0 |
|
63 | line 0 | |
64 | line 1 |
|
64 | line 1 | |
65 | line 2-2 |
|
65 | line 2-2 |
@@ -1,16 +1,16 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | hg init |
|
3 | hg init | |
4 | echo 123 > a |
|
4 | echo 123 > a | |
5 | hg add a |
|
5 | hg add a | |
6 |
hg commit -m "first" |
|
6 | hg commit -m "first" a | |
7 | mkdir sub |
|
7 | mkdir sub | |
8 | echo 321 > sub/b |
|
8 | echo 321 > sub/b | |
9 | hg add sub/b |
|
9 | hg add sub/b | |
10 |
hg commit -m "second" |
|
10 | hg commit -m "second" sub/b | |
11 | cat sub/b |
|
11 | cat sub/b | |
12 | hg co 0 |
|
12 | hg co 0 | |
13 | cat sub/b 2>/dev/null || echo "sub/b not present" |
|
13 | cat sub/b 2>/dev/null || echo "sub/b not present" | |
14 | test -d sub || echo "sub not present" |
|
14 | test -d sub || echo "sub not present" | |
15 |
|
15 | |||
16 | true |
|
16 | true |
@@ -1,25 +1,25 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | hg init a |
|
3 | hg init a | |
4 | cd a |
|
4 | cd a | |
5 | touch empty1 |
|
5 | touch empty1 | |
6 | hg add empty1 |
|
6 | hg add empty1 | |
7 |
hg commit -m 'add empty1' |
|
7 | hg commit -m 'add empty1' | |
8 |
|
8 | |||
9 | touch empty2 |
|
9 | touch empty2 | |
10 | hg add empty2 |
|
10 | hg add empty2 | |
11 |
hg commit -m 'add empty2' |
|
11 | hg commit -m 'add empty2' | |
12 |
|
12 | |||
13 | hg up -C 0 |
|
13 | hg up -C 0 | |
14 | touch empty3 |
|
14 | touch empty3 | |
15 | hg add empty3 |
|
15 | hg add empty3 | |
16 |
hg commit -m 'add empty3' |
|
16 | hg commit -m 'add empty3' | |
17 |
|
17 | |||
18 | hg heads |
|
18 | hg heads | |
19 |
|
19 | |||
20 | hg merge 1 |
|
20 | hg merge 1 | |
21 | # before changeset 05257fd28591, we didn't notice the |
|
21 | # before changeset 05257fd28591, we didn't notice the | |
22 | # empty file that came from rev 1. |
|
22 | # empty file that came from rev 1. | |
23 | hg status |
|
23 | hg status | |
24 |
hg commit -m merge |
|
24 | hg commit -m merge | |
25 | hg manifest --debug tip |
|
25 | hg manifest --debug tip |
@@ -1,20 +1,20 b'' | |||||
1 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
2 | created new head |
|
2 | created new head | |
3 |
changeset: 2: |
|
3 | changeset: 2:a1cb177e0d44 | |
4 | tag: tip |
|
4 | tag: tip | |
5 |
parent: 0: |
|
5 | parent: 0:1e1d9c4e5b64 | |
6 | user: test |
|
6 | user: test | |
7 |
date: |
|
7 | date: Thu Jan 01 00:00:00 1970 +0000 | |
8 | summary: add empty3 |
|
8 | summary: add empty3 | |
9 |
|
9 | |||
10 |
changeset: 1: |
|
10 | changeset: 1:097d2b0e17f6 | |
11 | user: test |
|
11 | user: test | |
12 |
date: |
|
12 | date: Thu Jan 01 00:00:00 1970 +0000 | |
13 | summary: add empty2 |
|
13 | summary: add empty2 | |
14 |
|
14 | |||
15 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
15 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
16 | (branch merge, don't forget to commit) |
|
16 | (branch merge, don't forget to commit) | |
17 | M empty2 |
|
17 | M empty2 | |
18 | b80de5d138758541c5f05265ad144ab9fa86d1db 644 empty1 |
|
18 | b80de5d138758541c5f05265ad144ab9fa86d1db 644 empty1 | |
19 | b80de5d138758541c5f05265ad144ab9fa86d1db 644 empty2 |
|
19 | b80de5d138758541c5f05265ad144ab9fa86d1db 644 empty2 | |
20 | b80de5d138758541c5f05265ad144ab9fa86d1db 644 empty3 |
|
20 | b80de5d138758541c5f05265ad144ab9fa86d1db 644 empty3 |
@@ -1,49 +1,49 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 | # |
|
2 | # | |
3 | # A B |
|
3 | # A B | |
4 | # |
|
4 | # | |
5 | # 3 4 3 |
|
5 | # 3 4 3 | |
6 | # |\/| |\ |
|
6 | # |\/| |\ | |
7 | # |/\| | \ |
|
7 | # |/\| | \ | |
8 | # 1 2 1 2 |
|
8 | # 1 2 1 2 | |
9 | # \ / \ / |
|
9 | # \ / \ / | |
10 | # 0 0 |
|
10 | # 0 0 | |
11 | # |
|
11 | # | |
12 | # if the result of the merge of 1 and 2 |
|
12 | # if the result of the merge of 1 and 2 | |
13 | # is the same in 3 and 4, no new manifest |
|
13 | # is the same in 3 and 4, no new manifest | |
14 | # will be created and the manifest group |
|
14 | # will be created and the manifest group | |
15 | # will be empty during the pull |
|
15 | # will be empty during the pull | |
16 | # |
|
16 | # | |
17 | # (plus we test a failure where outgoing |
|
17 | # (plus we test a failure where outgoing | |
18 | # wrongly reported the number of csets) |
|
18 | # wrongly reported the number of csets) | |
19 | # |
|
19 | # | |
20 |
|
20 | |||
21 | hg init a |
|
21 | hg init a | |
22 | cd a |
|
22 | cd a | |
23 | touch init |
|
23 | touch init | |
24 |
hg ci -A -m 0 |
|
24 | hg ci -A -m 0 | |
25 | touch x y |
|
25 | touch x y | |
26 |
hg ci -A -m 1 |
|
26 | hg ci -A -m 1 | |
27 | hg update 0 |
|
27 | hg update 0 | |
28 | touch x y |
|
28 | touch x y | |
29 |
hg ci -A -m 2 |
|
29 | hg ci -A -m 2 | |
30 | hg merge 1 |
|
30 | hg merge 1 | |
31 |
hg ci -A -m m1 |
|
31 | hg ci -A -m m1 | |
32 | #hg log |
|
32 | #hg log | |
33 | #hg debugindex .hg/store/00manifest.i |
|
33 | #hg debugindex .hg/store/00manifest.i | |
34 | hg update -C 1 |
|
34 | hg update -C 1 | |
35 | hg merge 2 |
|
35 | hg merge 2 | |
36 |
hg ci -A -m m2 |
|
36 | hg ci -A -m m2 | |
37 | #hg log |
|
37 | #hg log | |
38 | #hg debugindex .hg/store/00manifest.i |
|
38 | #hg debugindex .hg/store/00manifest.i | |
39 |
|
39 | |||
40 | cd .. |
|
40 | cd .. | |
41 | hg clone -r 3 a b |
|
41 | hg clone -r 3 a b | |
42 | hg clone -r 4 a c |
|
42 | hg clone -r 4 a c | |
43 | hg -R a outgoing b |
|
43 | hg -R a outgoing b | |
44 | hg -R a outgoing c |
|
44 | hg -R a outgoing c | |
45 | hg -R b outgoing c |
|
45 | hg -R b outgoing c | |
46 | hg -R c outgoing b |
|
46 | hg -R c outgoing b | |
47 |
|
47 | |||
48 | hg -R b pull a |
|
48 | hg -R b pull a | |
49 | hg -R c pull a |
|
49 | hg -R c pull a |
@@ -1,80 +1,80 b'' | |||||
1 | adding init |
|
1 | adding init | |
2 | adding x |
|
2 | adding x | |
3 | adding y |
|
3 | adding y | |
4 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
4 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
5 | adding x |
|
5 | adding x | |
6 | adding y |
|
6 | adding y | |
7 | created new head |
|
7 | created new head | |
8 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
8 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
9 | (branch merge, don't forget to commit) |
|
9 | (branch merge, don't forget to commit) | |
10 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
10 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
11 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
11 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
12 | (branch merge, don't forget to commit) |
|
12 | (branch merge, don't forget to commit) | |
13 | created new head |
|
13 | created new head | |
14 | requesting all changes |
|
14 | requesting all changes | |
15 | adding changesets |
|
15 | adding changesets | |
16 | adding manifests |
|
16 | adding manifests | |
17 | adding file changes |
|
17 | adding file changes | |
18 | added 4 changesets with 3 changes to 3 files |
|
18 | added 4 changesets with 3 changes to 3 files | |
19 | updating to branch default |
|
19 | updating to branch default | |
20 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
20 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
21 | requesting all changes |
|
21 | requesting all changes | |
22 | adding changesets |
|
22 | adding changesets | |
23 | adding manifests |
|
23 | adding manifests | |
24 | adding file changes |
|
24 | adding file changes | |
25 | added 4 changesets with 3 changes to 3 files |
|
25 | added 4 changesets with 3 changes to 3 files | |
26 | updating to branch default |
|
26 | updating to branch default | |
27 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
27 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
28 | comparing with b |
|
28 | comparing with b | |
29 | searching for changes |
|
29 | searching for changes | |
30 |
changeset: 4: |
|
30 | changeset: 4:119caaef4ed1 | |
31 | tag: tip |
|
31 | tag: tip | |
32 |
parent: 1: |
|
32 | parent: 1:79f9e10cd04e | |
33 |
parent: 2: |
|
33 | parent: 2:8e1bb01c1a24 | |
34 | user: test |
|
34 | user: test | |
35 |
date: |
|
35 | date: Thu Jan 01 00:00:00 1970 +0000 | |
36 | summary: m2 |
|
36 | summary: m2 | |
37 |
|
37 | |||
38 | comparing with c |
|
38 | comparing with c | |
39 | searching for changes |
|
39 | searching for changes | |
40 |
changeset: 3: |
|
40 | changeset: 3:cbb48b367d1b | |
41 |
parent: 2: |
|
41 | parent: 2:8e1bb01c1a24 | |
42 |
parent: 1: |
|
42 | parent: 1:79f9e10cd04e | |
43 | user: test |
|
43 | user: test | |
44 |
date: |
|
44 | date: Thu Jan 01 00:00:00 1970 +0000 | |
45 | summary: m1 |
|
45 | summary: m1 | |
46 |
|
46 | |||
47 | comparing with c |
|
47 | comparing with c | |
48 | searching for changes |
|
48 | searching for changes | |
49 |
changeset: 3: |
|
49 | changeset: 3:cbb48b367d1b | |
50 | tag: tip |
|
50 | tag: tip | |
51 |
parent: 2: |
|
51 | parent: 2:8e1bb01c1a24 | |
52 |
parent: 1: |
|
52 | parent: 1:79f9e10cd04e | |
53 | user: test |
|
53 | user: test | |
54 |
date: |
|
54 | date: Thu Jan 01 00:00:00 1970 +0000 | |
55 | summary: m1 |
|
55 | summary: m1 | |
56 |
|
56 | |||
57 | comparing with b |
|
57 | comparing with b | |
58 | searching for changes |
|
58 | searching for changes | |
59 |
changeset: 3: |
|
59 | changeset: 3:119caaef4ed1 | |
60 | tag: tip |
|
60 | tag: tip | |
61 |
parent: 1: |
|
61 | parent: 1:79f9e10cd04e | |
62 |
parent: 2: |
|
62 | parent: 2:8e1bb01c1a24 | |
63 | user: test |
|
63 | user: test | |
64 |
date: |
|
64 | date: Thu Jan 01 00:00:00 1970 +0000 | |
65 | summary: m2 |
|
65 | summary: m2 | |
66 |
|
66 | |||
67 | pulling from a |
|
67 | pulling from a | |
68 | searching for changes |
|
68 | searching for changes | |
69 | adding changesets |
|
69 | adding changesets | |
70 | adding manifests |
|
70 | adding manifests | |
71 | adding file changes |
|
71 | adding file changes | |
72 | added 1 changesets with 0 changes to 0 files (+1 heads) |
|
72 | added 1 changesets with 0 changes to 0 files (+1 heads) | |
73 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
73 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
74 | pulling from a |
|
74 | pulling from a | |
75 | searching for changes |
|
75 | searching for changes | |
76 | adding changesets |
|
76 | adding changesets | |
77 | adding manifests |
|
77 | adding manifests | |
78 | adding file changes |
|
78 | adding file changes | |
79 | added 1 changesets with 0 changes to 0 files (+1 heads) |
|
79 | added 1 changesets with 0 changes to 0 files (+1 heads) | |
80 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
80 | (run 'hg heads' to see heads, 'hg merge' to merge) |
@@ -1,48 +1,48 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | hg init |
|
3 | hg init | |
4 |
|
4 | |||
5 | cat > .hg/hgrc <<EOF |
|
5 | cat > .hg/hgrc <<EOF | |
6 | [encode] |
|
6 | [encode] | |
7 | not.gz = tr [:lower:] [:upper:] |
|
7 | not.gz = tr [:lower:] [:upper:] | |
8 | *.gz = gzip -d |
|
8 | *.gz = gzip -d | |
9 |
|
9 | |||
10 | [decode] |
|
10 | [decode] | |
11 | not.gz = tr [:upper:] [:lower:] |
|
11 | not.gz = tr [:upper:] [:lower:] | |
12 | *.gz = gzip |
|
12 | *.gz = gzip | |
13 |
|
13 | |||
14 | EOF |
|
14 | EOF | |
15 |
|
15 | |||
16 | echo "this is a test" | gzip > a.gz |
|
16 | echo "this is a test" | gzip > a.gz | |
17 | echo "this is a test" > not.gz |
|
17 | echo "this is a test" > not.gz | |
18 | hg add * |
|
18 | hg add * | |
19 |
hg ci -m "test" |
|
19 | hg ci -m "test" | |
20 | echo %% no changes |
|
20 | echo %% no changes | |
21 | hg status |
|
21 | hg status | |
22 | touch * |
|
22 | touch * | |
23 |
|
23 | |||
24 | echo %% no changes |
|
24 | echo %% no changes | |
25 | hg status |
|
25 | hg status | |
26 |
|
26 | |||
27 | echo %% check contents in repo are encoded |
|
27 | echo %% check contents in repo are encoded | |
28 | hg debugdata .hg/store/data/a.gz.d 0 |
|
28 | hg debugdata .hg/store/data/a.gz.d 0 | |
29 | hg debugdata .hg/store/data/not.gz.d 0 |
|
29 | hg debugdata .hg/store/data/not.gz.d 0 | |
30 |
|
30 | |||
31 | echo %% check committed content was decoded |
|
31 | echo %% check committed content was decoded | |
32 | gunzip < a.gz |
|
32 | gunzip < a.gz | |
33 | cat not.gz |
|
33 | cat not.gz | |
34 |
|
34 | |||
35 | rm * |
|
35 | rm * | |
36 | hg co -C |
|
36 | hg co -C | |
37 |
|
37 | |||
38 | echo %% check decoding of our new working dir copy |
|
38 | echo %% check decoding of our new working dir copy | |
39 | gunzip < a.gz |
|
39 | gunzip < a.gz | |
40 | cat not.gz |
|
40 | cat not.gz | |
41 |
|
41 | |||
42 | echo %% check hg cat operation |
|
42 | echo %% check hg cat operation | |
43 | hg cat a.gz |
|
43 | hg cat a.gz | |
44 | hg cat --decode a.gz | gunzip |
|
44 | hg cat --decode a.gz | gunzip | |
45 | mkdir subdir |
|
45 | mkdir subdir | |
46 | cd subdir |
|
46 | cd subdir | |
47 | hg -R .. cat ../a.gz |
|
47 | hg -R .. cat ../a.gz | |
48 | hg -R .. cat --decode ../a.gz | gunzip |
|
48 | hg -R .. cat --decode ../a.gz | gunzip |
@@ -1,62 +1,62 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | hg init t |
|
3 | hg init t | |
4 | cd t |
|
4 | cd t | |
5 |
|
5 | |||
6 | # we need a repo with some legacy latin-1 changesets |
|
6 | # we need a repo with some legacy latin-1 changesets | |
7 | hg unbundle $TESTDIR/legacy-encoding.hg |
|
7 | hg unbundle $TESTDIR/legacy-encoding.hg | |
8 | hg co |
|
8 | hg co | |
9 |
|
9 | |||
10 | python << EOF |
|
10 | python << EOF | |
11 | f = file('latin-1', 'w'); f.write("latin-1 e' encoded: \xe9"); f.close() |
|
11 | f = file('latin-1', 'w'); f.write("latin-1 e' encoded: \xe9"); f.close() | |
12 | f = file('utf-8', 'w'); f.write("utf-8 e' encoded: \xc3\xa9"); f.close() |
|
12 | f = file('utf-8', 'w'); f.write("utf-8 e' encoded: \xc3\xa9"); f.close() | |
13 | f = file('latin-1-tag', 'w'); f.write("\xe9"); f.close() |
|
13 | f = file('latin-1-tag', 'w'); f.write("\xe9"); f.close() | |
14 | EOF |
|
14 | EOF | |
15 |
|
15 | |||
16 | echo % should fail with encoding error |
|
16 | echo % should fail with encoding error | |
17 | echo "plain old ascii" > a |
|
17 | echo "plain old ascii" > a | |
18 | hg st |
|
18 | hg st | |
19 |
HGENCODING=ascii hg ci -l latin-1 |
|
19 | HGENCODING=ascii hg ci -l latin-1 | |
20 |
|
20 | |||
21 | echo % these should work |
|
21 | echo % these should work | |
22 | echo "latin-1" > a |
|
22 | echo "latin-1" > a | |
23 |
HGENCODING=latin-1 hg ci -l latin-1 |
|
23 | HGENCODING=latin-1 hg ci -l latin-1 | |
24 | echo "utf-8" > a |
|
24 | echo "utf-8" > a | |
25 |
HGENCODING=utf-8 hg ci -l utf-8 |
|
25 | HGENCODING=utf-8 hg ci -l utf-8 | |
26 |
|
26 | |||
27 |
HGENCODING=latin-1 hg tag |
|
27 | HGENCODING=latin-1 hg tag `cat latin-1-tag` | |
28 | HGENCODING=latin-1 hg branch `cat latin-1-tag` |
|
28 | HGENCODING=latin-1 hg branch `cat latin-1-tag` | |
29 |
HGENCODING=latin-1 hg ci - |
|
29 | HGENCODING=latin-1 hg ci -m 'latin1 branch' | |
30 | rm .hg/branch |
|
30 | rm .hg/branch | |
31 |
|
31 | |||
32 | echo "% hg log (ascii)" |
|
32 | echo "% hg log (ascii)" | |
33 | hg --encoding ascii log |
|
33 | hg --encoding ascii log | |
34 | echo "% hg log (latin-1)" |
|
34 | echo "% hg log (latin-1)" | |
35 | hg --encoding latin-1 log |
|
35 | hg --encoding latin-1 log | |
36 | echo "% hg log (utf-8)" |
|
36 | echo "% hg log (utf-8)" | |
37 | hg --encoding utf-8 log |
|
37 | hg --encoding utf-8 log | |
38 | echo "% hg tags (ascii)" |
|
38 | echo "% hg tags (ascii)" | |
39 | HGENCODING=ascii hg tags |
|
39 | HGENCODING=ascii hg tags | |
40 | echo "% hg tags (latin-1)" |
|
40 | echo "% hg tags (latin-1)" | |
41 | HGENCODING=latin-1 hg tags |
|
41 | HGENCODING=latin-1 hg tags | |
42 | echo "% hg tags (utf-8)" |
|
42 | echo "% hg tags (utf-8)" | |
43 | HGENCODING=utf-8 hg tags |
|
43 | HGENCODING=utf-8 hg tags | |
44 | echo "% hg branches (ascii)" |
|
44 | echo "% hg branches (ascii)" | |
45 | HGENCODING=ascii hg branches |
|
45 | HGENCODING=ascii hg branches | |
46 | echo "% hg branches (latin-1)" |
|
46 | echo "% hg branches (latin-1)" | |
47 | HGENCODING=latin-1 hg branches |
|
47 | HGENCODING=latin-1 hg branches | |
48 | echo "% hg branches (utf-8)" |
|
48 | echo "% hg branches (utf-8)" | |
49 | HGENCODING=utf-8 hg branches |
|
49 | HGENCODING=utf-8 hg branches | |
50 |
|
50 | |||
51 | echo '[ui]' >> .hg/hgrc |
|
51 | echo '[ui]' >> .hg/hgrc | |
52 | echo 'fallbackencoding = koi8-r' >> .hg/hgrc |
|
52 | echo 'fallbackencoding = koi8-r' >> .hg/hgrc | |
53 | echo "% hg log (utf-8)" |
|
53 | echo "% hg log (utf-8)" | |
54 | HGENCODING=utf-8 hg log |
|
54 | HGENCODING=utf-8 hg log | |
55 |
|
55 | |||
56 | echo "% hg log (dolphin)" |
|
56 | echo "% hg log (dolphin)" | |
57 | HGENCODING=dolphin hg log |
|
57 | HGENCODING=dolphin hg log | |
58 |
|
58 | |||
59 | HGENCODING=ascii hg branch `cat latin-1-tag` |
|
59 | HGENCODING=ascii hg branch `cat latin-1-tag` | |
60 | cp latin-1-tag .hg/branch |
|
60 | cp latin-1-tag .hg/branch | |
61 |
HGENCODING=latin-1 hg ci - |
|
61 | HGENCODING=latin-1 hg ci -m 'should fail' | |
62 | exit 0 |
|
62 | exit 0 |
@@ -1,127 +1,127 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | ######################################## |
|
3 | ######################################## | |
4 |
|
4 | |||
5 | HGENCODING=utf-8 |
|
5 | HGENCODING=utf-8 | |
6 | export HGENCODING |
|
6 | export HGENCODING | |
7 |
|
7 | |||
8 | hg init t |
|
8 | hg init t | |
9 | cd t |
|
9 | cd t | |
10 |
|
10 | |||
11 | python << EOF |
|
11 | python << EOF | |
12 | # (byte, width) = (6, 4) |
|
12 | # (byte, width) = (6, 4) | |
13 | s = "\xe7\x9f\xad\xe5\x90\x8d" |
|
13 | s = "\xe7\x9f\xad\xe5\x90\x8d" | |
14 | # (byte, width) = (7, 7): odd width is good for alignment test |
|
14 | # (byte, width) = (7, 7): odd width is good for alignment test | |
15 | m = "MIDDLE_" |
|
15 | m = "MIDDLE_" | |
16 | # (byte, width) = (18, 12) |
|
16 | # (byte, width) = (18, 12) | |
17 | l = "\xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d" |
|
17 | l = "\xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d" | |
18 |
|
18 | |||
19 | f = file('s', 'w'); f.write(s); f.close() |
|
19 | f = file('s', 'w'); f.write(s); f.close() | |
20 | f = file('m', 'w'); f.write(m); f.close() |
|
20 | f = file('m', 'w'); f.write(m); f.close() | |
21 | f = file('l', 'w'); f.write(l); f.close() |
|
21 | f = file('l', 'w'); f.write(l); f.close() | |
22 |
|
22 | |||
23 | # instant extension to show list of options |
|
23 | # instant extension to show list of options | |
24 | f = file('showoptlist.py', 'w'); f.write("""# encoding: utf-8 |
|
24 | f = file('showoptlist.py', 'w'); f.write("""# encoding: utf-8 | |
25 | def showoptlist(ui, repo, *pats, **opts): |
|
25 | def showoptlist(ui, repo, *pats, **opts): | |
26 | '''dummy command to show option descriptions''' |
|
26 | '''dummy command to show option descriptions''' | |
27 | return 0 |
|
27 | return 0 | |
28 |
|
28 | |||
29 | cmdtable = { |
|
29 | cmdtable = { | |
30 | 'showoptlist': |
|
30 | 'showoptlist': | |
31 | (showoptlist, |
|
31 | (showoptlist, | |
32 | [('s', 'opt1', '', 'short width', '""" + s + """'), |
|
32 | [('s', 'opt1', '', 'short width', '""" + s + """'), | |
33 | ('m', 'opt2', '', 'middle width', '""" + m + """'), |
|
33 | ('m', 'opt2', '', 'middle width', '""" + m + """'), | |
34 | ('l', 'opt3', '', 'long width', '""" + l + """') |
|
34 | ('l', 'opt3', '', 'long width', '""" + l + """') | |
35 | ], |
|
35 | ], | |
36 | "" |
|
36 | "" | |
37 | ) |
|
37 | ) | |
38 | } |
|
38 | } | |
39 | """) |
|
39 | """) | |
40 | f.close() |
|
40 | f.close() | |
41 | EOF |
|
41 | EOF | |
42 |
|
42 | |||
43 | S=`cat s` |
|
43 | S=`cat s` | |
44 | M=`cat m` |
|
44 | M=`cat m` | |
45 | L=`cat l` |
|
45 | L=`cat l` | |
46 |
|
46 | |||
47 | ######################################## |
|
47 | ######################################## | |
48 | #### alignment of: |
|
48 | #### alignment of: | |
49 | #### - option descriptions in help |
|
49 | #### - option descriptions in help | |
50 |
|
50 | |||
51 | cat <<EOF > .hg/hgrc |
|
51 | cat <<EOF > .hg/hgrc | |
52 | [extensions] |
|
52 | [extensions] | |
53 | ja_ext = `pwd`/showoptlist.py |
|
53 | ja_ext = `pwd`/showoptlist.py | |
54 | EOF |
|
54 | EOF | |
55 | echo '% check alignment of option descriptions in help' |
|
55 | echo '% check alignment of option descriptions in help' | |
56 | hg help showoptlist |
|
56 | hg help showoptlist | |
57 |
|
57 | |||
58 | ######################################## |
|
58 | ######################################## | |
59 | #### alignment of: |
|
59 | #### alignment of: | |
60 | #### - user names in annotate |
|
60 | #### - user names in annotate | |
61 | #### - file names in diffstat |
|
61 | #### - file names in diffstat | |
62 |
|
62 | |||
63 | rm -f s; touch s |
|
63 | rm -f s; touch s | |
64 | rm -f m; touch m |
|
64 | rm -f m; touch m | |
65 | rm -f l; touch l |
|
65 | rm -f l; touch l | |
66 |
|
66 | |||
67 | #### add files |
|
67 | #### add files | |
68 |
|
68 | |||
69 | cp s $S |
|
69 | cp s $S | |
70 | hg add $S |
|
70 | hg add $S | |
71 | cp m $M |
|
71 | cp m $M | |
72 | hg add $M |
|
72 | hg add $M | |
73 | cp l $L |
|
73 | cp l $L | |
74 | hg add $L |
|
74 | hg add $L | |
75 |
|
75 | |||
76 | #### commit(1) |
|
76 | #### commit(1) | |
77 |
|
77 | |||
78 | echo 'first line(1)' >> s; cp s $S |
|
78 | echo 'first line(1)' >> s; cp s $S | |
79 | echo 'first line(2)' >> m; cp m $M |
|
79 | echo 'first line(2)' >> m; cp m $M | |
80 | echo 'first line(3)' >> l; cp l $L |
|
80 | echo 'first line(3)' >> l; cp l $L | |
81 |
hg commit -m 'first commit' -u $S |
|
81 | hg commit -m 'first commit' -u $S | |
82 |
|
82 | |||
83 | #### commit(2) |
|
83 | #### commit(2) | |
84 |
|
84 | |||
85 | echo 'second line(1)' >> s; cp s $S |
|
85 | echo 'second line(1)' >> s; cp s $S | |
86 | echo 'second line(2)' >> m; cp m $M |
|
86 | echo 'second line(2)' >> m; cp m $M | |
87 | echo 'second line(3)' >> l; cp l $L |
|
87 | echo 'second line(3)' >> l; cp l $L | |
88 |
hg commit -m 'second commit' -u $M |
|
88 | hg commit -m 'second commit' -u $M | |
89 |
|
89 | |||
90 | #### commit(3) |
|
90 | #### commit(3) | |
91 |
|
91 | |||
92 | echo 'third line(1)' >> s; cp s $S |
|
92 | echo 'third line(1)' >> s; cp s $S | |
93 | echo 'third line(2)' >> m; cp m $M |
|
93 | echo 'third line(2)' >> m; cp m $M | |
94 | echo 'third line(3)' >> l; cp l $L |
|
94 | echo 'third line(3)' >> l; cp l $L | |
95 |
hg commit -m 'third commit' -u $L |
|
95 | hg commit -m 'third commit' -u $L | |
96 |
|
96 | |||
97 | #### check |
|
97 | #### check | |
98 |
|
98 | |||
99 | echo '% check alignment of user names in annotate' |
|
99 | echo '% check alignment of user names in annotate' | |
100 | hg annotate -u $M |
|
100 | hg annotate -u $M | |
101 | echo '% check alignment of filenames in diffstat' |
|
101 | echo '% check alignment of filenames in diffstat' | |
102 | hg diff -c tip --stat |
|
102 | hg diff -c tip --stat | |
103 |
|
103 | |||
104 | ######################################## |
|
104 | ######################################## | |
105 | #### alignment of: |
|
105 | #### alignment of: | |
106 | #### - branch names in list |
|
106 | #### - branch names in list | |
107 | #### - tag names in list |
|
107 | #### - tag names in list | |
108 |
|
108 | |||
109 | #### add branches/tags |
|
109 | #### add branches/tags | |
110 |
|
110 | |||
111 | hg branch $S |
|
111 | hg branch $S | |
112 | hg tag -d "1000000 0" $S |
|
112 | hg tag $S | |
113 | hg branch $M |
|
113 | hg branch $M | |
114 | hg tag -d "1000000 0" $M |
|
114 | hg tag $M | |
115 | hg branch $L |
|
115 | hg branch $L | |
116 | hg tag -d "1000000 0" $L |
|
116 | hg tag $L | |
117 |
|
117 | |||
118 | #### check |
|
118 | #### check | |
119 |
|
119 | |||
120 | echo '% check alignment of branches' |
|
120 | echo '% check alignment of branches' | |
121 | hg tags |
|
121 | hg tags | |
122 | echo '% check alignment of tags' |
|
122 | echo '% check alignment of tags' | |
123 | hg tags |
|
123 | hg tags | |
124 |
|
124 | |||
125 | ######################################## |
|
125 | ######################################## | |
126 |
|
126 | |||
127 | exit 0 |
|
127 | exit 0 |
@@ -1,34 +1,34 b'' | |||||
1 | % check alignment of option descriptions in help |
|
1 | % check alignment of option descriptions in help | |
2 | hg showoptlist |
|
2 | hg showoptlist | |
3 |
|
3 | |||
4 | dummy command to show option descriptions |
|
4 | dummy command to show option descriptions | |
5 |
|
5 | |||
6 | options: |
|
6 | options: | |
7 |
|
7 | |||
8 | -s --opt1 短名 short width |
|
8 | -s --opt1 短名 short width | |
9 | -m --opt2 MIDDLE_ middle width |
|
9 | -m --opt2 MIDDLE_ middle width | |
10 | -l --opt3 長い長い名前 long width |
|
10 | -l --opt3 長い長い名前 long width | |
11 |
|
11 | |||
12 | use "hg -v help showoptlist" to show global options |
|
12 | use "hg -v help showoptlist" to show global options | |
13 | % check alignment of user names in annotate |
|
13 | % check alignment of user names in annotate | |
14 | 短名: first line(2) |
|
14 | 短名: first line(2) | |
15 | MIDDLE_: second line(2) |
|
15 | MIDDLE_: second line(2) | |
16 | 長い長い名前: third line(2) |
|
16 | 長い長い名前: third line(2) | |
17 | % check alignment of filenames in diffstat |
|
17 | % check alignment of filenames in diffstat | |
18 | MIDDLE_ | 1 + |
|
18 | MIDDLE_ | 1 + | |
19 | 短名 | 1 + |
|
19 | 短名 | 1 + | |
20 | 長い長い名前 | 1 + |
|
20 | 長い長い名前 | 1 + | |
21 | 3 files changed, 3 insertions(+), 0 deletions(-) |
|
21 | 3 files changed, 3 insertions(+), 0 deletions(-) | |
22 | marked working directory as branch 短名 |
|
22 | marked working directory as branch 短名 | |
23 | marked working directory as branch MIDDLE_ |
|
23 | marked working directory as branch MIDDLE_ | |
24 | marked working directory as branch 長い長い名前 |
|
24 | marked working directory as branch 長い長い名前 | |
25 | % check alignment of branches |
|
25 | % check alignment of branches | |
26 |
tip 5: |
|
26 | tip 5:d745ff46155b | |
27 |
長い長い名前 4: |
|
27 | 長い長い名前 4:9259be597f19 | |
28 |
MIDDLE_ 3: |
|
28 | MIDDLE_ 3:b06c5b6def9e | |
29 |
短名 2: |
|
29 | 短名 2:64a70663cee8 | |
30 | % check alignment of tags |
|
30 | % check alignment of tags | |
31 |
tip 5: |
|
31 | tip 5:d745ff46155b | |
32 |
長い長い名前 4: |
|
32 | 長い長い名前 4:9259be597f19 | |
33 |
MIDDLE_ 3: |
|
33 | MIDDLE_ 3:b06c5b6def9e | |
34 |
短名 2: |
|
34 | 短名 2:64a70663cee8 |
@@ -1,174 +1,174 b'' | |||||
1 | adding changesets |
|
1 | adding changesets | |
2 | adding manifests |
|
2 | adding manifests | |
3 | adding file changes |
|
3 | adding file changes | |
4 | added 2 changesets with 2 changes to 1 files |
|
4 | added 2 changesets with 2 changes to 1 files | |
5 | (run 'hg update' to get a working copy) |
|
5 | (run 'hg update' to get a working copy) | |
6 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
6 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
7 | % should fail with encoding error |
|
7 | % should fail with encoding error | |
8 | M a |
|
8 | M a | |
9 | ? latin-1 |
|
9 | ? latin-1 | |
10 | ? latin-1-tag |
|
10 | ? latin-1-tag | |
11 | ? utf-8 |
|
11 | ? utf-8 | |
12 | transaction abort! |
|
12 | transaction abort! | |
13 | rollback completed |
|
13 | rollback completed | |
14 | abort: decoding near ' encoded: �': 'ascii' codec can't decode byte 0xe9 in position 20: ordinal not in range(128)! |
|
14 | abort: decoding near ' encoded: �': 'ascii' codec can't decode byte 0xe9 in position 20: ordinal not in range(128)! | |
15 | % these should work |
|
15 | % these should work | |
16 | marked working directory as branch � |
|
16 | marked working directory as branch � | |
17 | % hg log (ascii) |
|
17 | % hg log (ascii) | |
18 | changeset: 5:db5520b4645f |
|
18 | changeset: 5:093c6077d1c8 | |
19 | branch: ? |
|
19 | branch: ? | |
20 | tag: tip |
|
20 | tag: tip | |
21 | user: test |
|
21 | user: test | |
22 |
date: |
|
22 | date: Thu Jan 01 00:00:00 1970 +0000 | |
23 | summary: latin1 branch |
|
23 | summary: latin1 branch | |
24 |
|
24 | |||
25 |
changeset: 4:9 |
|
25 | changeset: 4:94db611b4196 | |
26 | user: test |
|
26 | user: test | |
27 |
date: |
|
27 | date: Thu Jan 01 00:00:00 1970 +0000 | |
28 |
summary: Added tag ? for changeset |
|
28 | summary: Added tag ? for changeset ca661e7520de | |
29 |
|
29 | |||
30 |
changeset: 3: |
|
30 | changeset: 3:ca661e7520de | |
31 | tag: ? |
|
31 | tag: ? | |
32 | user: test |
|
32 | user: test | |
33 |
date: |
|
33 | date: Thu Jan 01 00:00:00 1970 +0000 | |
34 | summary: utf-8 e' encoded: ? |
|
34 | summary: utf-8 e' encoded: ? | |
35 |
|
35 | |||
36 |
changeset: 2: |
|
36 | changeset: 2:650c6f3d55dd | |
37 | user: test |
|
37 | user: test | |
38 |
date: |
|
38 | date: Thu Jan 01 00:00:00 1970 +0000 | |
39 | summary: latin-1 e' encoded: ? |
|
39 | summary: latin-1 e' encoded: ? | |
40 |
|
40 | |||
41 | changeset: 1:0e5b7e3f9c4a |
|
41 | changeset: 1:0e5b7e3f9c4a | |
42 | user: test |
|
42 | user: test | |
43 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
43 | date: Mon Jan 12 13:46:40 1970 +0000 | |
44 | summary: koi8-r: ????? = u'\u0440\u0442\u0443\u0442\u044c' |
|
44 | summary: koi8-r: ????? = u'\u0440\u0442\u0443\u0442\u044c' | |
45 |
|
45 | |||
46 | changeset: 0:1e78a93102a3 |
|
46 | changeset: 0:1e78a93102a3 | |
47 | user: test |
|
47 | user: test | |
48 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
48 | date: Mon Jan 12 13:46:40 1970 +0000 | |
49 | summary: latin-1 e': ? = u'\xe9' |
|
49 | summary: latin-1 e': ? = u'\xe9' | |
50 |
|
50 | |||
51 | % hg log (latin-1) |
|
51 | % hg log (latin-1) | |
52 | changeset: 5:db5520b4645f |
|
52 | changeset: 5:093c6077d1c8 | |
53 | branch: � |
|
53 | branch: � | |
54 | tag: tip |
|
54 | tag: tip | |
55 | user: test |
|
55 | user: test | |
56 |
date: |
|
56 | date: Thu Jan 01 00:00:00 1970 +0000 | |
57 | summary: latin1 branch |
|
57 | summary: latin1 branch | |
58 |
|
58 | |||
59 |
changeset: 4:9 |
|
59 | changeset: 4:94db611b4196 | |
60 | user: test |
|
60 | user: test | |
61 |
date: |
|
61 | date: Thu Jan 01 00:00:00 1970 +0000 | |
62 |
summary: Added tag � for changeset |
|
62 | summary: Added tag � for changeset ca661e7520de | |
63 |
|
63 | |||
64 |
changeset: 3: |
|
64 | changeset: 3:ca661e7520de | |
65 | tag: � |
|
65 | tag: � | |
66 | user: test |
|
66 | user: test | |
67 |
date: |
|
67 | date: Thu Jan 01 00:00:00 1970 +0000 | |
68 | summary: utf-8 e' encoded: � |
|
68 | summary: utf-8 e' encoded: � | |
69 |
|
69 | |||
70 |
changeset: 2: |
|
70 | changeset: 2:650c6f3d55dd | |
71 | user: test |
|
71 | user: test | |
72 |
date: |
|
72 | date: Thu Jan 01 00:00:00 1970 +0000 | |
73 | summary: latin-1 e' encoded: � |
|
73 | summary: latin-1 e' encoded: � | |
74 |
|
74 | |||
75 | changeset: 1:0e5b7e3f9c4a |
|
75 | changeset: 1:0e5b7e3f9c4a | |
76 | user: test |
|
76 | user: test | |
77 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
77 | date: Mon Jan 12 13:46:40 1970 +0000 | |
78 | summary: koi8-r: ����� = u'\u0440\u0442\u0443\u0442\u044c' |
|
78 | summary: koi8-r: ����� = u'\u0440\u0442\u0443\u0442\u044c' | |
79 |
|
79 | |||
80 | changeset: 0:1e78a93102a3 |
|
80 | changeset: 0:1e78a93102a3 | |
81 | user: test |
|
81 | user: test | |
82 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
82 | date: Mon Jan 12 13:46:40 1970 +0000 | |
83 | summary: latin-1 e': � = u'\xe9' |
|
83 | summary: latin-1 e': � = u'\xe9' | |
84 |
|
84 | |||
85 | % hg log (utf-8) |
|
85 | % hg log (utf-8) | |
86 | changeset: 5:db5520b4645f |
|
86 | changeset: 5:093c6077d1c8 | |
87 | branch: é |
|
87 | branch: é | |
88 | tag: tip |
|
88 | tag: tip | |
89 | user: test |
|
89 | user: test | |
90 |
date: |
|
90 | date: Thu Jan 01 00:00:00 1970 +0000 | |
91 | summary: latin1 branch |
|
91 | summary: latin1 branch | |
92 |
|
92 | |||
93 |
changeset: 4:9 |
|
93 | changeset: 4:94db611b4196 | |
94 | user: test |
|
94 | user: test | |
95 |
date: |
|
95 | date: Thu Jan 01 00:00:00 1970 +0000 | |
96 |
summary: Added tag é for changeset |
|
96 | summary: Added tag é for changeset ca661e7520de | |
97 |
|
97 | |||
98 |
changeset: 3: |
|
98 | changeset: 3:ca661e7520de | |
99 | tag: é |
|
99 | tag: é | |
100 | user: test |
|
100 | user: test | |
101 |
date: |
|
101 | date: Thu Jan 01 00:00:00 1970 +0000 | |
102 | summary: utf-8 e' encoded: é |
|
102 | summary: utf-8 e' encoded: é | |
103 |
|
103 | |||
104 |
changeset: 2: |
|
104 | changeset: 2:650c6f3d55dd | |
105 | user: test |
|
105 | user: test | |
106 |
date: |
|
106 | date: Thu Jan 01 00:00:00 1970 +0000 | |
107 | summary: latin-1 e' encoded: é |
|
107 | summary: latin-1 e' encoded: é | |
108 |
|
108 | |||
109 | changeset: 1:0e5b7e3f9c4a |
|
109 | changeset: 1:0e5b7e3f9c4a | |
110 | user: test |
|
110 | user: test | |
111 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
111 | date: Mon Jan 12 13:46:40 1970 +0000 | |
112 | summary: koi8-r: ÒÔÕÔØ = u'\u0440\u0442\u0443\u0442\u044c' |
|
112 | summary: koi8-r: ÒÔÕÔØ = u'\u0440\u0442\u0443\u0442\u044c' | |
113 |
|
113 | |||
114 | changeset: 0:1e78a93102a3 |
|
114 | changeset: 0:1e78a93102a3 | |
115 | user: test |
|
115 | user: test | |
116 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
116 | date: Mon Jan 12 13:46:40 1970 +0000 | |
117 | summary: latin-1 e': é = u'\xe9' |
|
117 | summary: latin-1 e': é = u'\xe9' | |
118 |
|
118 | |||
119 | % hg tags (ascii) |
|
119 | % hg tags (ascii) | |
120 |
tip 5: |
|
120 | tip 5:093c6077d1c8 | |
121 |
? 3: |
|
121 | ? 3:ca661e7520de | |
122 | % hg tags (latin-1) |
|
122 | % hg tags (latin-1) | |
123 |
tip 5: |
|
123 | tip 5:093c6077d1c8 | |
124 |
� 3: |
|
124 | � 3:ca661e7520de | |
125 | % hg tags (utf-8) |
|
125 | % hg tags (utf-8) | |
126 |
tip 5: |
|
126 | tip 5:093c6077d1c8 | |
127 |
é 3: |
|
127 | é 3:ca661e7520de | |
128 | % hg branches (ascii) |
|
128 | % hg branches (ascii) | |
129 |
? 5: |
|
129 | ? 5:093c6077d1c8 | |
130 |
default 4:9 |
|
130 | default 4:94db611b4196 (inactive) | |
131 | % hg branches (latin-1) |
|
131 | % hg branches (latin-1) | |
132 |
� 5: |
|
132 | � 5:093c6077d1c8 | |
133 |
default 4:9 |
|
133 | default 4:94db611b4196 (inactive) | |
134 | % hg branches (utf-8) |
|
134 | % hg branches (utf-8) | |
135 |
é 5: |
|
135 | é 5:093c6077d1c8 | |
136 |
default 4:9 |
|
136 | default 4:94db611b4196 (inactive) | |
137 | % hg log (utf-8) |
|
137 | % hg log (utf-8) | |
138 | changeset: 5:db5520b4645f |
|
138 | changeset: 5:093c6077d1c8 | |
139 | branch: é |
|
139 | branch: é | |
140 | tag: tip |
|
140 | tag: tip | |
141 | user: test |
|
141 | user: test | |
142 |
date: |
|
142 | date: Thu Jan 01 00:00:00 1970 +0000 | |
143 | summary: latin1 branch |
|
143 | summary: latin1 branch | |
144 |
|
144 | |||
145 |
changeset: 4:9 |
|
145 | changeset: 4:94db611b4196 | |
146 | user: test |
|
146 | user: test | |
147 |
date: |
|
147 | date: Thu Jan 01 00:00:00 1970 +0000 | |
148 |
summary: Added tag é for changeset |
|
148 | summary: Added tag é for changeset ca661e7520de | |
149 |
|
149 | |||
150 |
changeset: 3: |
|
150 | changeset: 3:ca661e7520de | |
151 | tag: é |
|
151 | tag: é | |
152 | user: test |
|
152 | user: test | |
153 |
date: |
|
153 | date: Thu Jan 01 00:00:00 1970 +0000 | |
154 | summary: utf-8 e' encoded: é |
|
154 | summary: utf-8 e' encoded: é | |
155 |
|
155 | |||
156 |
changeset: 2: |
|
156 | changeset: 2:650c6f3d55dd | |
157 | user: test |
|
157 | user: test | |
158 |
date: |
|
158 | date: Thu Jan 01 00:00:00 1970 +0000 | |
159 | summary: latin-1 e' encoded: é |
|
159 | summary: latin-1 e' encoded: é | |
160 |
|
160 | |||
161 | changeset: 1:0e5b7e3f9c4a |
|
161 | changeset: 1:0e5b7e3f9c4a | |
162 | user: test |
|
162 | user: test | |
163 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
163 | date: Mon Jan 12 13:46:40 1970 +0000 | |
164 | summary: koi8-r: ртуть = u'\u0440\u0442\u0443\u0442\u044c' |
|
164 | summary: koi8-r: ртуть = u'\u0440\u0442\u0443\u0442\u044c' | |
165 |
|
165 | |||
166 | changeset: 0:1e78a93102a3 |
|
166 | changeset: 0:1e78a93102a3 | |
167 | user: test |
|
167 | user: test | |
168 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
168 | date: Mon Jan 12 13:46:40 1970 +0000 | |
169 | summary: latin-1 e': И = u'\xe9' |
|
169 | summary: latin-1 e': И = u'\xe9' | |
170 |
|
170 | |||
171 | % hg log (dolphin) |
|
171 | % hg log (dolphin) | |
172 | abort: unknown encoding: dolphin, please check your locale settings |
|
172 | abort: unknown encoding: dolphin, please check your locale settings | |
173 | abort: decoding near '�': 'ascii' codec can't decode byte 0xe9 in position 0: ordinal not in range(128)! |
|
173 | abort: decoding near '�': 'ascii' codec can't decode byte 0xe9 in position 0: ordinal not in range(128)! | |
174 | abort: branch name not in UTF-8! |
|
174 | abort: branch name not in UTF-8! |
@@ -1,101 +1,101 b'' | |||||
1 | $ hg init |
|
1 | $ hg init | |
2 |
|
2 | |||
3 | $ echo foo > a |
|
3 | $ echo foo > a | |
4 | $ echo foo > b |
|
4 | $ echo foo > b | |
5 | $ hg add a b |
|
5 | $ hg add a b | |
6 |
|
6 | |||
7 |
$ hg ci -m "test" |
|
7 | $ hg ci -m "test" | |
8 |
|
8 | |||
9 | $ echo blah > a |
|
9 | $ echo blah > a | |
10 |
|
10 | |||
11 |
$ hg ci -m "branch a" |
|
11 | $ hg ci -m "branch a" | |
12 |
|
12 | |||
13 | $ hg co 0 |
|
13 | $ hg co 0 | |
14 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
14 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
15 |
|
15 | |||
16 | $ echo blah > b |
|
16 | $ echo blah > b | |
17 |
|
17 | |||
18 |
$ hg ci -m "branch b" |
|
18 | $ hg ci -m "branch b" | |
19 | created new head |
|
19 | created new head | |
20 | $ HGMERGE=true hg merge 1 |
|
20 | $ HGMERGE=true hg merge 1 | |
21 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
21 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
22 | (branch merge, don't forget to commit) |
|
22 | (branch merge, don't forget to commit) | |
23 |
|
23 | |||
24 |
$ hg ci -m "merge b/a -> blah" |
|
24 | $ hg ci -m "merge b/a -> blah" | |
25 |
|
25 | |||
26 | $ hg co 1 |
|
26 | $ hg co 1 | |
27 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
27 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
28 | $ HGMERGE=true hg merge 2 |
|
28 | $ HGMERGE=true hg merge 2 | |
29 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
29 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
30 | (branch merge, don't forget to commit) |
|
30 | (branch merge, don't forget to commit) | |
31 |
$ hg ci -m "merge a/b -> blah" |
|
31 | $ hg ci -m "merge a/b -> blah" | |
32 | created new head |
|
32 | created new head | |
33 |
|
33 | |||
34 | $ hg log |
|
34 | $ hg log | |
35 |
changeset: 4: |
|
35 | changeset: 4:2ee31f665a86 | |
36 | tag: tip |
|
36 | tag: tip | |
37 |
parent: 1: |
|
37 | parent: 1:96155394af80 | |
38 |
parent: 2: |
|
38 | parent: 2:92cc4c306b19 | |
39 | user: test |
|
39 | user: test | |
40 |
date: |
|
40 | date: Thu Jan 01 00:00:00 1970 +0000 | |
41 | summary: merge a/b -> blah |
|
41 | summary: merge a/b -> blah | |
42 |
|
42 | |||
43 |
changeset: 3: |
|
43 | changeset: 3:e16a66a37edd | |
44 |
parent: 2: |
|
44 | parent: 2:92cc4c306b19 | |
45 |
parent: 1: |
|
45 | parent: 1:96155394af80 | |
46 | user: test |
|
46 | user: test | |
47 |
date: |
|
47 | date: Thu Jan 01 00:00:00 1970 +0000 | |
48 | summary: merge b/a -> blah |
|
48 | summary: merge b/a -> blah | |
49 |
|
49 | |||
50 |
changeset: 2: |
|
50 | changeset: 2:92cc4c306b19 | |
51 |
parent: 0: |
|
51 | parent: 0:5e0375449e74 | |
52 | user: test |
|
52 | user: test | |
53 |
date: |
|
53 | date: Thu Jan 01 00:00:00 1970 +0000 | |
54 | summary: branch b |
|
54 | summary: branch b | |
55 |
|
55 | |||
56 |
changeset: 1: |
|
56 | changeset: 1:96155394af80 | |
57 | user: test |
|
57 | user: test | |
58 |
date: |
|
58 | date: Thu Jan 01 00:00:00 1970 +0000 | |
59 | summary: branch a |
|
59 | summary: branch a | |
60 |
|
60 | |||
61 |
changeset: 0: |
|
61 | changeset: 0:5e0375449e74 | |
62 | user: test |
|
62 | user: test | |
63 |
date: |
|
63 | date: Thu Jan 01 00:00:00 1970 +0000 | |
64 | summary: test |
|
64 | summary: test | |
65 |
|
65 | |||
66 | $ hg debugindex .hg/store/00changelog.i |
|
66 | $ hg debugindex .hg/store/00changelog.i | |
67 | rev offset length base linkrev nodeid p1 p2 |
|
67 | rev offset length base linkrev nodeid p1 p2 | |
68 |
0 0 6 |
|
68 | 0 0 60 0 0 5e0375449e74 000000000000 000000000000 | |
69 |
1 6 |
|
69 | 1 60 62 1 1 96155394af80 5e0375449e74 000000000000 | |
70 |
2 1 |
|
70 | 2 122 62 2 2 92cc4c306b19 5e0375449e74 000000000000 | |
71 | 3 200 75 3 3 13d875a22764 7c5dc2e857f2 448a8c5e42f1 |
|
71 | 3 184 69 3 3 e16a66a37edd 92cc4c306b19 96155394af80 | |
72 |
4 2 |
|
72 | 4 253 29 3 4 2ee31f665a86 96155394af80 92cc4c306b19 | |
73 |
|
73 | |||
74 | revision 1 |
|
74 | revision 1 | |
75 | $ hg manifest --debug 1 |
|
75 | $ hg manifest --debug 1 | |
76 | 79d7492df40aa0fa093ec4209be78043c181f094 644 a |
|
76 | 79d7492df40aa0fa093ec4209be78043c181f094 644 a | |
77 | 2ed2a3912a0b24502043eae84ee4b279c18b90dd 644 b |
|
77 | 2ed2a3912a0b24502043eae84ee4b279c18b90dd 644 b | |
78 | revision 2 |
|
78 | revision 2 | |
79 | $ hg manifest --debug 2 |
|
79 | $ hg manifest --debug 2 | |
80 | 2ed2a3912a0b24502043eae84ee4b279c18b90dd 644 a |
|
80 | 2ed2a3912a0b24502043eae84ee4b279c18b90dd 644 a | |
81 | 79d7492df40aa0fa093ec4209be78043c181f094 644 b |
|
81 | 79d7492df40aa0fa093ec4209be78043c181f094 644 b | |
82 | revision 3 |
|
82 | revision 3 | |
83 | $ hg manifest --debug 3 |
|
83 | $ hg manifest --debug 3 | |
84 | 79d7492df40aa0fa093ec4209be78043c181f094 644 a |
|
84 | 79d7492df40aa0fa093ec4209be78043c181f094 644 a | |
85 | 79d7492df40aa0fa093ec4209be78043c181f094 644 b |
|
85 | 79d7492df40aa0fa093ec4209be78043c181f094 644 b | |
86 | revision 4 |
|
86 | revision 4 | |
87 | $ hg manifest --debug 4 |
|
87 | $ hg manifest --debug 4 | |
88 | 79d7492df40aa0fa093ec4209be78043c181f094 644 a |
|
88 | 79d7492df40aa0fa093ec4209be78043c181f094 644 a | |
89 | 79d7492df40aa0fa093ec4209be78043c181f094 644 b |
|
89 | 79d7492df40aa0fa093ec4209be78043c181f094 644 b | |
90 |
|
90 | |||
91 | $ hg debugindex .hg/store/data/a.i |
|
91 | $ hg debugindex .hg/store/data/a.i | |
92 | rev offset length base linkrev nodeid p1 p2 |
|
92 | rev offset length base linkrev nodeid p1 p2 | |
93 | 0 0 5 0 0 2ed2a3912a0b 000000000000 000000000000 |
|
93 | 0 0 5 0 0 2ed2a3912a0b 000000000000 000000000000 | |
94 | 1 5 6 1 1 79d7492df40a 2ed2a3912a0b 000000000000 |
|
94 | 1 5 6 1 1 79d7492df40a 2ed2a3912a0b 000000000000 | |
95 |
|
95 | |||
96 | $ hg verify |
|
96 | $ hg verify | |
97 | checking changesets |
|
97 | checking changesets | |
98 | checking manifests |
|
98 | checking manifests | |
99 | crosschecking files in changesets and manifests |
|
99 | crosschecking files in changesets and manifests | |
100 | checking files |
|
100 | checking files | |
101 | 2 files, 5 changesets, 4 total revisions |
|
101 | 2 files, 5 changesets, 4 total revisions |
@@ -1,79 +1,79 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | # This test makes sure that we don't mark a file as merged with its ancestor |
|
3 | # This test makes sure that we don't mark a file as merged with its ancestor | |
4 | # when we do a merge. |
|
4 | # when we do a merge. | |
5 |
|
5 | |||
6 | cat <<EOF > merge |
|
6 | cat <<EOF > merge | |
7 | import sys, os |
|
7 | import sys, os | |
8 | print "merging for", os.path.basename(sys.argv[1]) |
|
8 | print "merging for", os.path.basename(sys.argv[1]) | |
9 | EOF |
|
9 | EOF | |
10 | HGMERGE="python ../merge"; export HGMERGE |
|
10 | HGMERGE="python ../merge"; export HGMERGE | |
11 |
|
11 | |||
12 | echo creating base |
|
12 | echo creating base | |
13 | hg init a |
|
13 | hg init a | |
14 | cd a |
|
14 | cd a | |
15 | echo 1 > foo |
|
15 | echo 1 > foo | |
16 | echo 1 > bar |
|
16 | echo 1 > bar | |
17 | echo 1 > baz |
|
17 | echo 1 > baz | |
18 | echo 1 > quux |
|
18 | echo 1 > quux | |
19 | hg add foo bar baz quux |
|
19 | hg add foo bar baz quux | |
20 |
hg commit -m "base" |
|
20 | hg commit -m "base" | |
21 |
|
21 | |||
22 | cd .. |
|
22 | cd .. | |
23 | hg clone a b |
|
23 | hg clone a b | |
24 |
|
24 | |||
25 | echo creating branch a |
|
25 | echo creating branch a | |
26 | cd a |
|
26 | cd a | |
27 | echo 2a > foo |
|
27 | echo 2a > foo | |
28 | echo 2a > bar |
|
28 | echo 2a > bar | |
29 |
hg commit -m "branch a" |
|
29 | hg commit -m "branch a" | |
30 |
|
30 | |||
31 | echo creating branch b |
|
31 | echo creating branch b | |
32 |
|
32 | |||
33 | cd .. |
|
33 | cd .. | |
34 | cd b |
|
34 | cd b | |
35 | echo 2b > foo |
|
35 | echo 2b > foo | |
36 | echo 2b > baz |
|
36 | echo 2b > baz | |
37 |
hg commit -m "branch b" |
|
37 | hg commit -m "branch b" | |
38 |
|
38 | |||
39 | echo "we shouldn't have anything but n state here" |
|
39 | echo "we shouldn't have anything but n state here" | |
40 | hg debugstate --nodates | grep -v "^n" |
|
40 | hg debugstate --nodates | grep -v "^n" | |
41 |
|
41 | |||
42 | echo merging |
|
42 | echo merging | |
43 | hg pull ../a |
|
43 | hg pull ../a | |
44 | hg merge -v |
|
44 | hg merge -v | |
45 |
|
45 | |||
46 | echo 2m > foo |
|
46 | echo 2m > foo | |
47 | echo 2b > baz |
|
47 | echo 2b > baz | |
48 | echo new > quux |
|
48 | echo new > quux | |
49 |
|
49 | |||
50 | echo "we shouldn't have anything but foo in merge state here" |
|
50 | echo "we shouldn't have anything but foo in merge state here" | |
51 | hg debugstate --nodates | grep "^m" |
|
51 | hg debugstate --nodates | grep "^m" | |
52 |
|
52 | |||
53 |
hg ci -m "merge" |
|
53 | hg ci -m "merge" | |
54 |
|
54 | |||
55 | echo "main: we should have a merge here" |
|
55 | echo "main: we should have a merge here" | |
56 | hg debugindex .hg/store/00changelog.i |
|
56 | hg debugindex .hg/store/00changelog.i | |
57 |
|
57 | |||
58 | echo "log should show foo and quux changed" |
|
58 | echo "log should show foo and quux changed" | |
59 | hg log -v -r tip |
|
59 | hg log -v -r tip | |
60 |
|
60 | |||
61 | echo "foo: we should have a merge here" |
|
61 | echo "foo: we should have a merge here" | |
62 | hg debugindex .hg/store/data/foo.i |
|
62 | hg debugindex .hg/store/data/foo.i | |
63 |
|
63 | |||
64 | echo "bar: we shouldn't have a merge here" |
|
64 | echo "bar: we shouldn't have a merge here" | |
65 | hg debugindex .hg/store/data/bar.i |
|
65 | hg debugindex .hg/store/data/bar.i | |
66 |
|
66 | |||
67 | echo "baz: we shouldn't have a merge here" |
|
67 | echo "baz: we shouldn't have a merge here" | |
68 | hg debugindex .hg/store/data/baz.i |
|
68 | hg debugindex .hg/store/data/baz.i | |
69 |
|
69 | |||
70 | echo "quux: we shouldn't have a merge here" |
|
70 | echo "quux: we shouldn't have a merge here" | |
71 | hg debugindex .hg/store/data/quux.i |
|
71 | hg debugindex .hg/store/data/quux.i | |
72 |
|
72 | |||
73 | echo "manifest entries should match tips of all files" |
|
73 | echo "manifest entries should match tips of all files" | |
74 | hg manifest --debug |
|
74 | hg manifest --debug | |
75 |
|
75 | |||
76 | echo "everything should be clean now" |
|
76 | echo "everything should be clean now" | |
77 | hg status |
|
77 | hg status | |
78 |
|
78 | |||
79 | hg verify |
|
79 | hg verify |
@@ -1,69 +1,69 b'' | |||||
1 | creating base |
|
1 | creating base | |
2 | updating to branch default |
|
2 | updating to branch default | |
3 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
3 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
4 | creating branch a |
|
4 | creating branch a | |
5 | creating branch b |
|
5 | creating branch b | |
6 | we shouldn't have anything but n state here |
|
6 | we shouldn't have anything but n state here | |
7 | merging |
|
7 | merging | |
8 | pulling from ../a |
|
8 | pulling from ../a | |
9 | searching for changes |
|
9 | searching for changes | |
10 | adding changesets |
|
10 | adding changesets | |
11 | adding manifests |
|
11 | adding manifests | |
12 | adding file changes |
|
12 | adding file changes | |
13 | added 1 changesets with 2 changes to 2 files (+1 heads) |
|
13 | added 1 changesets with 2 changes to 2 files (+1 heads) | |
14 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
14 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
15 | merging for foo |
|
15 | merging for foo | |
16 | resolving manifests |
|
16 | resolving manifests | |
17 | getting bar |
|
17 | getting bar | |
18 | merging foo |
|
18 | merging foo | |
19 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
19 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
20 | (branch merge, don't forget to commit) |
|
20 | (branch merge, don't forget to commit) | |
21 | we shouldn't have anything but foo in merge state here |
|
21 | we shouldn't have anything but foo in merge state here | |
22 | m 644 3 foo |
|
22 | m 644 3 foo | |
23 | main: we should have a merge here |
|
23 | main: we should have a merge here | |
24 | rev offset length base linkrev nodeid p1 p2 |
|
24 | rev offset length base linkrev nodeid p1 p2 | |
25 |
0 0 7 |
|
25 | 0 0 73 0 0 cdca01651b96 000000000000 000000000000 | |
26 |
1 7 |
|
26 | 1 73 68 1 1 f6718a9cb7f3 cdca01651b96 000000000000 | |
27 |
2 1 |
|
27 | 2 141 68 2 2 bdd988058d16 cdca01651b96 000000000000 | |
28 | 3 221 72 3 3 0c2cc6fc80e2 182b283965f1 a6aef98656b7 |
|
28 | 3 209 66 3 3 d8a521142a3c f6718a9cb7f3 bdd988058d16 | |
29 | log should show foo and quux changed |
|
29 | log should show foo and quux changed | |
30 | changeset: 3:0c2cc6fc80e2 |
|
30 | changeset: 3:d8a521142a3c | |
31 | tag: tip |
|
31 | tag: tip | |
32 |
parent: 1: |
|
32 | parent: 1:f6718a9cb7f3 | |
33 |
parent: 2: |
|
33 | parent: 2:bdd988058d16 | |
34 | user: test |
|
34 | user: test | |
35 |
date: |
|
35 | date: Thu Jan 01 00:00:00 1970 +0000 | |
36 | files: foo quux |
|
36 | files: foo quux | |
37 | description: |
|
37 | description: | |
38 | merge |
|
38 | merge | |
39 |
|
39 | |||
40 |
|
40 | |||
41 | foo: we should have a merge here |
|
41 | foo: we should have a merge here | |
42 | rev offset length base linkrev nodeid p1 p2 |
|
42 | rev offset length base linkrev nodeid p1 p2 | |
43 | 0 0 3 0 0 b8e02f643373 000000000000 000000000000 |
|
43 | 0 0 3 0 0 b8e02f643373 000000000000 000000000000 | |
44 | 1 3 4 1 1 2ffeddde1b65 b8e02f643373 000000000000 |
|
44 | 1 3 4 1 1 2ffeddde1b65 b8e02f643373 000000000000 | |
45 | 2 7 4 2 2 33d1fb69067a b8e02f643373 000000000000 |
|
45 | 2 7 4 2 2 33d1fb69067a b8e02f643373 000000000000 | |
46 | 3 11 4 3 3 aa27919ee430 2ffeddde1b65 33d1fb69067a |
|
46 | 3 11 4 3 3 aa27919ee430 2ffeddde1b65 33d1fb69067a | |
47 | bar: we shouldn't have a merge here |
|
47 | bar: we shouldn't have a merge here | |
48 | rev offset length base linkrev nodeid p1 p2 |
|
48 | rev offset length base linkrev nodeid p1 p2 | |
49 | 0 0 3 0 0 b8e02f643373 000000000000 000000000000 |
|
49 | 0 0 3 0 0 b8e02f643373 000000000000 000000000000 | |
50 | 1 3 4 1 2 33d1fb69067a b8e02f643373 000000000000 |
|
50 | 1 3 4 1 2 33d1fb69067a b8e02f643373 000000000000 | |
51 | baz: we shouldn't have a merge here |
|
51 | baz: we shouldn't have a merge here | |
52 | rev offset length base linkrev nodeid p1 p2 |
|
52 | rev offset length base linkrev nodeid p1 p2 | |
53 | 0 0 3 0 0 b8e02f643373 000000000000 000000000000 |
|
53 | 0 0 3 0 0 b8e02f643373 000000000000 000000000000 | |
54 | 1 3 4 1 1 2ffeddde1b65 b8e02f643373 000000000000 |
|
54 | 1 3 4 1 1 2ffeddde1b65 b8e02f643373 000000000000 | |
55 | quux: we shouldn't have a merge here |
|
55 | quux: we shouldn't have a merge here | |
56 | rev offset length base linkrev nodeid p1 p2 |
|
56 | rev offset length base linkrev nodeid p1 p2 | |
57 | 0 0 3 0 0 b8e02f643373 000000000000 000000000000 |
|
57 | 0 0 3 0 0 b8e02f643373 000000000000 000000000000 | |
58 | 1 3 5 1 3 6128c0f33108 b8e02f643373 000000000000 |
|
58 | 1 3 5 1 3 6128c0f33108 b8e02f643373 000000000000 | |
59 | manifest entries should match tips of all files |
|
59 | manifest entries should match tips of all files | |
60 | 33d1fb69067a0139622a3fa3b7ba1cdb1367972e 644 bar |
|
60 | 33d1fb69067a0139622a3fa3b7ba1cdb1367972e 644 bar | |
61 | 2ffeddde1b65b4827f6746174a145474129fa2ce 644 baz |
|
61 | 2ffeddde1b65b4827f6746174a145474129fa2ce 644 baz | |
62 | aa27919ee4303cfd575e1fb932dd64d75aa08be4 644 foo |
|
62 | aa27919ee4303cfd575e1fb932dd64d75aa08be4 644 foo | |
63 | 6128c0f33108e8cfbb4e0824d13ae48b466d7280 644 quux |
|
63 | 6128c0f33108e8cfbb4e0824d13ae48b466d7280 644 quux | |
64 | everything should be clean now |
|
64 | everything should be clean now | |
65 | checking changesets |
|
65 | checking changesets | |
66 | checking manifests |
|
66 | checking manifests | |
67 | crosschecking files in changesets and manifests |
|
67 | crosschecking files in changesets and manifests | |
68 | checking files |
|
68 | checking files | |
69 | 4 files, 4 changesets, 10 total revisions |
|
69 | 4 files, 4 changesets, 10 total revisions |
@@ -1,149 +1,149 b'' | |||||
1 | $ umask 027 |
|
1 | $ umask 027 | |
2 | $ mkdir test1 |
|
2 | $ mkdir test1 | |
3 | $ cd test1 |
|
3 | $ cd test1 | |
4 |
|
4 | |||
5 | $ hg init |
|
5 | $ hg init | |
6 | $ touch a b |
|
6 | $ touch a b | |
7 | $ hg add a b |
|
7 | $ hg add a b | |
8 |
$ hg ci -m "added a b" |
|
8 | $ hg ci -m "added a b" | |
9 |
|
9 | |||
10 | $ cd .. |
|
10 | $ cd .. | |
11 | $ hg clone test1 test3 |
|
11 | $ hg clone test1 test3 | |
12 | updating to branch default |
|
12 | updating to branch default | |
13 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
13 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
14 | $ mkdir test2 |
|
14 | $ mkdir test2 | |
15 | $ cd test2 |
|
15 | $ cd test2 | |
16 |
|
16 | |||
17 | $ hg init |
|
17 | $ hg init | |
18 | $ hg pull ../test1 |
|
18 | $ hg pull ../test1 | |
19 | pulling from ../test1 |
|
19 | pulling from ../test1 | |
20 | requesting all changes |
|
20 | requesting all changes | |
21 | adding changesets |
|
21 | adding changesets | |
22 | adding manifests |
|
22 | adding manifests | |
23 | adding file changes |
|
23 | adding file changes | |
24 | added 1 changesets with 2 changes to 2 files |
|
24 | added 1 changesets with 2 changes to 2 files | |
25 | (run 'hg update' to get a working copy) |
|
25 | (run 'hg update' to get a working copy) | |
26 | $ hg co |
|
26 | $ hg co | |
27 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
27 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
28 | $ chmod +x a |
|
28 | $ chmod +x a | |
29 |
$ hg ci -m "chmod +x a" |
|
29 | $ hg ci -m "chmod +x a" | |
30 |
|
30 | |||
31 | the changelog should mention file a: |
|
31 | the changelog should mention file a: | |
32 |
|
32 | |||
33 | $ hg tip --template '{files}\n' |
|
33 | $ hg tip --template '{files}\n' | |
34 | a |
|
34 | a | |
35 |
|
35 | |||
36 | $ cd ../test1 |
|
36 | $ cd ../test1 | |
37 | $ echo 123 >>a |
|
37 | $ echo 123 >>a | |
38 |
$ hg ci -m "a updated" |
|
38 | $ hg ci -m "a updated" | |
39 |
|
39 | |||
40 | $ hg pull ../test2 |
|
40 | $ hg pull ../test2 | |
41 | pulling from ../test2 |
|
41 | pulling from ../test2 | |
42 | searching for changes |
|
42 | searching for changes | |
43 | adding changesets |
|
43 | adding changesets | |
44 | adding manifests |
|
44 | adding manifests | |
45 | adding file changes |
|
45 | adding file changes | |
46 | added 1 changesets with 0 changes to 0 files (+1 heads) |
|
46 | added 1 changesets with 0 changes to 0 files (+1 heads) | |
47 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
47 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
48 | $ hg heads |
|
48 | $ hg heads | |
49 |
changeset: 2: |
|
49 | changeset: 2:7f4313b42a34 | |
50 | tag: tip |
|
50 | tag: tip | |
51 |
parent: 0: |
|
51 | parent: 0:22a449e20da5 | |
52 | user: test |
|
52 | user: test | |
53 |
date: |
|
53 | date: Thu Jan 01 00:00:00 1970 +0000 | |
54 | summary: chmod +x a |
|
54 | summary: chmod +x a | |
55 |
|
55 | |||
56 |
changeset: 1: |
|
56 | changeset: 1:c6ecefc45368 | |
57 | user: test |
|
57 | user: test | |
58 |
date: |
|
58 | date: Thu Jan 01 00:00:00 1970 +0000 | |
59 | summary: a updated |
|
59 | summary: a updated | |
60 |
|
60 | |||
61 | $ hg history |
|
61 | $ hg history | |
62 |
changeset: 2: |
|
62 | changeset: 2:7f4313b42a34 | |
63 | tag: tip |
|
63 | tag: tip | |
64 |
parent: 0: |
|
64 | parent: 0:22a449e20da5 | |
65 | user: test |
|
65 | user: test | |
66 |
date: |
|
66 | date: Thu Jan 01 00:00:00 1970 +0000 | |
67 | summary: chmod +x a |
|
67 | summary: chmod +x a | |
68 |
|
68 | |||
69 |
changeset: 1: |
|
69 | changeset: 1:c6ecefc45368 | |
70 | user: test |
|
70 | user: test | |
71 |
date: |
|
71 | date: Thu Jan 01 00:00:00 1970 +0000 | |
72 | summary: a updated |
|
72 | summary: a updated | |
73 |
|
73 | |||
74 |
changeset: 0: |
|
74 | changeset: 0:22a449e20da5 | |
75 | user: test |
|
75 | user: test | |
76 |
date: |
|
76 | date: Thu Jan 01 00:00:00 1970 +0000 | |
77 | summary: added a b |
|
77 | summary: added a b | |
78 |
|
78 | |||
79 |
|
79 | |||
80 | $ hg -v merge |
|
80 | $ hg -v merge | |
81 | resolving manifests |
|
81 | resolving manifests | |
82 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
82 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
83 | (branch merge, don't forget to commit) |
|
83 | (branch merge, don't forget to commit) | |
84 |
|
84 | |||
85 | $ cd ../test3 |
|
85 | $ cd ../test3 | |
86 | $ echo 123 >>b |
|
86 | $ echo 123 >>b | |
87 |
$ hg ci -m "b updated" |
|
87 | $ hg ci -m "b updated" | |
88 |
|
88 | |||
89 | $ hg pull ../test2 |
|
89 | $ hg pull ../test2 | |
90 | pulling from ../test2 |
|
90 | pulling from ../test2 | |
91 | searching for changes |
|
91 | searching for changes | |
92 | adding changesets |
|
92 | adding changesets | |
93 | adding manifests |
|
93 | adding manifests | |
94 | adding file changes |
|
94 | adding file changes | |
95 | added 1 changesets with 0 changes to 0 files (+1 heads) |
|
95 | added 1 changesets with 0 changes to 0 files (+1 heads) | |
96 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
96 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
97 | $ hg heads |
|
97 | $ hg heads | |
98 |
changeset: 2: |
|
98 | changeset: 2:7f4313b42a34 | |
99 | tag: tip |
|
99 | tag: tip | |
100 |
parent: 0: |
|
100 | parent: 0:22a449e20da5 | |
101 | user: test |
|
101 | user: test | |
102 |
date: |
|
102 | date: Thu Jan 01 00:00:00 1970 +0000 | |
103 | summary: chmod +x a |
|
103 | summary: chmod +x a | |
104 |
|
104 | |||
105 |
changeset: 1:d |
|
105 | changeset: 1:dc57ead75f79 | |
106 | user: test |
|
106 | user: test | |
107 |
date: |
|
107 | date: Thu Jan 01 00:00:00 1970 +0000 | |
108 | summary: b updated |
|
108 | summary: b updated | |
109 |
|
109 | |||
110 | $ hg history |
|
110 | $ hg history | |
111 |
changeset: 2: |
|
111 | changeset: 2:7f4313b42a34 | |
112 | tag: tip |
|
112 | tag: tip | |
113 |
parent: 0: |
|
113 | parent: 0:22a449e20da5 | |
114 | user: test |
|
114 | user: test | |
115 |
date: |
|
115 | date: Thu Jan 01 00:00:00 1970 +0000 | |
116 | summary: chmod +x a |
|
116 | summary: chmod +x a | |
117 |
|
117 | |||
118 |
changeset: 1:d |
|
118 | changeset: 1:dc57ead75f79 | |
119 | user: test |
|
119 | user: test | |
120 |
date: |
|
120 | date: Thu Jan 01 00:00:00 1970 +0000 | |
121 | summary: b updated |
|
121 | summary: b updated | |
122 |
|
122 | |||
123 |
changeset: 0: |
|
123 | changeset: 0:22a449e20da5 | |
124 | user: test |
|
124 | user: test | |
125 |
date: |
|
125 | date: Thu Jan 01 00:00:00 1970 +0000 | |
126 | summary: added a b |
|
126 | summary: added a b | |
127 |
|
127 | |||
128 |
|
128 | |||
129 | $ hg -v merge |
|
129 | $ hg -v merge | |
130 | resolving manifests |
|
130 | resolving manifests | |
131 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
131 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
132 | (branch merge, don't forget to commit) |
|
132 | (branch merge, don't forget to commit) | |
133 |
|
133 | |||
134 | $ ls -l ../test[123]/a > foo |
|
134 | $ ls -l ../test[123]/a > foo | |
135 | $ cut -b 1-10 < foo |
|
135 | $ cut -b 1-10 < foo | |
136 | -rwxr-x--- |
|
136 | -rwxr-x--- | |
137 | -rwxr-x--- |
|
137 | -rwxr-x--- | |
138 | -rwxr-x--- |
|
138 | -rwxr-x--- | |
139 |
|
139 | |||
140 | $ hg debugindex .hg/store/data/a.i |
|
140 | $ hg debugindex .hg/store/data/a.i | |
141 | rev offset length base linkrev nodeid p1 p2 |
|
141 | rev offset length base linkrev nodeid p1 p2 | |
142 | 0 0 0 0 0 b80de5d13875 000000000000 000000000000 |
|
142 | 0 0 0 0 0 b80de5d13875 000000000000 000000000000 | |
143 | $ hg debugindex ../test2/.hg/store/data/a.i |
|
143 | $ hg debugindex ../test2/.hg/store/data/a.i | |
144 | rev offset length base linkrev nodeid p1 p2 |
|
144 | rev offset length base linkrev nodeid p1 p2 | |
145 | 0 0 0 0 0 b80de5d13875 000000000000 000000000000 |
|
145 | 0 0 0 0 0 b80de5d13875 000000000000 000000000000 | |
146 | $ hg debugindex ../test1/.hg/store/data/a.i |
|
146 | $ hg debugindex ../test1/.hg/store/data/a.i | |
147 | rev offset length base linkrev nodeid p1 p2 |
|
147 | rev offset length base linkrev nodeid p1 p2 | |
148 | 0 0 0 0 0 b80de5d13875 000000000000 000000000000 |
|
148 | 0 0 0 0 0 b80de5d13875 000000000000 000000000000 | |
149 | 1 0 5 1 1 7fe919cc0336 b80de5d13875 000000000000 |
|
149 | 1 0 5 1 1 7fe919cc0336 b80de5d13875 000000000000 |
@@ -1,465 +1,465 b'' | |||||
1 | $ cp "$TESTDIR"/printenv.py . |
|
1 | $ cp "$TESTDIR"/printenv.py . | |
2 |
|
2 | |||
3 | # commit hooks can see env vars |
|
3 | # commit hooks can see env vars | |
4 |
|
4 | |||
5 | $ hg init a |
|
5 | $ hg init a | |
6 | $ cd a |
|
6 | $ cd a | |
7 | $ echo "[hooks]" > .hg/hgrc |
|
7 | $ echo "[hooks]" > .hg/hgrc | |
8 | $ echo 'commit = unset HG_LOCAL HG_TAG; python ../printenv.py commit' >> .hg/hgrc |
|
8 | $ echo 'commit = unset HG_LOCAL HG_TAG; python ../printenv.py commit' >> .hg/hgrc | |
9 | $ echo 'commit.b = unset HG_LOCAL HG_TAG; python ../printenv.py commit.b' >> .hg/hgrc |
|
9 | $ echo 'commit.b = unset HG_LOCAL HG_TAG; python ../printenv.py commit.b' >> .hg/hgrc | |
10 | $ echo 'precommit = unset HG_LOCAL HG_NODE HG_TAG; python ../printenv.py precommit' >> .hg/hgrc |
|
10 | $ echo 'precommit = unset HG_LOCAL HG_NODE HG_TAG; python ../printenv.py precommit' >> .hg/hgrc | |
11 | $ echo 'pretxncommit = unset HG_LOCAL HG_TAG; python ../printenv.py pretxncommit' >> .hg/hgrc |
|
11 | $ echo 'pretxncommit = unset HG_LOCAL HG_TAG; python ../printenv.py pretxncommit' >> .hg/hgrc | |
12 | $ echo 'pretxncommit.tip = hg -q tip' >> .hg/hgrc |
|
12 | $ echo 'pretxncommit.tip = hg -q tip' >> .hg/hgrc | |
13 | $ echo 'pre-identify = python ../printenv.py pre-identify 1' >> .hg/hgrc |
|
13 | $ echo 'pre-identify = python ../printenv.py pre-identify 1' >> .hg/hgrc | |
14 | $ echo 'pre-cat = python ../printenv.py pre-cat' >> .hg/hgrc |
|
14 | $ echo 'pre-cat = python ../printenv.py pre-cat' >> .hg/hgrc | |
15 | $ echo 'post-cat = python ../printenv.py post-cat' >> .hg/hgrc |
|
15 | $ echo 'post-cat = python ../printenv.py post-cat' >> .hg/hgrc | |
16 | $ echo a > a |
|
16 | $ echo a > a | |
17 | $ hg add a |
|
17 | $ hg add a | |
18 |
$ hg commit -m a |
|
18 | $ hg commit -m a | |
19 | precommit hook: HG_PARENT1=0000000000000000000000000000000000000000 |
|
19 | precommit hook: HG_PARENT1=0000000000000000000000000000000000000000 | |
20 |
pretxncommit hook: HG_NODE= |
|
20 | pretxncommit hook: HG_NODE=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b HG_PARENT1=0000000000000000000000000000000000000000 HG_PENDING=$HGTMP/test-hook.t/a | |
21 | 0:29b62aeb769f |
|
21 | 0:cb9a9f314b8b | |
22 |
commit hook: HG_NODE= |
|
22 | commit hook: HG_NODE=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b HG_PARENT1=0000000000000000000000000000000000000000 | |
23 |
commit.b hook: HG_NODE= |
|
23 | commit.b hook: HG_NODE=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b HG_PARENT1=0000000000000000000000000000000000000000 | |
24 |
|
24 | |||
25 | $ hg clone . ../b |
|
25 | $ hg clone . ../b | |
26 | updating to branch default |
|
26 | updating to branch default | |
27 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
27 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
28 | $ cd ../b |
|
28 | $ cd ../b | |
29 |
|
29 | |||
30 | # changegroup hooks can see env vars |
|
30 | # changegroup hooks can see env vars | |
31 |
|
31 | |||
32 | $ echo '[hooks]' > .hg/hgrc |
|
32 | $ echo '[hooks]' > .hg/hgrc | |
33 | $ echo 'prechangegroup = python ../printenv.py prechangegroup' >> .hg/hgrc |
|
33 | $ echo 'prechangegroup = python ../printenv.py prechangegroup' >> .hg/hgrc | |
34 | $ echo 'changegroup = python ../printenv.py changegroup' >> .hg/hgrc |
|
34 | $ echo 'changegroup = python ../printenv.py changegroup' >> .hg/hgrc | |
35 | $ echo 'incoming = python ../printenv.py incoming' >> .hg/hgrc |
|
35 | $ echo 'incoming = python ../printenv.py incoming' >> .hg/hgrc | |
36 |
|
36 | |||
37 | # pretxncommit and commit hooks can see both parents of merge |
|
37 | # pretxncommit and commit hooks can see both parents of merge | |
38 |
|
38 | |||
39 | $ cd ../a |
|
39 | $ cd ../a | |
40 | $ echo b >> a |
|
40 | $ echo b >> a | |
41 | $ hg commit -m a1 -d "1 0" |
|
41 | $ hg commit -m a1 -d "1 0" | |
42 |
precommit hook: HG_PARENT1= |
|
42 | precommit hook: HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b | |
43 |
pretxncommit hook: HG_NODE= |
|
43 | pretxncommit hook: HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b HG_PENDING=$HGTMP/test-hook.t/a | |
44 | 1:b702efe96888 |
|
44 | 1:ab228980c14d | |
45 | commit hook: HG_NODE=b702efe9688826e3a91283852b328b84dbf37bc2 HG_PARENT1=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b |
|
45 | commit hook: HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b | |
46 | commit.b hook: HG_NODE=b702efe9688826e3a91283852b328b84dbf37bc2 HG_PARENT1=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b |
|
46 | commit.b hook: HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b | |
47 | $ hg update -C 0 |
|
47 | $ hg update -C 0 | |
48 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
48 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
49 | $ echo b > b |
|
49 | $ echo b > b | |
50 | $ hg add b |
|
50 | $ hg add b | |
51 | $ hg commit -m b -d '1 0' |
|
51 | $ hg commit -m b -d '1 0' | |
52 |
precommit hook: HG_PARENT1= |
|
52 | precommit hook: HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b | |
53 |
pretxncommit hook: HG_NODE= |
|
53 | pretxncommit hook: HG_NODE=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b HG_PENDING=$HGTMP/test-hook.t/a | |
54 | 2:1324a5531bac |
|
54 | 2:ee9deb46ab31 | |
55 | commit hook: HG_NODE=1324a5531bac09b329c3845d35ae6a7526874edb HG_PARENT1=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b |
|
55 | commit hook: HG_NODE=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b | |
56 | commit.b hook: HG_NODE=1324a5531bac09b329c3845d35ae6a7526874edb HG_PARENT1=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b |
|
56 | commit.b hook: HG_NODE=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b | |
57 | created new head |
|
57 | created new head | |
58 |
$ |
|
58 | $ hg merge 1 | |
59 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
59 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
60 | (branch merge, don't forget to commit) |
|
60 | (branch merge, don't forget to commit) | |
61 | $ hg commit -m merge -d '2 0' |
|
61 | $ hg commit -m merge -d '2 0' | |
62 | precommit hook: HG_PARENT1=1324a5531bac09b329c3845d35ae6a7526874edb HG_PARENT2=b702efe9688826e3a91283852b328b84dbf37bc2 |
|
62 | precommit hook: HG_PARENT1=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT2=ab228980c14deea8b9555d91c9581127383e40fd | |
63 | pretxncommit hook: HG_NODE=4c52fb2e402287dd5dc052090682536c8406c321 HG_PARENT1=1324a5531bac09b329c3845d35ae6a7526874edb HG_PARENT2=b702efe9688826e3a91283852b328b84dbf37bc2 HG_PENDING=$HGTMP/test-hook.t/a |
|
63 | pretxncommit hook: HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_PARENT1=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT2=ab228980c14deea8b9555d91c9581127383e40fd HG_PENDING=$HGTMP/test-hook.t/a | |
64 | 3:4c52fb2e4022 |
|
64 | 3:07f3376c1e65 | |
65 | commit hook: HG_NODE=4c52fb2e402287dd5dc052090682536c8406c321 HG_PARENT1=1324a5531bac09b329c3845d35ae6a7526874edb HG_PARENT2=b702efe9688826e3a91283852b328b84dbf37bc2 |
|
65 | commit hook: HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_PARENT1=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT2=ab228980c14deea8b9555d91c9581127383e40fd | |
66 | commit.b hook: HG_NODE=4c52fb2e402287dd5dc052090682536c8406c321 HG_PARENT1=1324a5531bac09b329c3845d35ae6a7526874edb HG_PARENT2=b702efe9688826e3a91283852b328b84dbf37bc2 |
|
66 | commit.b hook: HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_PARENT1=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT2=ab228980c14deea8b9555d91c9581127383e40fd | |
67 |
|
67 | |||
68 | # test generic hooks |
|
68 | # test generic hooks | |
69 |
|
69 | |||
70 | $ hg id |
|
70 | $ hg id | |
71 | pre-identify hook: HG_ARGS=id HG_OPTS={'tags': None, 'rev': '', 'num': None, 'branch': None, 'id': None} HG_PATS=[] |
|
71 | pre-identify hook: HG_ARGS=id HG_OPTS={'tags': None, 'rev': '', 'num': None, 'branch': None, 'id': None} HG_PATS=[] | |
72 | warning: pre-identify hook exited with status 1 |
|
72 | warning: pre-identify hook exited with status 1 | |
73 | $ hg cat b |
|
73 | $ hg cat b | |
74 | pre-cat hook: HG_ARGS=cat b HG_OPTS={'rev': '', 'decode': None, 'exclude': [], 'output': '', 'include': []} HG_PATS=['b'] |
|
74 | pre-cat hook: HG_ARGS=cat b HG_OPTS={'rev': '', 'decode': None, 'exclude': [], 'output': '', 'include': []} HG_PATS=['b'] | |
75 | post-cat hook: HG_ARGS=cat b HG_OPTS={'rev': '', 'decode': None, 'exclude': [], 'output': '', 'include': []} HG_PATS=['b'] HG_RESULT=0 |
|
75 | post-cat hook: HG_ARGS=cat b HG_OPTS={'rev': '', 'decode': None, 'exclude': [], 'output': '', 'include': []} HG_PATS=['b'] HG_RESULT=0 | |
76 | b |
|
76 | b | |
77 |
|
77 | |||
78 | $ cd ../b |
|
78 | $ cd ../b | |
79 | $ hg pull ../a |
|
79 | $ hg pull ../a | |
80 | prechangegroup hook: HG_SOURCE=pull HG_URL=file: |
|
80 | prechangegroup hook: HG_SOURCE=pull HG_URL=file: | |
81 |
changegroup hook: HG_NODE= |
|
81 | changegroup hook: HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_SOURCE=pull HG_URL=file: | |
82 |
incoming hook: HG_NODE= |
|
82 | incoming hook: HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_SOURCE=pull HG_URL=file: | |
83 |
incoming hook: HG_NODE= |
|
83 | incoming hook: HG_NODE=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_SOURCE=pull HG_URL=file: | |
84 |
incoming hook: HG_NODE= |
|
84 | incoming hook: HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_SOURCE=pull HG_URL=file: | |
85 | pulling from ../a |
|
85 | pulling from ../a | |
86 | searching for changes |
|
86 | searching for changes | |
87 | adding changesets |
|
87 | adding changesets | |
88 | adding manifests |
|
88 | adding manifests | |
89 | adding file changes |
|
89 | adding file changes | |
90 | added 3 changesets with 2 changes to 2 files |
|
90 | added 3 changesets with 2 changes to 2 files | |
91 | (run 'hg update' to get a working copy) |
|
91 | (run 'hg update' to get a working copy) | |
92 |
|
92 | |||
93 | # tag hooks can see env vars |
|
93 | # tag hooks can see env vars | |
94 |
|
94 | |||
95 | $ cd ../a |
|
95 | $ cd ../a | |
96 | $ echo 'pretag = python ../printenv.py pretag' >> .hg/hgrc |
|
96 | $ echo 'pretag = python ../printenv.py pretag' >> .hg/hgrc | |
97 |
$ echo 'tag = unset HG_PARENT1 HG_PARENT2; |
|
97 | $ echo 'tag = unset HG_PARENT1 HG_PARENT2; python ../printenv.py tag' >> .hg/hgrc | |
98 | $ hg tag -d '3 0' a |
|
98 | $ hg tag -d '3 0' a | |
99 | pretag hook: HG_LOCAL=0 HG_NODE=4c52fb2e402287dd5dc052090682536c8406c321 HG_TAG=a |
|
99 | pretag hook: HG_LOCAL=0 HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_TAG=a | |
100 | precommit hook: HG_PARENT1=4c52fb2e402287dd5dc052090682536c8406c321 |
|
100 | precommit hook: HG_PARENT1=07f3376c1e655977439df2a814e3cc14b27abac2 | |
101 | pretxncommit hook: HG_NODE=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_PARENT1=4c52fb2e402287dd5dc052090682536c8406c321 HG_PENDING=$HGTMP/test-hook.t/a |
|
101 | pretxncommit hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PARENT1=07f3376c1e655977439df2a814e3cc14b27abac2 HG_PENDING=$HGTMP/test-hook.t/a | |
102 | 4:8ea2ef7ad3e8 |
|
102 | 4:539e4b31b6dc | |
103 | commit hook: HG_NODE=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_PARENT1=4c52fb2e402287dd5dc052090682536c8406c321 |
|
103 | commit hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PARENT1=07f3376c1e655977439df2a814e3cc14b27abac2 | |
104 | commit.b hook: HG_NODE=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_PARENT1=4c52fb2e402287dd5dc052090682536c8406c321 |
|
104 | commit.b hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PARENT1=07f3376c1e655977439df2a814e3cc14b27abac2 | |
105 | tag hook: HG_LOCAL=0 HG_NODE=4c52fb2e402287dd5dc052090682536c8406c321 HG_TAG=a |
|
105 | tag hook: HG_LOCAL=0 HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_TAG=a | |
106 | $ hg tag -l la |
|
106 | $ hg tag -l la | |
107 |
pretag hook: HG_LOCAL=1 HG_NODE= |
|
107 | pretag hook: HG_LOCAL=1 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=la | |
108 |
tag hook: HG_LOCAL=1 HG_NODE= |
|
108 | tag hook: HG_LOCAL=1 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=la | |
109 |
|
109 | |||
110 | # pretag hook can forbid tagging |
|
110 | # pretag hook can forbid tagging | |
111 |
|
111 | |||
112 | $ echo 'pretag.forbid = python ../printenv.py pretag.forbid 1' >> .hg/hgrc |
|
112 | $ echo 'pretag.forbid = python ../printenv.py pretag.forbid 1' >> .hg/hgrc | |
113 | $ hg tag -d '4 0' fa |
|
113 | $ hg tag -d '4 0' fa | |
114 |
pretag hook: HG_LOCAL=0 HG_NODE= |
|
114 | pretag hook: HG_LOCAL=0 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=fa | |
115 |
pretag.forbid hook: HG_LOCAL=0 HG_NODE= |
|
115 | pretag.forbid hook: HG_LOCAL=0 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=fa | |
116 | abort: pretag.forbid hook exited with status 1 |
|
116 | abort: pretag.forbid hook exited with status 1 | |
117 | $ hg tag -l fla |
|
117 | $ hg tag -l fla | |
118 |
pretag hook: HG_LOCAL=1 HG_NODE= |
|
118 | pretag hook: HG_LOCAL=1 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=fla | |
119 |
pretag.forbid hook: HG_LOCAL=1 HG_NODE= |
|
119 | pretag.forbid hook: HG_LOCAL=1 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=fla | |
120 | abort: pretag.forbid hook exited with status 1 |
|
120 | abort: pretag.forbid hook exited with status 1 | |
121 |
|
121 | |||
122 | # pretxncommit hook can see changeset, can roll back txn, changeset |
|
122 | # pretxncommit hook can see changeset, can roll back txn, changeset | |
123 | # no more there after |
|
123 | # no more there after | |
124 |
|
124 | |||
125 | $ echo 'pretxncommit.forbid0 = hg tip -q' >> .hg/hgrc |
|
125 | $ echo 'pretxncommit.forbid0 = hg tip -q' >> .hg/hgrc | |
126 | $ echo 'pretxncommit.forbid1 = python ../printenv.py pretxncommit.forbid 1' >> .hg/hgrc |
|
126 | $ echo 'pretxncommit.forbid1 = python ../printenv.py pretxncommit.forbid 1' >> .hg/hgrc | |
127 | $ echo z > z |
|
127 | $ echo z > z | |
128 | $ hg add z |
|
128 | $ hg add z | |
129 | $ hg -q tip |
|
129 | $ hg -q tip | |
130 | 4:8ea2ef7ad3e8 |
|
130 | 4:539e4b31b6dc | |
131 | $ hg commit -m 'fail' -d '4 0' |
|
131 | $ hg commit -m 'fail' -d '4 0' | |
132 | precommit hook: HG_PARENT1=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 |
|
132 | precommit hook: HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 | |
133 |
pretxncommit hook: HG_NODE= |
|
133 | pretxncommit hook: HG_NODE=6f611f8018c10e827fee6bd2bc807f937e761567 HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PENDING=$HGTMP/test-hook.t/a | |
134 | 5:fad284daf8c0 |
|
134 | 5:6f611f8018c1 | |
135 | 5:fad284daf8c0 |
|
135 | 5:6f611f8018c1 | |
136 |
pretxncommit.forbid hook: HG_NODE= |
|
136 | pretxncommit.forbid hook: HG_NODE=6f611f8018c10e827fee6bd2bc807f937e761567 HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PENDING=$HGTMP/test-hook.t/a | |
137 | transaction abort! |
|
137 | transaction abort! | |
138 | rollback completed |
|
138 | rollback completed | |
139 | abort: pretxncommit.forbid1 hook exited with status 1 |
|
139 | abort: pretxncommit.forbid1 hook exited with status 1 | |
140 | $ hg -q tip |
|
140 | $ hg -q tip | |
141 | 4:8ea2ef7ad3e8 |
|
141 | 4:539e4b31b6dc | |
142 |
|
142 | |||
143 | # precommit hook can prevent commit |
|
143 | # precommit hook can prevent commit | |
144 |
|
144 | |||
145 | $ echo 'precommit.forbid = python ../printenv.py precommit.forbid 1' >> .hg/hgrc |
|
145 | $ echo 'precommit.forbid = python ../printenv.py precommit.forbid 1' >> .hg/hgrc | |
146 | $ hg commit -m 'fail' -d '4 0' |
|
146 | $ hg commit -m 'fail' -d '4 0' | |
147 | precommit hook: HG_PARENT1=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 |
|
147 | precommit hook: HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 | |
148 |
precommit.forbid hook: HG_PARENT1= |
|
148 | precommit.forbid hook: HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 | |
149 | abort: precommit.forbid hook exited with status 1 |
|
149 | abort: precommit.forbid hook exited with status 1 | |
150 | $ hg -q tip |
|
150 | $ hg -q tip | |
151 | 4:8ea2ef7ad3e8 |
|
151 | 4:539e4b31b6dc | |
152 |
|
152 | |||
153 | # preupdate hook can prevent update |
|
153 | # preupdate hook can prevent update | |
154 |
|
154 | |||
155 | $ echo 'preupdate = python ../printenv.py preupdate' >> .hg/hgrc |
|
155 | $ echo 'preupdate = python ../printenv.py preupdate' >> .hg/hgrc | |
156 | $ hg update 1 |
|
156 | $ hg update 1 | |
157 |
preupdate hook: HG_PARENT1= |
|
157 | preupdate hook: HG_PARENT1=ab228980c14d | |
158 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
158 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
159 |
|
159 | |||
160 | # update hook |
|
160 | # update hook | |
161 |
|
161 | |||
162 | $ echo 'update = python ../printenv.py update' >> .hg/hgrc |
|
162 | $ echo 'update = python ../printenv.py update' >> .hg/hgrc | |
163 | $ hg update |
|
163 | $ hg update | |
164 |
preupdate hook: HG_PARENT1= |
|
164 | preupdate hook: HG_PARENT1=539e4b31b6dc | |
165 |
update hook: HG_ERROR=0 HG_PARENT1= |
|
165 | update hook: HG_ERROR=0 HG_PARENT1=539e4b31b6dc | |
166 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
166 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
167 |
|
167 | |||
168 | # prechangegroup hook can prevent incoming changes |
|
168 | # prechangegroup hook can prevent incoming changes | |
169 |
|
169 | |||
170 | $ cd ../b |
|
170 | $ cd ../b | |
171 | $ hg -q tip |
|
171 | $ hg -q tip | |
172 | 3:4c52fb2e4022 |
|
172 | 3:07f3376c1e65 | |
173 | $ echo '[hooks]' > .hg/hgrc |
|
173 | $ echo '[hooks]' > .hg/hgrc | |
174 | $ echo 'prechangegroup.forbid = python ../printenv.py prechangegroup.forbid 1' >> .hg/hgrc |
|
174 | $ echo 'prechangegroup.forbid = python ../printenv.py prechangegroup.forbid 1' >> .hg/hgrc | |
175 | $ hg pull ../a |
|
175 | $ hg pull ../a | |
176 | prechangegroup.forbid hook: HG_SOURCE=pull HG_URL=file: |
|
176 | prechangegroup.forbid hook: HG_SOURCE=pull HG_URL=file: | |
177 | pulling from ../a |
|
177 | pulling from ../a | |
178 | searching for changes |
|
178 | searching for changes | |
179 | abort: prechangegroup.forbid hook exited with status 1 |
|
179 | abort: prechangegroup.forbid hook exited with status 1 | |
180 |
|
180 | |||
181 | # pretxnchangegroup hook can see incoming changes, can roll back txn, |
|
181 | # pretxnchangegroup hook can see incoming changes, can roll back txn, | |
182 | # incoming changes no longer there after |
|
182 | # incoming changes no longer there after | |
183 |
|
183 | |||
184 | $ echo '[hooks]' > .hg/hgrc |
|
184 | $ echo '[hooks]' > .hg/hgrc | |
185 | $ echo 'pretxnchangegroup.forbid0 = hg tip -q' >> .hg/hgrc |
|
185 | $ echo 'pretxnchangegroup.forbid0 = hg tip -q' >> .hg/hgrc | |
186 | $ echo 'pretxnchangegroup.forbid1 = python ../printenv.py pretxnchangegroup.forbid 1' >> .hg/hgrc |
|
186 | $ echo 'pretxnchangegroup.forbid1 = python ../printenv.py pretxnchangegroup.forbid 1' >> .hg/hgrc | |
187 | $ hg pull ../a |
|
187 | $ hg pull ../a | |
188 | 4:8ea2ef7ad3e8 |
|
188 | 4:539e4b31b6dc | |
189 |
pretxnchangegroup.forbid hook: HG_NODE= |
|
189 | pretxnchangegroup.forbid hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PENDING=$HGTMP/test-hook.t/b HG_SOURCE=pull HG_URL=file: | |
190 | pulling from ../a |
|
190 | pulling from ../a | |
191 | searching for changes |
|
191 | searching for changes | |
192 | adding changesets |
|
192 | adding changesets | |
193 | adding manifests |
|
193 | adding manifests | |
194 | adding file changes |
|
194 | adding file changes | |
195 | added 1 changesets with 1 changes to 1 files |
|
195 | added 1 changesets with 1 changes to 1 files | |
196 | transaction abort! |
|
196 | transaction abort! | |
197 | rollback completed |
|
197 | rollback completed | |
198 | abort: pretxnchangegroup.forbid1 hook exited with status 1 |
|
198 | abort: pretxnchangegroup.forbid1 hook exited with status 1 | |
199 | $ hg -q tip |
|
199 | $ hg -q tip | |
200 | 3:4c52fb2e4022 |
|
200 | 3:07f3376c1e65 | |
201 |
|
201 | |||
202 | # outgoing hooks can see env vars |
|
202 | # outgoing hooks can see env vars | |
203 |
|
203 | |||
204 | $ rm .hg/hgrc |
|
204 | $ rm .hg/hgrc | |
205 | $ echo '[hooks]' > ../a/.hg/hgrc |
|
205 | $ echo '[hooks]' > ../a/.hg/hgrc | |
206 | $ echo 'preoutgoing = python ../printenv.py preoutgoing' >> ../a/.hg/hgrc |
|
206 | $ echo 'preoutgoing = python ../printenv.py preoutgoing' >> ../a/.hg/hgrc | |
207 | $ echo 'outgoing = python ../printenv.py outgoing' >> ../a/.hg/hgrc |
|
207 | $ echo 'outgoing = python ../printenv.py outgoing' >> ../a/.hg/hgrc | |
208 | $ hg pull ../a |
|
208 | $ hg pull ../a | |
209 | preoutgoing hook: HG_SOURCE=pull |
|
209 | preoutgoing hook: HG_SOURCE=pull | |
210 |
outgoing hook: HG_NODE= |
|
210 | outgoing hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_SOURCE=pull | |
211 | pulling from ../a |
|
211 | pulling from ../a | |
212 | searching for changes |
|
212 | searching for changes | |
213 | adding changesets |
|
213 | adding changesets | |
214 | adding manifests |
|
214 | adding manifests | |
215 | adding file changes |
|
215 | adding file changes | |
216 | added 1 changesets with 1 changes to 1 files |
|
216 | added 1 changesets with 1 changes to 1 files | |
217 | (run 'hg update' to get a working copy) |
|
217 | (run 'hg update' to get a working copy) | |
218 | $ hg rollback |
|
218 | $ hg rollback | |
219 | rolling back to revision 3 (undo pull) |
|
219 | rolling back to revision 3 (undo pull) | |
220 |
|
220 | |||
221 | # preoutgoing hook can prevent outgoing changes |
|
221 | # preoutgoing hook can prevent outgoing changes | |
222 |
|
222 | |||
223 | $ echo 'preoutgoing.forbid = python ../printenv.py preoutgoing.forbid 1' >> ../a/.hg/hgrc |
|
223 | $ echo 'preoutgoing.forbid = python ../printenv.py preoutgoing.forbid 1' >> ../a/.hg/hgrc | |
224 | $ hg pull ../a |
|
224 | $ hg pull ../a | |
225 | preoutgoing hook: HG_SOURCE=pull |
|
225 | preoutgoing hook: HG_SOURCE=pull | |
226 | preoutgoing.forbid hook: HG_SOURCE=pull |
|
226 | preoutgoing.forbid hook: HG_SOURCE=pull | |
227 | pulling from ../a |
|
227 | pulling from ../a | |
228 | searching for changes |
|
228 | searching for changes | |
229 | abort: preoutgoing.forbid hook exited with status 1 |
|
229 | abort: preoutgoing.forbid hook exited with status 1 | |
230 |
|
230 | |||
231 | # outgoing hooks work for local clones |
|
231 | # outgoing hooks work for local clones | |
232 |
|
232 | |||
233 | $ cd .. |
|
233 | $ cd .. | |
234 | $ echo '[hooks]' > a/.hg/hgrc |
|
234 | $ echo '[hooks]' > a/.hg/hgrc | |
235 | $ echo 'preoutgoing = python ../printenv.py preoutgoing' >> a/.hg/hgrc |
|
235 | $ echo 'preoutgoing = python ../printenv.py preoutgoing' >> a/.hg/hgrc | |
236 | $ echo 'outgoing = python ../printenv.py outgoing' >> a/.hg/hgrc |
|
236 | $ echo 'outgoing = python ../printenv.py outgoing' >> a/.hg/hgrc | |
237 | $ hg clone a c |
|
237 | $ hg clone a c | |
238 | preoutgoing hook: HG_SOURCE=clone |
|
238 | preoutgoing hook: HG_SOURCE=clone | |
239 | outgoing hook: HG_NODE=0000000000000000000000000000000000000000 HG_SOURCE=clone |
|
239 | outgoing hook: HG_NODE=0000000000000000000000000000000000000000 HG_SOURCE=clone | |
240 | updating to branch default |
|
240 | updating to branch default | |
241 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
241 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
242 | $ rm -rf c |
|
242 | $ rm -rf c | |
243 |
|
243 | |||
244 | # preoutgoing hook can prevent outgoing changes for local clones |
|
244 | # preoutgoing hook can prevent outgoing changes for local clones | |
245 |
|
245 | |||
246 | $ echo 'preoutgoing.forbid = python ../printenv.py preoutgoing.forbid 1' >> a/.hg/hgrc |
|
246 | $ echo 'preoutgoing.forbid = python ../printenv.py preoutgoing.forbid 1' >> a/.hg/hgrc | |
247 | $ hg clone a zzz |
|
247 | $ hg clone a zzz | |
248 | preoutgoing hook: HG_SOURCE=clone |
|
248 | preoutgoing hook: HG_SOURCE=clone | |
249 | preoutgoing.forbid hook: HG_SOURCE=clone |
|
249 | preoutgoing.forbid hook: HG_SOURCE=clone | |
250 | abort: preoutgoing.forbid hook exited with status 1 |
|
250 | abort: preoutgoing.forbid hook exited with status 1 | |
251 | $ cd b |
|
251 | $ cd b | |
252 |
|
252 | |||
253 | $ cat > hooktests.py <<EOF |
|
253 | $ cat > hooktests.py <<EOF | |
254 | > from mercurial import util |
|
254 | > from mercurial import util | |
255 | > |
|
255 | > | |
256 | > uncallable = 0 |
|
256 | > uncallable = 0 | |
257 | > |
|
257 | > | |
258 | > def printargs(args): |
|
258 | > def printargs(args): | |
259 | > args.pop('ui', None) |
|
259 | > args.pop('ui', None) | |
260 | > args.pop('repo', None) |
|
260 | > args.pop('repo', None) | |
261 | > a = list(args.items()) |
|
261 | > a = list(args.items()) | |
262 | > a.sort() |
|
262 | > a.sort() | |
263 | > print 'hook args:' |
|
263 | > print 'hook args:' | |
264 | > for k, v in a: |
|
264 | > for k, v in a: | |
265 | > print ' ', k, v |
|
265 | > print ' ', k, v | |
266 | > |
|
266 | > | |
267 | > def passhook(**args): |
|
267 | > def passhook(**args): | |
268 | > printargs(args) |
|
268 | > printargs(args) | |
269 | > |
|
269 | > | |
270 | > def failhook(**args): |
|
270 | > def failhook(**args): | |
271 | > printargs(args) |
|
271 | > printargs(args) | |
272 | > return True |
|
272 | > return True | |
273 | > |
|
273 | > | |
274 | > class LocalException(Exception): |
|
274 | > class LocalException(Exception): | |
275 | > pass |
|
275 | > pass | |
276 | > |
|
276 | > | |
277 | > def raisehook(**args): |
|
277 | > def raisehook(**args): | |
278 | > raise LocalException('exception from hook') |
|
278 | > raise LocalException('exception from hook') | |
279 | > |
|
279 | > | |
280 | > def aborthook(**args): |
|
280 | > def aborthook(**args): | |
281 | > raise util.Abort('raise abort from hook') |
|
281 | > raise util.Abort('raise abort from hook') | |
282 | > |
|
282 | > | |
283 | > def brokenhook(**args): |
|
283 | > def brokenhook(**args): | |
284 | > return 1 + {} |
|
284 | > return 1 + {} | |
285 | > |
|
285 | > | |
286 | > class container: |
|
286 | > class container: | |
287 | > unreachable = 1 |
|
287 | > unreachable = 1 | |
288 | > EOF |
|
288 | > EOF | |
289 |
|
289 | |||
290 | # test python hooks |
|
290 | # test python hooks | |
291 |
|
291 | |||
292 | $ PYTHONPATH="`pwd`:$PYTHONPATH" |
|
292 | $ PYTHONPATH="`pwd`:$PYTHONPATH" | |
293 | $ export PYTHONPATH |
|
293 | $ export PYTHONPATH | |
294 |
|
294 | |||
295 | $ echo '[hooks]' > ../a/.hg/hgrc |
|
295 | $ echo '[hooks]' > ../a/.hg/hgrc | |
296 | $ echo 'preoutgoing.broken = python:hooktests.brokenhook' >> ../a/.hg/hgrc |
|
296 | $ echo 'preoutgoing.broken = python:hooktests.brokenhook' >> ../a/.hg/hgrc | |
297 | $ hg pull ../a 2>&1 | grep 'raised an exception' |
|
297 | $ hg pull ../a 2>&1 | grep 'raised an exception' | |
298 | error: preoutgoing.broken hook raised an exception: unsupported operand type(s) for +: 'int' and 'dict' |
|
298 | error: preoutgoing.broken hook raised an exception: unsupported operand type(s) for +: 'int' and 'dict' | |
299 |
|
299 | |||
300 | $ echo '[hooks]' > ../a/.hg/hgrc |
|
300 | $ echo '[hooks]' > ../a/.hg/hgrc | |
301 | $ echo 'preoutgoing.raise = python:hooktests.raisehook' >> ../a/.hg/hgrc |
|
301 | $ echo 'preoutgoing.raise = python:hooktests.raisehook' >> ../a/.hg/hgrc | |
302 | $ hg pull ../a 2>&1 | grep 'raised an exception' |
|
302 | $ hg pull ../a 2>&1 | grep 'raised an exception' | |
303 | error: preoutgoing.raise hook raised an exception: exception from hook |
|
303 | error: preoutgoing.raise hook raised an exception: exception from hook | |
304 |
|
304 | |||
305 | $ echo '[hooks]' > ../a/.hg/hgrc |
|
305 | $ echo '[hooks]' > ../a/.hg/hgrc | |
306 | $ echo 'preoutgoing.abort = python:hooktests.aborthook' >> ../a/.hg/hgrc |
|
306 | $ echo 'preoutgoing.abort = python:hooktests.aborthook' >> ../a/.hg/hgrc | |
307 | $ hg pull ../a |
|
307 | $ hg pull ../a | |
308 | pulling from ../a |
|
308 | pulling from ../a | |
309 | searching for changes |
|
309 | searching for changes | |
310 | error: preoutgoing.abort hook failed: raise abort from hook |
|
310 | error: preoutgoing.abort hook failed: raise abort from hook | |
311 | abort: raise abort from hook |
|
311 | abort: raise abort from hook | |
312 |
|
312 | |||
313 | $ echo '[hooks]' > ../a/.hg/hgrc |
|
313 | $ echo '[hooks]' > ../a/.hg/hgrc | |
314 | $ echo 'preoutgoing.fail = python:hooktests.failhook' >> ../a/.hg/hgrc |
|
314 | $ echo 'preoutgoing.fail = python:hooktests.failhook' >> ../a/.hg/hgrc | |
315 | $ hg pull ../a |
|
315 | $ hg pull ../a | |
316 | pulling from ../a |
|
316 | pulling from ../a | |
317 | searching for changes |
|
317 | searching for changes | |
318 | hook args: |
|
318 | hook args: | |
319 | hooktype preoutgoing |
|
319 | hooktype preoutgoing | |
320 | source pull |
|
320 | source pull | |
321 | abort: preoutgoing.fail hook failed |
|
321 | abort: preoutgoing.fail hook failed | |
322 |
|
322 | |||
323 | $ echo '[hooks]' > ../a/.hg/hgrc |
|
323 | $ echo '[hooks]' > ../a/.hg/hgrc | |
324 | $ echo 'preoutgoing.uncallable = python:hooktests.uncallable' >> ../a/.hg/hgrc |
|
324 | $ echo 'preoutgoing.uncallable = python:hooktests.uncallable' >> ../a/.hg/hgrc | |
325 | $ hg pull ../a |
|
325 | $ hg pull ../a | |
326 | pulling from ../a |
|
326 | pulling from ../a | |
327 | searching for changes |
|
327 | searching for changes | |
328 | abort: preoutgoing.uncallable hook is invalid ("hooktests.uncallable" is not callable) |
|
328 | abort: preoutgoing.uncallable hook is invalid ("hooktests.uncallable" is not callable) | |
329 |
|
329 | |||
330 | $ echo '[hooks]' > ../a/.hg/hgrc |
|
330 | $ echo '[hooks]' > ../a/.hg/hgrc | |
331 | $ echo 'preoutgoing.nohook = python:hooktests.nohook' >> ../a/.hg/hgrc |
|
331 | $ echo 'preoutgoing.nohook = python:hooktests.nohook' >> ../a/.hg/hgrc | |
332 | $ hg pull ../a |
|
332 | $ hg pull ../a | |
333 | pulling from ../a |
|
333 | pulling from ../a | |
334 | searching for changes |
|
334 | searching for changes | |
335 | abort: preoutgoing.nohook hook is invalid ("hooktests.nohook" is not defined) |
|
335 | abort: preoutgoing.nohook hook is invalid ("hooktests.nohook" is not defined) | |
336 |
|
336 | |||
337 | $ echo '[hooks]' > ../a/.hg/hgrc |
|
337 | $ echo '[hooks]' > ../a/.hg/hgrc | |
338 | $ echo 'preoutgoing.nomodule = python:nomodule' >> ../a/.hg/hgrc |
|
338 | $ echo 'preoutgoing.nomodule = python:nomodule' >> ../a/.hg/hgrc | |
339 | $ hg pull ../a |
|
339 | $ hg pull ../a | |
340 | pulling from ../a |
|
340 | pulling from ../a | |
341 | searching for changes |
|
341 | searching for changes | |
342 | abort: preoutgoing.nomodule hook is invalid ("nomodule" not in a module) |
|
342 | abort: preoutgoing.nomodule hook is invalid ("nomodule" not in a module) | |
343 |
|
343 | |||
344 | $ echo '[hooks]' > ../a/.hg/hgrc |
|
344 | $ echo '[hooks]' > ../a/.hg/hgrc | |
345 | $ echo 'preoutgoing.badmodule = python:nomodule.nowhere' >> ../a/.hg/hgrc |
|
345 | $ echo 'preoutgoing.badmodule = python:nomodule.nowhere' >> ../a/.hg/hgrc | |
346 | $ hg pull ../a |
|
346 | $ hg pull ../a | |
347 | pulling from ../a |
|
347 | pulling from ../a | |
348 | searching for changes |
|
348 | searching for changes | |
349 | abort: preoutgoing.badmodule hook is invalid (import of "nomodule" failed) |
|
349 | abort: preoutgoing.badmodule hook is invalid (import of "nomodule" failed) | |
350 |
|
350 | |||
351 | $ echo '[hooks]' > ../a/.hg/hgrc |
|
351 | $ echo '[hooks]' > ../a/.hg/hgrc | |
352 | $ echo 'preoutgoing.unreachable = python:hooktests.container.unreachable' >> ../a/.hg/hgrc |
|
352 | $ echo 'preoutgoing.unreachable = python:hooktests.container.unreachable' >> ../a/.hg/hgrc | |
353 | $ hg pull ../a |
|
353 | $ hg pull ../a | |
354 | pulling from ../a |
|
354 | pulling from ../a | |
355 | searching for changes |
|
355 | searching for changes | |
356 | abort: preoutgoing.unreachable hook is invalid (import of "hooktests.container" failed) |
|
356 | abort: preoutgoing.unreachable hook is invalid (import of "hooktests.container" failed) | |
357 |
|
357 | |||
358 | $ echo '[hooks]' > ../a/.hg/hgrc |
|
358 | $ echo '[hooks]' > ../a/.hg/hgrc | |
359 | $ echo 'preoutgoing.pass = python:hooktests.passhook' >> ../a/.hg/hgrc |
|
359 | $ echo 'preoutgoing.pass = python:hooktests.passhook' >> ../a/.hg/hgrc | |
360 | $ hg pull ../a |
|
360 | $ hg pull ../a | |
361 | pulling from ../a |
|
361 | pulling from ../a | |
362 | searching for changes |
|
362 | searching for changes | |
363 | hook args: |
|
363 | hook args: | |
364 | hooktype preoutgoing |
|
364 | hooktype preoutgoing | |
365 | source pull |
|
365 | source pull | |
366 | adding changesets |
|
366 | adding changesets | |
367 | adding manifests |
|
367 | adding manifests | |
368 | adding file changes |
|
368 | adding file changes | |
369 | added 1 changesets with 1 changes to 1 files |
|
369 | added 1 changesets with 1 changes to 1 files | |
370 | (run 'hg update' to get a working copy) |
|
370 | (run 'hg update' to get a working copy) | |
371 |
|
371 | |||
372 | # make sure --traceback works |
|
372 | # make sure --traceback works | |
373 |
|
373 | |||
374 | $ echo '[hooks]' > .hg/hgrc |
|
374 | $ echo '[hooks]' > .hg/hgrc | |
375 | $ echo 'commit.abort = python:hooktests.aborthook' >> .hg/hgrc |
|
375 | $ echo 'commit.abort = python:hooktests.aborthook' >> .hg/hgrc | |
376 |
|
376 | |||
377 | $ echo aa > a |
|
377 | $ echo aa > a | |
378 | $ hg --traceback commit -d '0 0' -ma 2>&1 | grep '^Traceback' |
|
378 | $ hg --traceback commit -d '0 0' -ma 2>&1 | grep '^Traceback' | |
379 | Traceback (most recent call last): |
|
379 | Traceback (most recent call last): | |
380 |
|
380 | |||
381 | $ cd .. |
|
381 | $ cd .. | |
382 | $ hg init c |
|
382 | $ hg init c | |
383 | $ cd c |
|
383 | $ cd c | |
384 |
|
384 | |||
385 | $ cat > hookext.py <<EOF |
|
385 | $ cat > hookext.py <<EOF | |
386 | > def autohook(**args): |
|
386 | > def autohook(**args): | |
387 | > print "Automatically installed hook" |
|
387 | > print "Automatically installed hook" | |
388 | > |
|
388 | > | |
389 | > def reposetup(ui, repo): |
|
389 | > def reposetup(ui, repo): | |
390 | > repo.ui.setconfig("hooks", "commit.auto", autohook) |
|
390 | > repo.ui.setconfig("hooks", "commit.auto", autohook) | |
391 | > EOF |
|
391 | > EOF | |
392 | $ echo '[extensions]' >> .hg/hgrc |
|
392 | $ echo '[extensions]' >> .hg/hgrc | |
393 | $ echo 'hookext = hookext.py' >> .hg/hgrc |
|
393 | $ echo 'hookext = hookext.py' >> .hg/hgrc | |
394 |
|
394 | |||
395 | $ touch foo |
|
395 | $ touch foo | |
396 | $ hg add foo |
|
396 | $ hg add foo | |
397 | $ hg ci -d '0 0' -m 'add foo' |
|
397 | $ hg ci -d '0 0' -m 'add foo' | |
398 | Automatically installed hook |
|
398 | Automatically installed hook | |
399 | $ echo >> foo |
|
399 | $ echo >> foo | |
400 | $ hg ci --debug -d '0 0' -m 'change foo' |
|
400 | $ hg ci --debug -d '0 0' -m 'change foo' | |
401 | foo |
|
401 | foo | |
402 | calling hook commit.auto: <function autohook at .*> |
|
402 | calling hook commit.auto: <function autohook at .*> | |
403 | Automatically installed hook |
|
403 | Automatically installed hook | |
404 | committed changeset 1:52998019f6252a2b893452765fcb0a47351a5708 |
|
404 | committed changeset 1:52998019f6252a2b893452765fcb0a47351a5708 | |
405 |
|
405 | |||
406 | $ hg showconfig hooks |
|
406 | $ hg showconfig hooks | |
407 | hooks.commit.auto=<function autohook at .*> |
|
407 | hooks.commit.auto=<function autohook at .*> | |
408 |
|
408 | |||
409 | # test python hook configured with python:[file]:[hook] syntax |
|
409 | # test python hook configured with python:[file]:[hook] syntax | |
410 |
|
410 | |||
411 | $ cd .. |
|
411 | $ cd .. | |
412 | $ mkdir d |
|
412 | $ mkdir d | |
413 | $ cd d |
|
413 | $ cd d | |
414 | $ hg init repo |
|
414 | $ hg init repo | |
415 | $ mkdir hooks |
|
415 | $ mkdir hooks | |
416 |
|
416 | |||
417 | $ cd hooks |
|
417 | $ cd hooks | |
418 | $ cat > testhooks.py <<EOF |
|
418 | $ cat > testhooks.py <<EOF | |
419 | > def testhook(**args): |
|
419 | > def testhook(**args): | |
420 | > print 'hook works' |
|
420 | > print 'hook works' | |
421 | > EOF |
|
421 | > EOF | |
422 | $ echo '[hooks]' > ../repo/.hg/hgrc |
|
422 | $ echo '[hooks]' > ../repo/.hg/hgrc | |
423 | $ echo "pre-commit.test = python:`pwd`/testhooks.py:testhook" >> ../repo/.hg/hgrc |
|
423 | $ echo "pre-commit.test = python:`pwd`/testhooks.py:testhook" >> ../repo/.hg/hgrc | |
424 |
|
424 | |||
425 | $ cd ../repo |
|
425 | $ cd ../repo | |
426 | $ hg commit -d '0 0' |
|
426 | $ hg commit -d '0 0' | |
427 | hook works |
|
427 | hook works | |
428 | nothing changed |
|
428 | nothing changed | |
429 |
|
429 | |||
430 | $ cd ../../b |
|
430 | $ cd ../../b | |
431 |
|
431 | |||
432 | # make sure --traceback works on hook import failure |
|
432 | # make sure --traceback works on hook import failure | |
433 |
|
433 | |||
434 | $ cat > importfail.py <<EOF |
|
434 | $ cat > importfail.py <<EOF | |
435 | > import somebogusmodule |
|
435 | > import somebogusmodule | |
436 | > # dereference something in the module to force demandimport to load it |
|
436 | > # dereference something in the module to force demandimport to load it | |
437 | > somebogusmodule.whatever |
|
437 | > somebogusmodule.whatever | |
438 | > EOF |
|
438 | > EOF | |
439 |
|
439 | |||
440 | $ echo '[hooks]' > .hg/hgrc |
|
440 | $ echo '[hooks]' > .hg/hgrc | |
441 | $ echo 'precommit.importfail = python:importfail.whatever' >> .hg/hgrc |
|
441 | $ echo 'precommit.importfail = python:importfail.whatever' >> .hg/hgrc | |
442 |
|
442 | |||
443 | $ echo a >> a |
|
443 | $ echo a >> a | |
444 |
$ hg --traceback commit - |
|
444 | $ hg --traceback commit -ma 2>&1 | egrep '^(exception|Traceback|ImportError)' | |
445 | exception from first failed import attempt: |
|
445 | exception from first failed import attempt: | |
446 | Traceback (most recent call last): |
|
446 | Traceback (most recent call last): | |
447 | ImportError: No module named somebogusmodule |
|
447 | ImportError: No module named somebogusmodule | |
448 | exception from second failed import attempt: |
|
448 | exception from second failed import attempt: | |
449 | Traceback (most recent call last): |
|
449 | Traceback (most recent call last): | |
450 | ImportError: No module named hgext_importfail |
|
450 | ImportError: No module named hgext_importfail | |
451 | Traceback (most recent call last): |
|
451 | Traceback (most recent call last): | |
452 |
|
452 | |||
453 | # commit and update hooks should run after command completion (issue 1827) |
|
453 | # commit and update hooks should run after command completion (issue 1827) | |
454 |
|
454 | |||
455 | $ echo '[hooks]' > .hg/hgrc |
|
455 | $ echo '[hooks]' > .hg/hgrc | |
456 | $ echo 'commit = hg id' >> .hg/hgrc |
|
456 | $ echo 'commit = hg id' >> .hg/hgrc | |
457 | $ echo 'update = hg id' >> .hg/hgrc |
|
457 | $ echo 'update = hg id' >> .hg/hgrc | |
458 | $ echo bb > a |
|
458 | $ echo bb > a | |
459 |
$ hg ci - |
|
459 | $ hg ci -ma | |
460 | 8da618c33484 tip |
|
460 | 223eafe2750c tip | |
461 | $ hg up 0 |
|
461 | $ hg up 0 | |
462 | 29b62aeb769f |
|
462 | cb9a9f314b8b | |
463 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
463 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
464 |
|
464 | |||
465 | $ exit 0 |
|
465 | $ exit 0 |
@@ -1,468 +1,468 b'' | |||||
1 | $ mkdir test |
|
1 | $ mkdir test | |
2 | $ cd test |
|
2 | $ cd test | |
3 | $ hg init |
|
3 | $ hg init | |
4 | $ for i in 0 1 2 3 4 5 6 7 8; do |
|
4 | $ for i in 0 1 2 3 4 5 6 7 8; do | |
5 | > echo $i >> foo |
|
5 | > echo $i >> foo | |
6 |
> hg commit -A -m $i |
|
6 | > hg commit -A -m $i | |
7 | > done |
|
7 | > done | |
8 | adding foo |
|
8 | adding foo | |
9 | $ hg verify |
|
9 | $ hg verify | |
10 | checking changesets |
|
10 | checking changesets | |
11 | checking manifests |
|
11 | checking manifests | |
12 | crosschecking files in changesets and manifests |
|
12 | crosschecking files in changesets and manifests | |
13 | checking files |
|
13 | checking files | |
14 | 1 files, 9 changesets, 9 total revisions |
|
14 | 1 files, 9 changesets, 9 total revisions | |
15 | $ hg serve -p $HGPORT -d --pid-file=hg.pid |
|
15 | $ hg serve -p $HGPORT -d --pid-file=hg.pid | |
16 | $ cat hg.pid >> $DAEMON_PIDS |
|
16 | $ cat hg.pid >> $DAEMON_PIDS | |
17 | $ cd .. |
|
17 | $ cd .. | |
18 |
|
18 | |||
19 | $ hg init new |
|
19 | $ hg init new | |
20 |
|
20 | |||
21 | http incoming |
|
21 | http incoming | |
22 |
|
22 | |||
23 | $ hg -R new incoming http://localhost:$HGPORT/ | sed -e "s,:$HGPORT/,:\$HGPORT/," |
|
23 | $ hg -R new incoming http://localhost:$HGPORT/ | sed -e "s,:$HGPORT/,:\$HGPORT/," | |
24 | comparing with http://localhost:$HGPORT/ |
|
24 | comparing with http://localhost:$HGPORT/ | |
25 |
changeset: 0: |
|
25 | changeset: 0:00a43fa82f62 | |
26 | user: test |
|
26 | user: test | |
27 |
date: |
|
27 | date: Thu Jan 01 00:00:00 1970 +0000 | |
28 | summary: 0 |
|
28 | summary: 0 | |
29 |
|
29 | |||
30 |
changeset: 1: |
|
30 | changeset: 1:5460a410df01 | |
31 | user: test |
|
31 | user: test | |
32 |
date: |
|
32 | date: Thu Jan 01 00:00:00 1970 +0000 | |
33 | summary: 1 |
|
33 | summary: 1 | |
34 |
|
34 | |||
35 |
changeset: 2: |
|
35 | changeset: 2:d9f42cd1a1ec | |
36 | user: test |
|
36 | user: test | |
37 |
date: |
|
37 | date: Thu Jan 01 00:00:00 1970 +0000 | |
38 | summary: 2 |
|
38 | summary: 2 | |
39 |
|
39 | |||
40 |
changeset: 3: |
|
40 | changeset: 3:376476025137 | |
41 | user: test |
|
41 | user: test | |
42 |
date: |
|
42 | date: Thu Jan 01 00:00:00 1970 +0000 | |
43 | summary: 3 |
|
43 | summary: 3 | |
44 |
|
44 | |||
45 |
changeset: 4: |
|
45 | changeset: 4:70d7eb252d49 | |
46 | user: test |
|
46 | user: test | |
47 |
date: |
|
47 | date: Thu Jan 01 00:00:00 1970 +0000 | |
48 | summary: 4 |
|
48 | summary: 4 | |
49 |
|
49 | |||
50 |
changeset: 5: |
|
50 | changeset: 5:ad284ee3b5ee | |
51 | user: test |
|
51 | user: test | |
52 |
date: |
|
52 | date: Thu Jan 01 00:00:00 1970 +0000 | |
53 | summary: 5 |
|
53 | summary: 5 | |
54 |
|
54 | |||
55 |
changeset: 6: |
|
55 | changeset: 6:e9229f2de384 | |
56 | user: test |
|
56 | user: test | |
57 |
date: |
|
57 | date: Thu Jan 01 00:00:00 1970 +0000 | |
58 | summary: 6 |
|
58 | summary: 6 | |
59 |
|
59 | |||
60 |
changeset: 7:d |
|
60 | changeset: 7:d152815bb8db | |
61 | user: test |
|
61 | user: test | |
62 |
date: |
|
62 | date: Thu Jan 01 00:00:00 1970 +0000 | |
63 | summary: 7 |
|
63 | summary: 7 | |
64 |
|
64 | |||
65 |
changeset: 8: |
|
65 | changeset: 8:e4feb4ac9035 | |
66 | tag: tip |
|
66 | tag: tip | |
67 | user: test |
|
67 | user: test | |
68 |
date: |
|
68 | date: Thu Jan 01 00:00:00 1970 +0000 | |
69 | summary: 8 |
|
69 | summary: 8 | |
70 |
|
70 | |||
71 | $ hg -R new incoming -r 4 http://localhost:$HGPORT/ | sed -e "s,:$HGPORT/,:\$HGPORT/," |
|
71 | $ hg -R new incoming -r 4 http://localhost:$HGPORT/ | sed -e "s,:$HGPORT/,:\$HGPORT/," | |
72 | comparing with http://localhost:$HGPORT/ |
|
72 | comparing with http://localhost:$HGPORT/ | |
73 |
changeset: 0: |
|
73 | changeset: 0:00a43fa82f62 | |
74 | user: test |
|
74 | user: test | |
75 |
date: |
|
75 | date: Thu Jan 01 00:00:00 1970 +0000 | |
76 | summary: 0 |
|
76 | summary: 0 | |
77 |
|
77 | |||
78 |
changeset: 1: |
|
78 | changeset: 1:5460a410df01 | |
79 | user: test |
|
79 | user: test | |
80 |
date: |
|
80 | date: Thu Jan 01 00:00:00 1970 +0000 | |
81 | summary: 1 |
|
81 | summary: 1 | |
82 |
|
82 | |||
83 |
changeset: 2: |
|
83 | changeset: 2:d9f42cd1a1ec | |
84 | user: test |
|
84 | user: test | |
85 |
date: |
|
85 | date: Thu Jan 01 00:00:00 1970 +0000 | |
86 | summary: 2 |
|
86 | summary: 2 | |
87 |
|
87 | |||
88 |
changeset: 3: |
|
88 | changeset: 3:376476025137 | |
89 | user: test |
|
89 | user: test | |
90 |
date: |
|
90 | date: Thu Jan 01 00:00:00 1970 +0000 | |
91 | summary: 3 |
|
91 | summary: 3 | |
92 |
|
92 | |||
93 |
changeset: 4: |
|
93 | changeset: 4:70d7eb252d49 | |
94 | tag: tip |
|
94 | tag: tip | |
95 | user: test |
|
95 | user: test | |
96 |
date: |
|
96 | date: Thu Jan 01 00:00:00 1970 +0000 | |
97 | summary: 4 |
|
97 | summary: 4 | |
98 |
|
98 | |||
99 |
|
99 | |||
100 | local incoming |
|
100 | local incoming | |
101 |
|
101 | |||
102 | $ hg -R new incoming test |
|
102 | $ hg -R new incoming test | |
103 | comparing with test |
|
103 | comparing with test | |
104 |
changeset: 0: |
|
104 | changeset: 0:00a43fa82f62 | |
105 | user: test |
|
105 | user: test | |
106 |
date: |
|
106 | date: Thu Jan 01 00:00:00 1970 +0000 | |
107 | summary: 0 |
|
107 | summary: 0 | |
108 |
|
108 | |||
109 |
changeset: 1: |
|
109 | changeset: 1:5460a410df01 | |
110 | user: test |
|
110 | user: test | |
111 |
date: |
|
111 | date: Thu Jan 01 00:00:00 1970 +0000 | |
112 | summary: 1 |
|
112 | summary: 1 | |
113 |
|
113 | |||
114 |
changeset: 2: |
|
114 | changeset: 2:d9f42cd1a1ec | |
115 | user: test |
|
115 | user: test | |
116 |
date: |
|
116 | date: Thu Jan 01 00:00:00 1970 +0000 | |
117 | summary: 2 |
|
117 | summary: 2 | |
118 |
|
118 | |||
119 |
changeset: 3: |
|
119 | changeset: 3:376476025137 | |
120 | user: test |
|
120 | user: test | |
121 |
date: |
|
121 | date: Thu Jan 01 00:00:00 1970 +0000 | |
122 | summary: 3 |
|
122 | summary: 3 | |
123 |
|
123 | |||
124 |
changeset: 4: |
|
124 | changeset: 4:70d7eb252d49 | |
125 | user: test |
|
125 | user: test | |
126 |
date: |
|
126 | date: Thu Jan 01 00:00:00 1970 +0000 | |
127 | summary: 4 |
|
127 | summary: 4 | |
128 |
|
128 | |||
129 |
changeset: 5: |
|
129 | changeset: 5:ad284ee3b5ee | |
130 | user: test |
|
130 | user: test | |
131 |
date: |
|
131 | date: Thu Jan 01 00:00:00 1970 +0000 | |
132 | summary: 5 |
|
132 | summary: 5 | |
133 |
|
133 | |||
134 |
changeset: 6: |
|
134 | changeset: 6:e9229f2de384 | |
135 | user: test |
|
135 | user: test | |
136 |
date: |
|
136 | date: Thu Jan 01 00:00:00 1970 +0000 | |
137 | summary: 6 |
|
137 | summary: 6 | |
138 |
|
138 | |||
139 |
changeset: 7:d |
|
139 | changeset: 7:d152815bb8db | |
140 | user: test |
|
140 | user: test | |
141 |
date: |
|
141 | date: Thu Jan 01 00:00:00 1970 +0000 | |
142 | summary: 7 |
|
142 | summary: 7 | |
143 |
|
143 | |||
144 |
changeset: 8: |
|
144 | changeset: 8:e4feb4ac9035 | |
145 | tag: tip |
|
145 | tag: tip | |
146 | user: test |
|
146 | user: test | |
147 |
date: |
|
147 | date: Thu Jan 01 00:00:00 1970 +0000 | |
148 | summary: 8 |
|
148 | summary: 8 | |
149 |
|
149 | |||
150 | $ hg -R new incoming -r 4 test |
|
150 | $ hg -R new incoming -r 4 test | |
151 | comparing with test |
|
151 | comparing with test | |
152 |
changeset: 0: |
|
152 | changeset: 0:00a43fa82f62 | |
153 | user: test |
|
153 | user: test | |
154 |
date: |
|
154 | date: Thu Jan 01 00:00:00 1970 +0000 | |
155 | summary: 0 |
|
155 | summary: 0 | |
156 |
|
156 | |||
157 |
changeset: 1: |
|
157 | changeset: 1:5460a410df01 | |
158 | user: test |
|
158 | user: test | |
159 |
date: |
|
159 | date: Thu Jan 01 00:00:00 1970 +0000 | |
160 | summary: 1 |
|
160 | summary: 1 | |
161 |
|
161 | |||
162 |
changeset: 2: |
|
162 | changeset: 2:d9f42cd1a1ec | |
163 | user: test |
|
163 | user: test | |
164 |
date: |
|
164 | date: Thu Jan 01 00:00:00 1970 +0000 | |
165 | summary: 2 |
|
165 | summary: 2 | |
166 |
|
166 | |||
167 |
changeset: 3: |
|
167 | changeset: 3:376476025137 | |
168 | user: test |
|
168 | user: test | |
169 |
date: |
|
169 | date: Thu Jan 01 00:00:00 1970 +0000 | |
170 | summary: 3 |
|
170 | summary: 3 | |
171 |
|
171 | |||
172 |
changeset: 4: |
|
172 | changeset: 4:70d7eb252d49 | |
173 | user: test |
|
173 | user: test | |
174 |
date: |
|
174 | date: Thu Jan 01 00:00:00 1970 +0000 | |
175 | summary: 4 |
|
175 | summary: 4 | |
176 |
|
176 | |||
177 |
|
177 | |||
178 | limit to 2 changesets |
|
178 | limit to 2 changesets | |
179 |
|
179 | |||
180 | $ hg -R new incoming -l 2 test |
|
180 | $ hg -R new incoming -l 2 test | |
181 | comparing with test |
|
181 | comparing with test | |
182 |
changeset: 0: |
|
182 | changeset: 0:00a43fa82f62 | |
183 | user: test |
|
183 | user: test | |
184 |
date: |
|
184 | date: Thu Jan 01 00:00:00 1970 +0000 | |
185 | summary: 0 |
|
185 | summary: 0 | |
186 |
|
186 | |||
187 |
changeset: 1: |
|
187 | changeset: 1:5460a410df01 | |
188 | user: test |
|
188 | user: test | |
189 |
date: |
|
189 | date: Thu Jan 01 00:00:00 1970 +0000 | |
190 | summary: 1 |
|
190 | summary: 1 | |
191 |
|
191 | |||
192 |
|
192 | |||
193 | limit to 2 changesets, test with -p --git |
|
193 | limit to 2 changesets, test with -p --git | |
194 |
|
194 | |||
195 | $ hg -R new incoming -l 2 -p --git test |
|
195 | $ hg -R new incoming -l 2 -p --git test | |
196 | comparing with test |
|
196 | comparing with test | |
197 |
changeset: 0: |
|
197 | changeset: 0:00a43fa82f62 | |
198 | user: test |
|
198 | user: test | |
199 |
date: |
|
199 | date: Thu Jan 01 00:00:00 1970 +0000 | |
200 | summary: 0 |
|
200 | summary: 0 | |
201 |
|
201 | |||
202 | diff --git a/foo b/foo |
|
202 | diff --git a/foo b/foo | |
203 | new file mode 100644 |
|
203 | new file mode 100644 | |
204 | --- /dev/null |
|
204 | --- /dev/null | |
205 | +++ b/foo |
|
205 | +++ b/foo | |
206 | @@ -0,0 +1,1 @@ |
|
206 | @@ -0,0 +1,1 @@ | |
207 | +0 |
|
207 | +0 | |
208 |
|
208 | |||
209 |
changeset: 1: |
|
209 | changeset: 1:5460a410df01 | |
210 | user: test |
|
210 | user: test | |
211 |
date: |
|
211 | date: Thu Jan 01 00:00:00 1970 +0000 | |
212 | summary: 1 |
|
212 | summary: 1 | |
213 |
|
213 | |||
214 | diff --git a/foo b/foo |
|
214 | diff --git a/foo b/foo | |
215 | --- a/foo |
|
215 | --- a/foo | |
216 | +++ b/foo |
|
216 | +++ b/foo | |
217 | @@ -1,1 +1,2 @@ |
|
217 | @@ -1,1 +1,2 @@ | |
218 | 0 |
|
218 | 0 | |
219 | +1 |
|
219 | +1 | |
220 |
|
220 | |||
221 |
|
221 | |||
222 | test with --bundle |
|
222 | test with --bundle | |
223 |
|
223 | |||
224 | $ hg -R new incoming --bundle test.hg http://localhost:$HGPORT/ | sed -e "s,:$HGPORT/,:\$HGPORT/," |
|
224 | $ hg -R new incoming --bundle test.hg http://localhost:$HGPORT/ | sed -e "s,:$HGPORT/,:\$HGPORT/," | |
225 | comparing with http://localhost:$HGPORT/ |
|
225 | comparing with http://localhost:$HGPORT/ | |
226 |
changeset: 0: |
|
226 | changeset: 0:00a43fa82f62 | |
227 | user: test |
|
227 | user: test | |
228 |
date: |
|
228 | date: Thu Jan 01 00:00:00 1970 +0000 | |
229 | summary: 0 |
|
229 | summary: 0 | |
230 |
|
230 | |||
231 |
changeset: 1: |
|
231 | changeset: 1:5460a410df01 | |
232 | user: test |
|
232 | user: test | |
233 |
date: |
|
233 | date: Thu Jan 01 00:00:00 1970 +0000 | |
234 | summary: 1 |
|
234 | summary: 1 | |
235 |
|
235 | |||
236 |
changeset: 2: |
|
236 | changeset: 2:d9f42cd1a1ec | |
237 | user: test |
|
237 | user: test | |
238 |
date: |
|
238 | date: Thu Jan 01 00:00:00 1970 +0000 | |
239 | summary: 2 |
|
239 | summary: 2 | |
240 |
|
240 | |||
241 |
changeset: 3: |
|
241 | changeset: 3:376476025137 | |
242 | user: test |
|
242 | user: test | |
243 |
date: |
|
243 | date: Thu Jan 01 00:00:00 1970 +0000 | |
244 | summary: 3 |
|
244 | summary: 3 | |
245 |
|
245 | |||
246 |
changeset: 4: |
|
246 | changeset: 4:70d7eb252d49 | |
247 | user: test |
|
247 | user: test | |
248 |
date: |
|
248 | date: Thu Jan 01 00:00:00 1970 +0000 | |
249 | summary: 4 |
|
249 | summary: 4 | |
250 |
|
250 | |||
251 |
changeset: 5: |
|
251 | changeset: 5:ad284ee3b5ee | |
252 | user: test |
|
252 | user: test | |
253 |
date: |
|
253 | date: Thu Jan 01 00:00:00 1970 +0000 | |
254 | summary: 5 |
|
254 | summary: 5 | |
255 |
|
255 | |||
256 |
changeset: 6: |
|
256 | changeset: 6:e9229f2de384 | |
257 | user: test |
|
257 | user: test | |
258 |
date: |
|
258 | date: Thu Jan 01 00:00:00 1970 +0000 | |
259 | summary: 6 |
|
259 | summary: 6 | |
260 |
|
260 | |||
261 |
changeset: 7:d |
|
261 | changeset: 7:d152815bb8db | |
262 | user: test |
|
262 | user: test | |
263 |
date: |
|
263 | date: Thu Jan 01 00:00:00 1970 +0000 | |
264 | summary: 7 |
|
264 | summary: 7 | |
265 |
|
265 | |||
266 |
changeset: 8: |
|
266 | changeset: 8:e4feb4ac9035 | |
267 | tag: tip |
|
267 | tag: tip | |
268 | user: test |
|
268 | user: test | |
269 |
date: |
|
269 | date: Thu Jan 01 00:00:00 1970 +0000 | |
270 | summary: 8 |
|
270 | summary: 8 | |
271 |
|
271 | |||
272 | $ hg -R new incoming --bundle test2.hg test |
|
272 | $ hg -R new incoming --bundle test2.hg test | |
273 | comparing with test |
|
273 | comparing with test | |
274 |
changeset: 0: |
|
274 | changeset: 0:00a43fa82f62 | |
275 | user: test |
|
275 | user: test | |
276 |
date: |
|
276 | date: Thu Jan 01 00:00:00 1970 +0000 | |
277 | summary: 0 |
|
277 | summary: 0 | |
278 |
|
278 | |||
279 |
changeset: 1: |
|
279 | changeset: 1:5460a410df01 | |
280 | user: test |
|
280 | user: test | |
281 |
date: |
|
281 | date: Thu Jan 01 00:00:00 1970 +0000 | |
282 | summary: 1 |
|
282 | summary: 1 | |
283 |
|
283 | |||
284 |
changeset: 2: |
|
284 | changeset: 2:d9f42cd1a1ec | |
285 | user: test |
|
285 | user: test | |
286 |
date: |
|
286 | date: Thu Jan 01 00:00:00 1970 +0000 | |
287 | summary: 2 |
|
287 | summary: 2 | |
288 |
|
288 | |||
289 |
changeset: 3: |
|
289 | changeset: 3:376476025137 | |
290 | user: test |
|
290 | user: test | |
291 |
date: |
|
291 | date: Thu Jan 01 00:00:00 1970 +0000 | |
292 | summary: 3 |
|
292 | summary: 3 | |
293 |
|
293 | |||
294 |
changeset: 4: |
|
294 | changeset: 4:70d7eb252d49 | |
295 | user: test |
|
295 | user: test | |
296 |
date: |
|
296 | date: Thu Jan 01 00:00:00 1970 +0000 | |
297 | summary: 4 |
|
297 | summary: 4 | |
298 |
|
298 | |||
299 |
changeset: 5: |
|
299 | changeset: 5:ad284ee3b5ee | |
300 | user: test |
|
300 | user: test | |
301 |
date: |
|
301 | date: Thu Jan 01 00:00:00 1970 +0000 | |
302 | summary: 5 |
|
302 | summary: 5 | |
303 |
|
303 | |||
304 |
changeset: 6: |
|
304 | changeset: 6:e9229f2de384 | |
305 | user: test |
|
305 | user: test | |
306 |
date: |
|
306 | date: Thu Jan 01 00:00:00 1970 +0000 | |
307 | summary: 6 |
|
307 | summary: 6 | |
308 |
|
308 | |||
309 |
changeset: 7:d |
|
309 | changeset: 7:d152815bb8db | |
310 | user: test |
|
310 | user: test | |
311 |
date: |
|
311 | date: Thu Jan 01 00:00:00 1970 +0000 | |
312 | summary: 7 |
|
312 | summary: 7 | |
313 |
|
313 | |||
314 |
changeset: 8: |
|
314 | changeset: 8:e4feb4ac9035 | |
315 | tag: tip |
|
315 | tag: tip | |
316 | user: test |
|
316 | user: test | |
317 |
date: |
|
317 | date: Thu Jan 01 00:00:00 1970 +0000 | |
318 | summary: 8 |
|
318 | summary: 8 | |
319 |
|
319 | |||
320 |
|
320 | |||
321 |
|
321 | |||
322 | test the resulting bundles |
|
322 | test the resulting bundles | |
323 |
|
323 | |||
324 | $ hg init temp |
|
324 | $ hg init temp | |
325 | $ hg init temp2 |
|
325 | $ hg init temp2 | |
326 | $ hg -R temp unbundle test.hg |
|
326 | $ hg -R temp unbundle test.hg | |
327 | adding changesets |
|
327 | adding changesets | |
328 | adding manifests |
|
328 | adding manifests | |
329 | adding file changes |
|
329 | adding file changes | |
330 | added 9 changesets with 9 changes to 1 files |
|
330 | added 9 changesets with 9 changes to 1 files | |
331 | (run 'hg update' to get a working copy) |
|
331 | (run 'hg update' to get a working copy) | |
332 | $ hg -R temp2 unbundle test2.hg |
|
332 | $ hg -R temp2 unbundle test2.hg | |
333 | adding changesets |
|
333 | adding changesets | |
334 | adding manifests |
|
334 | adding manifests | |
335 | adding file changes |
|
335 | adding file changes | |
336 | added 9 changesets with 9 changes to 1 files |
|
336 | added 9 changesets with 9 changes to 1 files | |
337 | (run 'hg update' to get a working copy) |
|
337 | (run 'hg update' to get a working copy) | |
338 | $ hg -R temp tip |
|
338 | $ hg -R temp tip | |
339 |
changeset: 8: |
|
339 | changeset: 8:e4feb4ac9035 | |
340 | tag: tip |
|
340 | tag: tip | |
341 | user: test |
|
341 | user: test | |
342 |
date: |
|
342 | date: Thu Jan 01 00:00:00 1970 +0000 | |
343 | summary: 8 |
|
343 | summary: 8 | |
344 |
|
344 | |||
345 | $ hg -R temp2 tip |
|
345 | $ hg -R temp2 tip | |
346 |
changeset: 8: |
|
346 | changeset: 8:e4feb4ac9035 | |
347 | tag: tip |
|
347 | tag: tip | |
348 | user: test |
|
348 | user: test | |
349 |
date: |
|
349 | date: Thu Jan 01 00:00:00 1970 +0000 | |
350 | summary: 8 |
|
350 | summary: 8 | |
351 |
|
351 | |||
352 |
|
352 | |||
353 | $ rm -r temp temp2 new |
|
353 | $ rm -r temp temp2 new | |
354 |
|
354 | |||
355 | test outgoing |
|
355 | test outgoing | |
356 |
|
356 | |||
357 | $ hg clone test test-dev |
|
357 | $ hg clone test test-dev | |
358 | updating to branch default |
|
358 | updating to branch default | |
359 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
359 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
360 | $ cd test-dev |
|
360 | $ cd test-dev | |
361 | $ for i in 9 10 11 12 13; do |
|
361 | $ for i in 9 10 11 12 13; do | |
362 | > echo $i >> foo |
|
362 | > echo $i >> foo | |
363 |
> hg commit -A -m $i |
|
363 | > hg commit -A -m $i | |
364 | > done |
|
364 | > done | |
365 | $ hg verify |
|
365 | $ hg verify | |
366 | checking changesets |
|
366 | checking changesets | |
367 | checking manifests |
|
367 | checking manifests | |
368 | crosschecking files in changesets and manifests |
|
368 | crosschecking files in changesets and manifests | |
369 | checking files |
|
369 | checking files | |
370 | 1 files, 14 changesets, 14 total revisions |
|
370 | 1 files, 14 changesets, 14 total revisions | |
371 | $ cd .. |
|
371 | $ cd .. | |
372 | $ hg -R test-dev outgoing test |
|
372 | $ hg -R test-dev outgoing test | |
373 | comparing with test |
|
373 | comparing with test | |
374 | searching for changes |
|
374 | searching for changes | |
375 |
changeset: 9: |
|
375 | changeset: 9:d89d4abea5bc | |
376 | user: test |
|
376 | user: test | |
377 |
date: |
|
377 | date: Thu Jan 01 00:00:00 1970 +0000 | |
378 | summary: 9 |
|
378 | summary: 9 | |
379 |
|
379 | |||
380 |
changeset: 10: |
|
380 | changeset: 10:820095aa7158 | |
381 | user: test |
|
381 | user: test | |
382 |
date: |
|
382 | date: Thu Jan 01 00:00:00 1970 +0000 | |
383 | summary: 10 |
|
383 | summary: 10 | |
384 |
|
384 | |||
385 |
changeset: 11:0 |
|
385 | changeset: 11:09ede2f3a638 | |
386 | user: test |
|
386 | user: test | |
387 |
date: |
|
387 | date: Thu Jan 01 00:00:00 1970 +0000 | |
388 | summary: 11 |
|
388 | summary: 11 | |
389 |
|
389 | |||
390 |
changeset: 12: |
|
390 | changeset: 12:e576b1bed305 | |
391 | user: test |
|
391 | user: test | |
392 |
date: |
|
392 | date: Thu Jan 01 00:00:00 1970 +0000 | |
393 | summary: 12 |
|
393 | summary: 12 | |
394 |
|
394 | |||
395 |
changeset: 13: |
|
395 | changeset: 13:96bbff09a7cc | |
396 | tag: tip |
|
396 | tag: tip | |
397 | user: test |
|
397 | user: test | |
398 |
date: |
|
398 | date: Thu Jan 01 00:00:00 1970 +0000 | |
399 | summary: 13 |
|
399 | summary: 13 | |
400 |
|
400 | |||
401 |
|
401 | |||
402 | limit to 3 changesets |
|
402 | limit to 3 changesets | |
403 |
|
403 | |||
404 | $ hg -R test-dev outgoing -l 3 test |
|
404 | $ hg -R test-dev outgoing -l 3 test | |
405 | comparing with test |
|
405 | comparing with test | |
406 | searching for changes |
|
406 | searching for changes | |
407 |
changeset: 9: |
|
407 | changeset: 9:d89d4abea5bc | |
408 | user: test |
|
408 | user: test | |
409 |
date: |
|
409 | date: Thu Jan 01 00:00:00 1970 +0000 | |
410 | summary: 9 |
|
410 | summary: 9 | |
411 |
|
411 | |||
412 |
changeset: 10: |
|
412 | changeset: 10:820095aa7158 | |
413 | user: test |
|
413 | user: test | |
414 |
date: |
|
414 | date: Thu Jan 01 00:00:00 1970 +0000 | |
415 | summary: 10 |
|
415 | summary: 10 | |
416 |
|
416 | |||
417 |
changeset: 11:0 |
|
417 | changeset: 11:09ede2f3a638 | |
418 | user: test |
|
418 | user: test | |
419 |
date: |
|
419 | date: Thu Jan 01 00:00:00 1970 +0000 | |
420 | summary: 11 |
|
420 | summary: 11 | |
421 |
|
421 | |||
422 | $ hg -R test-dev outgoing http://localhost:$HGPORT/ | sed -e "s,:$HGPORT/,:\$HGPORT/," |
|
422 | $ hg -R test-dev outgoing http://localhost:$HGPORT/ | sed -e "s,:$HGPORT/,:\$HGPORT/," | |
423 | comparing with http://localhost:$HGPORT/ |
|
423 | comparing with http://localhost:$HGPORT/ | |
424 | searching for changes |
|
424 | searching for changes | |
425 |
changeset: 9: |
|
425 | changeset: 9:d89d4abea5bc | |
426 | user: test |
|
426 | user: test | |
427 |
date: |
|
427 | date: Thu Jan 01 00:00:00 1970 +0000 | |
428 | summary: 9 |
|
428 | summary: 9 | |
429 |
|
429 | |||
430 |
changeset: 10: |
|
430 | changeset: 10:820095aa7158 | |
431 | user: test |
|
431 | user: test | |
432 |
date: |
|
432 | date: Thu Jan 01 00:00:00 1970 +0000 | |
433 | summary: 10 |
|
433 | summary: 10 | |
434 |
|
434 | |||
435 |
changeset: 11:0 |
|
435 | changeset: 11:09ede2f3a638 | |
436 | user: test |
|
436 | user: test | |
437 |
date: |
|
437 | date: Thu Jan 01 00:00:00 1970 +0000 | |
438 | summary: 11 |
|
438 | summary: 11 | |
439 |
|
439 | |||
440 |
changeset: 12: |
|
440 | changeset: 12:e576b1bed305 | |
441 | user: test |
|
441 | user: test | |
442 |
date: |
|
442 | date: Thu Jan 01 00:00:00 1970 +0000 | |
443 | summary: 12 |
|
443 | summary: 12 | |
444 |
|
444 | |||
445 |
changeset: 13: |
|
445 | changeset: 13:96bbff09a7cc | |
446 | tag: tip |
|
446 | tag: tip | |
447 | user: test |
|
447 | user: test | |
448 |
date: |
|
448 | date: Thu Jan 01 00:00:00 1970 +0000 | |
449 | summary: 13 |
|
449 | summary: 13 | |
450 |
|
450 | |||
451 | $ hg -R test-dev outgoing -r 11 http://localhost:$HGPORT/ | sed -e "s,:$HGPORT/,:\$HGPORT/," |
|
451 | $ hg -R test-dev outgoing -r 11 http://localhost:$HGPORT/ | sed -e "s,:$HGPORT/,:\$HGPORT/," | |
452 | comparing with http://localhost:$HGPORT/ |
|
452 | comparing with http://localhost:$HGPORT/ | |
453 | searching for changes |
|
453 | searching for changes | |
454 |
changeset: 9: |
|
454 | changeset: 9:d89d4abea5bc | |
455 | user: test |
|
455 | user: test | |
456 |
date: |
|
456 | date: Thu Jan 01 00:00:00 1970 +0000 | |
457 | summary: 9 |
|
457 | summary: 9 | |
458 |
|
458 | |||
459 |
changeset: 10: |
|
459 | changeset: 10:820095aa7158 | |
460 | user: test |
|
460 | user: test | |
461 |
date: |
|
461 | date: Thu Jan 01 00:00:00 1970 +0000 | |
462 | summary: 10 |
|
462 | summary: 10 | |
463 |
|
463 | |||
464 |
changeset: 11:0 |
|
464 | changeset: 11:09ede2f3a638 | |
465 | user: test |
|
465 | user: test | |
466 |
date: |
|
466 | date: Thu Jan 01 00:00:00 1970 +0000 | |
467 | summary: 11 |
|
467 | summary: 11 | |
468 |
|
468 |
@@ -1,156 +1,156 b'' | |||||
1 | # This test tries to exercise the ssh functionality with a dummy script |
|
1 | # This test tries to exercise the ssh functionality with a dummy script | |
2 |
|
2 | |||
3 | $ cat <<EOF > dummyssh |
|
3 | $ cat <<EOF > dummyssh | |
4 | > import sys |
|
4 | > import sys | |
5 | > import os |
|
5 | > import os | |
6 | > |
|
6 | > | |
7 | > os.chdir(os.path.dirname(sys.argv[0])) |
|
7 | > os.chdir(os.path.dirname(sys.argv[0])) | |
8 | > if sys.argv[1] != "user@dummy": |
|
8 | > if sys.argv[1] != "user@dummy": | |
9 | > sys.exit(-1) |
|
9 | > sys.exit(-1) | |
10 | > |
|
10 | > | |
11 | > if not os.path.exists("dummyssh"): |
|
11 | > if not os.path.exists("dummyssh"): | |
12 | > sys.exit(-1) |
|
12 | > sys.exit(-1) | |
13 | > |
|
13 | > | |
14 | > log = open("dummylog", "ab") |
|
14 | > log = open("dummylog", "ab") | |
15 | > log.write("Got arguments") |
|
15 | > log.write("Got arguments") | |
16 | > for i, arg in enumerate(sys.argv[1:]): |
|
16 | > for i, arg in enumerate(sys.argv[1:]): | |
17 | > log.write(" %d:%s" % (i+1, arg)) |
|
17 | > log.write(" %d:%s" % (i+1, arg)) | |
18 | > log.write("\n") |
|
18 | > log.write("\n") | |
19 | > log.close() |
|
19 | > log.close() | |
20 | > r = os.system(sys.argv[2]) |
|
20 | > r = os.system(sys.argv[2]) | |
21 | > sys.exit(bool(r)) |
|
21 | > sys.exit(bool(r)) | |
22 | > EOF |
|
22 | > EOF | |
23 |
|
23 | |||
24 | $ checknewrepo() |
|
24 | $ checknewrepo() | |
25 | > { |
|
25 | > { | |
26 | > name=$1 |
|
26 | > name=$1 | |
27 | > if [ -d $name/.hg/store ]; then |
|
27 | > if [ -d $name/.hg/store ]; then | |
28 | > echo store created |
|
28 | > echo store created | |
29 | > fi |
|
29 | > fi | |
30 | > if [ -f $name/.hg/00changelog.i ]; then |
|
30 | > if [ -f $name/.hg/00changelog.i ]; then | |
31 | > echo 00changelog.i created |
|
31 | > echo 00changelog.i created | |
32 | > fi |
|
32 | > fi | |
33 | > cat $name/.hg/requires |
|
33 | > cat $name/.hg/requires | |
34 | > } |
|
34 | > } | |
35 |
|
35 | |||
36 | creating 'local' |
|
36 | creating 'local' | |
37 |
|
37 | |||
38 | $ hg init local |
|
38 | $ hg init local | |
39 | $ checknewrepo local |
|
39 | $ checknewrepo local | |
40 | store created |
|
40 | store created | |
41 | 00changelog.i created |
|
41 | 00changelog.i created | |
42 | revlogv1 |
|
42 | revlogv1 | |
43 | store |
|
43 | store | |
44 | fncache |
|
44 | fncache | |
45 | $ echo this > local/foo |
|
45 | $ echo this > local/foo | |
46 |
$ hg ci --cwd local -A -m "init" |
|
46 | $ hg ci --cwd local -A -m "init" | |
47 | adding foo |
|
47 | adding foo | |
48 |
|
48 | |||
49 | creating repo with format.usestore=false |
|
49 | creating repo with format.usestore=false | |
50 |
|
50 | |||
51 | $ hg --config format.usestore=false init old |
|
51 | $ hg --config format.usestore=false init old | |
52 | $ checknewrepo old |
|
52 | $ checknewrepo old | |
53 | revlogv1 |
|
53 | revlogv1 | |
54 |
|
54 | |||
55 | creating repo with format.usefncache=false |
|
55 | creating repo with format.usefncache=false | |
56 |
|
56 | |||
57 | $ hg --config format.usefncache=false init old2 |
|
57 | $ hg --config format.usefncache=false init old2 | |
58 | $ checknewrepo old2 |
|
58 | $ checknewrepo old2 | |
59 | store created |
|
59 | store created | |
60 | 00changelog.i created |
|
60 | 00changelog.i created | |
61 | revlogv1 |
|
61 | revlogv1 | |
62 | store |
|
62 | store | |
63 |
|
63 | |||
64 | test failure |
|
64 | test failure | |
65 |
|
65 | |||
66 | $ hg init local |
|
66 | $ hg init local | |
67 | abort: repository local already exists! |
|
67 | abort: repository local already exists! | |
68 |
|
68 | |||
69 | init+push to remote2 |
|
69 | init+push to remote2 | |
70 |
|
70 | |||
71 | $ hg init -e "python ./dummyssh" ssh://user@dummy/remote2 |
|
71 | $ hg init -e "python ./dummyssh" ssh://user@dummy/remote2 | |
72 | $ hg incoming -R remote2 local |
|
72 | $ hg incoming -R remote2 local | |
73 | comparing with local |
|
73 | comparing with local | |
74 |
changeset: 0: |
|
74 | changeset: 0:08b9e9f63b32 | |
75 | tag: tip |
|
75 | tag: tip | |
76 | user: test |
|
76 | user: test | |
77 |
date: |
|
77 | date: Thu Jan 01 00:00:00 1970 +0000 | |
78 | summary: init |
|
78 | summary: init | |
79 |
|
79 | |||
80 |
|
80 | |||
81 | $ hg push -R local -e "python ./dummyssh" ssh://user@dummy/remote2 |
|
81 | $ hg push -R local -e "python ./dummyssh" ssh://user@dummy/remote2 | |
82 | pushing to ssh://user@dummy/remote2 |
|
82 | pushing to ssh://user@dummy/remote2 | |
83 | searching for changes |
|
83 | searching for changes | |
84 | remote: adding changesets |
|
84 | remote: adding changesets | |
85 | remote: adding manifests |
|
85 | remote: adding manifests | |
86 | remote: adding file changes |
|
86 | remote: adding file changes | |
87 | remote: added 1 changesets with 1 changes to 1 files |
|
87 | remote: added 1 changesets with 1 changes to 1 files | |
88 |
|
88 | |||
89 | clone to remote1 |
|
89 | clone to remote1 | |
90 |
|
90 | |||
91 | $ hg clone -e "python ./dummyssh" local ssh://user@dummy/remote1 |
|
91 | $ hg clone -e "python ./dummyssh" local ssh://user@dummy/remote1 | |
92 | searching for changes |
|
92 | searching for changes | |
93 | remote: adding changesets |
|
93 | remote: adding changesets | |
94 | remote: adding manifests |
|
94 | remote: adding manifests | |
95 | remote: adding file changes |
|
95 | remote: adding file changes | |
96 | remote: added 1 changesets with 1 changes to 1 files |
|
96 | remote: added 1 changesets with 1 changes to 1 files | |
97 |
|
97 | |||
98 | init to existing repo |
|
98 | init to existing repo | |
99 |
|
99 | |||
100 | $ hg init -e "python ./dummyssh" ssh://user@dummy/remote1 |
|
100 | $ hg init -e "python ./dummyssh" ssh://user@dummy/remote1 | |
101 | abort: repository remote1 already exists! |
|
101 | abort: repository remote1 already exists! | |
102 | abort: could not create remote repo! |
|
102 | abort: could not create remote repo! | |
103 |
|
103 | |||
104 | clone to existing repo |
|
104 | clone to existing repo | |
105 |
|
105 | |||
106 | $ hg clone -e "python ./dummyssh" local ssh://user@dummy/remote1 |
|
106 | $ hg clone -e "python ./dummyssh" local ssh://user@dummy/remote1 | |
107 | abort: repository remote1 already exists! |
|
107 | abort: repository remote1 already exists! | |
108 | abort: could not create remote repo! |
|
108 | abort: could not create remote repo! | |
109 |
|
109 | |||
110 | output of dummyssh |
|
110 | output of dummyssh | |
111 |
|
111 | |||
112 | $ cat dummylog |
|
112 | $ cat dummylog | |
113 | Got arguments 1:user@dummy 2:hg init remote2 |
|
113 | Got arguments 1:user@dummy 2:hg init remote2 | |
114 | Got arguments 1:user@dummy 2:hg -R remote2 serve --stdio |
|
114 | Got arguments 1:user@dummy 2:hg -R remote2 serve --stdio | |
115 | Got arguments 1:user@dummy 2:hg -R remote2 serve --stdio |
|
115 | Got arguments 1:user@dummy 2:hg -R remote2 serve --stdio | |
116 | Got arguments 1:user@dummy 2:hg init remote1 |
|
116 | Got arguments 1:user@dummy 2:hg init remote1 | |
117 | Got arguments 1:user@dummy 2:hg -R remote1 serve --stdio |
|
117 | Got arguments 1:user@dummy 2:hg -R remote1 serve --stdio | |
118 | Got arguments 1:user@dummy 2:hg init remote1 |
|
118 | Got arguments 1:user@dummy 2:hg init remote1 | |
119 | Got arguments 1:user@dummy 2:hg init remote1 |
|
119 | Got arguments 1:user@dummy 2:hg init remote1 | |
120 |
|
120 | |||
121 | comparing repositories |
|
121 | comparing repositories | |
122 |
|
122 | |||
123 | $ hg tip -q -R local |
|
123 | $ hg tip -q -R local | |
124 | 0:c4e059d443be |
|
124 | 0:08b9e9f63b32 | |
125 | $ hg tip -q -R remote1 |
|
125 | $ hg tip -q -R remote1 | |
126 | 0:c4e059d443be |
|
126 | 0:08b9e9f63b32 | |
127 | $ hg tip -q -R remote2 |
|
127 | $ hg tip -q -R remote2 | |
128 | 0:c4e059d443be |
|
128 | 0:08b9e9f63b32 | |
129 |
|
129 | |||
130 | check names for repositories (clashes with URL schemes, special chars) |
|
130 | check names for repositories (clashes with URL schemes, special chars) | |
131 |
|
131 | |||
132 | $ for i in bundle file hg http https old-http ssh static-http " " "with space"; do |
|
132 | $ for i in bundle file hg http https old-http ssh static-http " " "with space"; do | |
133 | > printf "hg init \"$i\"... " |
|
133 | > printf "hg init \"$i\"... " | |
134 | > hg init "$i" |
|
134 | > hg init "$i" | |
135 | > test -d "$i" -a -d "$i/.hg" && echo "ok" || echo "failed" |
|
135 | > test -d "$i" -a -d "$i/.hg" && echo "ok" || echo "failed" | |
136 | > done |
|
136 | > done | |
137 | hg init "bundle"... ok |
|
137 | hg init "bundle"... ok | |
138 | hg init "file"... ok |
|
138 | hg init "file"... ok | |
139 | hg init "hg"... ok |
|
139 | hg init "hg"... ok | |
140 | hg init "http"... ok |
|
140 | hg init "http"... ok | |
141 | hg init "https"... ok |
|
141 | hg init "https"... ok | |
142 | hg init "old-http"... ok |
|
142 | hg init "old-http"... ok | |
143 | hg init "ssh"... ok |
|
143 | hg init "ssh"... ok | |
144 | hg init "static-http"... ok |
|
144 | hg init "static-http"... ok | |
145 | hg init " "... ok |
|
145 | hg init " "... ok | |
146 | hg init "with space"... ok |
|
146 | hg init "with space"... ok | |
147 |
|
147 | |||
148 | creating 'local/sub/repo' |
|
148 | creating 'local/sub/repo' | |
149 |
|
149 | |||
150 | $ hg init local/sub/repo |
|
150 | $ hg init local/sub/repo | |
151 | $ checknewrepo local/sub/repo |
|
151 | $ checknewrepo local/sub/repo | |
152 | store created |
|
152 | store created | |
153 | 00changelog.i created |
|
153 | 00changelog.i created | |
154 | revlogv1 |
|
154 | revlogv1 | |
155 | store |
|
155 | store | |
156 | fncache |
|
156 | fncache |
@@ -1,24 +1,24 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | mkdir t |
|
3 | mkdir t | |
4 | cd t |
|
4 | cd t | |
5 |
|
5 | |||
6 | hg init |
|
6 | hg init | |
7 | mkdir src |
|
7 | mkdir src | |
8 | echo a > src/a.c |
|
8 | echo a > src/a.c | |
9 | hg ci -Ama -d "10000000 0" |
|
9 | hg ci -Ama | |
10 |
|
10 | |||
11 | hg mv src source |
|
11 | hg mv src source | |
12 |
hg ci -Ammove |
|
12 | hg ci -Ammove | |
13 |
|
13 | |||
14 | hg co -C 0 |
|
14 | hg co -C 0 | |
15 | echo new > src/a.c |
|
15 | echo new > src/a.c | |
16 | echo compiled > src/a.o |
|
16 | echo compiled > src/a.o | |
17 |
hg ci -mupdate |
|
17 | hg ci -mupdate | |
18 |
|
18 | |||
19 | hg st |
|
19 | hg st | |
20 |
|
20 | |||
21 | hg merge |
|
21 | hg merge | |
22 |
|
22 | |||
23 | hg st |
|
23 | hg st | |
24 |
|
24 |
@@ -1,20 +1,20 b'' | |||||
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 a > a |
|
6 | echo a > a | |
7 | hg ci -Ama -d '1000000000 0' |
|
7 | hg ci -Ama | |
8 | echo b > b |
|
8 | echo b > b | |
9 | hg branch b |
|
9 | hg branch b | |
10 | hg ci -Amb -d '1000000000 0' |
|
10 | hg ci -Amb | |
11 | hg co -C 0 |
|
11 | hg co -C 0 | |
12 |
|
12 | |||
13 | echo fast-forward |
|
13 | echo fast-forward | |
14 | hg merge b |
|
14 | hg merge b | |
15 |
hg ci -Ammerge |
|
15 | hg ci -Ammerge | |
16 |
|
16 | |||
17 | echo bogus fast-forward should fail |
|
17 | echo bogus fast-forward should fail | |
18 | hg merge b |
|
18 | hg merge b | |
19 |
|
19 | |||
20 | echo done |
|
20 | echo done |
@@ -1,56 +1,56 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | hglocate() |
|
3 | hglocate() | |
4 | { |
|
4 | { | |
5 | echo "hg locate $@" |
|
5 | echo "hg locate $@" | |
6 | hg locate "$@" |
|
6 | hg locate "$@" | |
7 | ret=$? |
|
7 | ret=$? | |
8 | echo |
|
8 | echo | |
9 | return $ret |
|
9 | return $ret | |
10 | } |
|
10 | } | |
11 |
|
11 | |||
12 | mkdir t |
|
12 | mkdir t | |
13 | cd t |
|
13 | cd t | |
14 | hg init |
|
14 | hg init | |
15 | echo 0 > a |
|
15 | echo 0 > a | |
16 | echo 0 > b |
|
16 | echo 0 > b | |
17 | echo 0 > t.h |
|
17 | echo 0 > t.h | |
18 | mkdir t |
|
18 | mkdir t | |
19 | echo 0 > t/x |
|
19 | echo 0 > t/x | |
20 | echo 0 > t/b |
|
20 | echo 0 > t/b | |
21 | echo 0 > t/e.h |
|
21 | echo 0 > t/e.h | |
22 | mkdir dir.h |
|
22 | mkdir dir.h | |
23 | echo 0 > dir.h/foo |
|
23 | echo 0 > dir.h/foo | |
24 |
hg ci -A -m m |
|
24 | hg ci -A -m m | |
25 | touch nottracked |
|
25 | touch nottracked | |
26 | hglocate a && echo locate succeeded || echo locate failed |
|
26 | hglocate a && echo locate succeeded || echo locate failed | |
27 | hglocate NONEXISTENT && echo locate succeeded || echo locate failed |
|
27 | hglocate NONEXISTENT && echo locate succeeded || echo locate failed | |
28 | hglocate |
|
28 | hglocate | |
29 | hg rm a |
|
29 | hg rm a | |
30 | hg ci -m m -d "1000000 0" |
|
30 | hg ci -m m | |
31 | hglocate a |
|
31 | hglocate a | |
32 | hglocate NONEXISTENT |
|
32 | hglocate NONEXISTENT | |
33 | hglocate relpath:NONEXISTENT |
|
33 | hglocate relpath:NONEXISTENT | |
34 | hglocate |
|
34 | hglocate | |
35 | hglocate -r 0 a |
|
35 | hglocate -r 0 a | |
36 | hglocate -r 0 NONEXISTENT |
|
36 | hglocate -r 0 NONEXISTENT | |
37 | hglocate -r 0 relpath:NONEXISTENT |
|
37 | hglocate -r 0 relpath:NONEXISTENT | |
38 | hglocate -r 0 |
|
38 | hglocate -r 0 | |
39 | echo % -I/-X with relative path should work |
|
39 | echo % -I/-X with relative path should work | |
40 | cd t |
|
40 | cd t | |
41 | hglocate |
|
41 | hglocate | |
42 | hglocate -I ../t |
|
42 | hglocate -I ../t | |
43 | # test issue294 |
|
43 | # test issue294 | |
44 | cd .. |
|
44 | cd .. | |
45 | rm -r t |
|
45 | rm -r t | |
46 | hglocate 't/**' |
|
46 | hglocate 't/**' | |
47 | mkdir otherdir |
|
47 | mkdir otherdir | |
48 | cd otherdir |
|
48 | cd otherdir | |
49 | hglocate b |
|
49 | hglocate b | |
50 | hglocate '*.h' |
|
50 | hglocate '*.h' | |
51 | hglocate path:t/x |
|
51 | hglocate path:t/x | |
52 | hglocate 're:.*\.h$' |
|
52 | hglocate 're:.*\.h$' | |
53 | hglocate -r 0 b |
|
53 | hglocate -r 0 b | |
54 | hglocate -r 0 '*.h' |
|
54 | hglocate -r 0 '*.h' | |
55 | hglocate -r 0 path:t/x |
|
55 | hglocate -r 0 path:t/x | |
56 | hglocate -r 0 're:.*\.h$' |
|
56 | hglocate -r 0 're:.*\.h$' |
@@ -1,84 +1,84 b'' | |||||
1 | $ hgcommit() { |
|
1 | $ hgcommit() { | |
2 |
> hg commit -u user |
|
2 | > hg commit -u user "$@" | |
3 | > } |
|
3 | > } | |
4 |
|
4 | |||
5 | $ hg init clhead |
|
5 | $ hg init clhead | |
6 | $ cd clhead |
|
6 | $ cd clhead | |
7 |
|
7 | |||
8 | $ touch foo && hg add && hgcommit -m 'foo' |
|
8 | $ touch foo && hg add && hgcommit -m 'foo' | |
9 | adding foo |
|
9 | adding foo | |
10 | $ touch bar && hg add && hgcommit -m 'bar' |
|
10 | $ touch bar && hg add && hgcommit -m 'bar' | |
11 | adding bar |
|
11 | adding bar | |
12 | $ touch baz && hg add && hgcommit -m 'baz' |
|
12 | $ touch baz && hg add && hgcommit -m 'baz' | |
13 | adding baz |
|
13 | adding baz | |
14 |
|
14 | |||
15 | $ echo "flub" > foo |
|
15 | $ echo "flub" > foo | |
16 | $ hgcommit -m "flub" |
|
16 | $ hgcommit -m "flub" | |
17 | $ echo "nub" > foo |
|
17 | $ echo "nub" > foo | |
18 | $ hgcommit -m "nub" |
|
18 | $ hgcommit -m "nub" | |
19 |
|
19 | |||
20 | $ hg up -C 2 |
|
20 | $ hg up -C 2 | |
21 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
21 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
22 |
|
22 | |||
23 | $ echo "c1" > c1 |
|
23 | $ echo "c1" > c1 | |
24 | $ hg add c1 |
|
24 | $ hg add c1 | |
25 | $ hgcommit -m "c1" |
|
25 | $ hgcommit -m "c1" | |
26 | created new head |
|
26 | created new head | |
27 | $ echo "c2" > c1 |
|
27 | $ echo "c2" > c1 | |
28 | $ hgcommit -m "c2" |
|
28 | $ hgcommit -m "c2" | |
29 |
|
29 | |||
30 | $ hg up -C 2 |
|
30 | $ hg up -C 2 | |
31 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
31 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
32 |
|
32 | |||
33 | $ echo "d1" > d1 |
|
33 | $ echo "d1" > d1 | |
34 | $ hg add d1 |
|
34 | $ hg add d1 | |
35 | $ hgcommit -m "d1" |
|
35 | $ hgcommit -m "d1" | |
36 | created new head |
|
36 | created new head | |
37 | $ echo "d2" > d1 |
|
37 | $ echo "d2" > d1 | |
38 | $ hgcommit -m "d2" |
|
38 | $ hgcommit -m "d2" | |
39 | $ hg tag -l good |
|
39 | $ hg tag -l good | |
40 |
|
40 | |||
41 | fail with three heads |
|
41 | fail with three heads | |
42 | $ hg up -C good |
|
42 | $ hg up -C good | |
43 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
43 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
44 | $ hg merge |
|
44 | $ hg merge | |
45 | abort: branch 'default' has 3 heads - please merge with an explicit rev |
|
45 | abort: branch 'default' has 3 heads - please merge with an explicit rev | |
46 | (run 'hg heads .' to see heads) |
|
46 | (run 'hg heads .' to see heads) | |
47 |
|
47 | |||
48 | close one of the heads |
|
48 | close one of the heads | |
49 | $ hg up -C 6 |
|
49 | $ hg up -C 6 | |
50 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
50 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
51 | $ hgcommit -m 'close this head' --close-branch |
|
51 | $ hgcommit -m 'close this head' --close-branch | |
52 |
|
52 | |||
53 | succeed with two open heads |
|
53 | succeed with two open heads | |
54 | $ hg up -C good |
|
54 | $ hg up -C good | |
55 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
55 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
56 | $ hg up -C good |
|
56 | $ hg up -C good | |
57 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
57 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
58 | $ hg merge |
|
58 | $ hg merge | |
59 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
59 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
60 | (branch merge, don't forget to commit) |
|
60 | (branch merge, don't forget to commit) | |
61 | $ hgcommit -m 'merged heads' |
|
61 | $ hgcommit -m 'merged heads' | |
62 |
|
62 | |||
63 | hg update -C 8 |
|
63 | hg update -C 8 | |
64 | $ hg update -C 8 |
|
64 | $ hg update -C 8 | |
65 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
65 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
66 |
|
66 | |||
67 | hg branch some-branch |
|
67 | hg branch some-branch | |
68 | $ hg branch some-branch |
|
68 | $ hg branch some-branch | |
69 | marked working directory as branch some-branch |
|
69 | marked working directory as branch some-branch | |
70 | hg commit |
|
70 | hg commit | |
71 | $ hgcommit -m 'started some-branch' |
|
71 | $ hgcommit -m 'started some-branch' | |
72 | hg commit --close-branch |
|
72 | hg commit --close-branch | |
73 | $ hgcommit --close-branch -m 'closed some-branch' |
|
73 | $ hgcommit --close-branch -m 'closed some-branch' | |
74 |
|
74 | |||
75 | hg update default |
|
75 | hg update default | |
76 | $ hg update default |
|
76 | $ hg update default | |
77 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
77 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
78 | hg merge some-branch |
|
78 | hg merge some-branch | |
79 | $ hg merge some-branch |
|
79 | $ hg merge some-branch | |
80 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
80 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
81 | (branch merge, don't forget to commit) |
|
81 | (branch merge, don't forget to commit) | |
82 | hg commit (no reopening of some-branch) |
|
82 | hg commit (no reopening of some-branch) | |
83 | $ hgcommit -m 'merge with closed branch' |
|
83 | $ hgcommit -m 'merge with closed branch' | |
84 |
|
84 |
@@ -1,56 +1,56 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | # make sure that the internal merge tools (internal:fail, internal:local, and |
|
3 | # make sure that the internal merge tools (internal:fail, internal:local, and | |
4 | # internal:other) are used when matched by a merge-pattern in hgrc |
|
4 | # internal:other) are used when matched by a merge-pattern in hgrc | |
5 |
|
5 | |||
6 | unset HGMERGE # make sure HGMERGE doesn't interfere with the test |
|
6 | unset HGMERGE # make sure HGMERGE doesn't interfere with the test | |
7 |
|
7 | |||
8 | hg init |
|
8 | hg init | |
9 |
|
9 | |||
10 | echo "# initial file contents" |
|
10 | echo "# initial file contents" | |
11 | echo "line 1" > f |
|
11 | echo "line 1" > f | |
12 | echo "line 2" >> f |
|
12 | echo "line 2" >> f | |
13 | echo "line 3" >> f |
|
13 | echo "line 3" >> f | |
14 |
hg commit -Am "revision 0" |
|
14 | hg commit -Am "revision 0" | |
15 | cat f |
|
15 | cat f | |
16 | echo "# branch 1: editing line 1" |
|
16 | echo "# branch 1: editing line 1" | |
17 | sed 's/line 1/first line/' f > f.new |
|
17 | sed 's/line 1/first line/' f > f.new | |
18 | mv f.new f |
|
18 | mv f.new f | |
19 |
hg commit -Am "edited first line" |
|
19 | hg commit -Am "edited first line" | |
20 |
|
20 | |||
21 | echo "# branch 2: editing line 3" |
|
21 | echo "# branch 2: editing line 3" | |
22 | hg update 0 |
|
22 | hg update 0 | |
23 | sed 's/line 3/third line/' f > f.new |
|
23 | sed 's/line 3/third line/' f > f.new | |
24 | mv f.new f |
|
24 | mv f.new f | |
25 |
hg commit -Am "edited third line" |
|
25 | hg commit -Am "edited third line" | |
26 |
|
26 | |||
27 | echo "# merge using internal:fail tool" |
|
27 | echo "# merge using internal:fail tool" | |
28 | echo "[merge-patterns]" > .hg/hgrc |
|
28 | echo "[merge-patterns]" > .hg/hgrc | |
29 | echo "* = internal:fail" >> .hg/hgrc |
|
29 | echo "* = internal:fail" >> .hg/hgrc | |
30 | hg merge |
|
30 | hg merge | |
31 | cat f |
|
31 | cat f | |
32 | hg stat |
|
32 | hg stat | |
33 |
|
33 | |||
34 | echo "# merge using internal:local tool" |
|
34 | echo "# merge using internal:local tool" | |
35 | hg update -C 2 |
|
35 | hg update -C 2 | |
36 | sed 's/internal:fail/internal:local/' .hg/hgrc > .hg/hgrc.new |
|
36 | sed 's/internal:fail/internal:local/' .hg/hgrc > .hg/hgrc.new | |
37 | mv .hg/hgrc.new .hg/hgrc |
|
37 | mv .hg/hgrc.new .hg/hgrc | |
38 | hg merge |
|
38 | hg merge | |
39 | cat f |
|
39 | cat f | |
40 | hg stat |
|
40 | hg stat | |
41 |
|
41 | |||
42 | echo "# merge using internal:other tool" |
|
42 | echo "# merge using internal:other tool" | |
43 | hg update -C 2 |
|
43 | hg update -C 2 | |
44 | sed 's/internal:local/internal:other/' .hg/hgrc > .hg/hgrc.new |
|
44 | sed 's/internal:local/internal:other/' .hg/hgrc > .hg/hgrc.new | |
45 | mv .hg/hgrc.new .hg/hgrc |
|
45 | mv .hg/hgrc.new .hg/hgrc | |
46 | hg merge |
|
46 | hg merge | |
47 | cat f |
|
47 | cat f | |
48 | hg stat |
|
48 | hg stat | |
49 |
|
49 | |||
50 | echo "# merge using default tool" |
|
50 | echo "# merge using default tool" | |
51 | hg update -C 2 |
|
51 | hg update -C 2 | |
52 | rm .hg/hgrc |
|
52 | rm .hg/hgrc | |
53 | hg merge |
|
53 | hg merge | |
54 | cat f |
|
54 | cat f | |
55 | hg stat |
|
55 | hg stat | |
56 |
|
56 |
@@ -1,50 +1,50 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | hg init |
|
3 | hg init | |
4 |
|
4 | |||
5 | echo "# revision 0" |
|
5 | echo "# revision 0" | |
6 | echo "unchanged" > unchanged |
|
6 | echo "unchanged" > unchanged | |
7 | echo "remove me" > remove |
|
7 | echo "remove me" > remove | |
8 | echo "copy me" > copy |
|
8 | echo "copy me" > copy | |
9 | echo "move me" > move |
|
9 | echo "move me" > move | |
10 | for i in 1 2 3 4 5 6 7 8 9; do |
|
10 | for i in 1 2 3 4 5 6 7 8 9; do | |
11 | echo "merge ok $i" >> zzz1_merge_ok |
|
11 | echo "merge ok $i" >> zzz1_merge_ok | |
12 | done |
|
12 | done | |
13 | echo "merge bad" > zzz2_merge_bad |
|
13 | echo "merge bad" > zzz2_merge_bad | |
14 |
hg ci -Am "revision 0" |
|
14 | hg ci -Am "revision 0" | |
15 |
|
15 | |||
16 | echo "# revision 1" |
|
16 | echo "# revision 1" | |
17 | hg rm remove |
|
17 | hg rm remove | |
18 | hg mv move moved |
|
18 | hg mv move moved | |
19 | hg cp copy copied |
|
19 | hg cp copy copied | |
20 | echo "added" > added |
|
20 | echo "added" > added | |
21 | hg add added |
|
21 | hg add added | |
22 | echo "new first line" > zzz1_merge_ok |
|
22 | echo "new first line" > zzz1_merge_ok | |
23 | hg cat zzz1_merge_ok >> zzz1_merge_ok |
|
23 | hg cat zzz1_merge_ok >> zzz1_merge_ok | |
24 | echo "new last line" >> zzz2_merge_bad |
|
24 | echo "new last line" >> zzz2_merge_bad | |
25 |
hg ci -m "revision 1" |
|
25 | hg ci -m "revision 1" | |
26 |
|
26 | |||
27 | echo "# local changes to revision 0" |
|
27 | echo "# local changes to revision 0" | |
28 | hg co 0 |
|
28 | hg co 0 | |
29 | echo "new last line" >> zzz1_merge_ok |
|
29 | echo "new last line" >> zzz1_merge_ok | |
30 | echo "another last line" >> zzz2_merge_bad |
|
30 | echo "another last line" >> zzz2_merge_bad | |
31 | hg diff --nodates | grep "^[+-][^<>]" |
|
31 | hg diff --nodates | grep "^[+-][^<>]" | |
32 | hg st |
|
32 | hg st | |
33 |
|
33 | |||
34 | echo "# local merge with bad merge tool" |
|
34 | echo "# local merge with bad merge tool" | |
35 | HGMERGE=false hg co |
|
35 | HGMERGE=false hg co | |
36 | hg co 0 |
|
36 | hg co 0 | |
37 | hg diff --nodates | grep "^[+-][^<>]" |
|
37 | hg diff --nodates | grep "^[+-][^<>]" | |
38 | hg st |
|
38 | hg st | |
39 |
|
39 | |||
40 | echo "# local merge with conflicts" |
|
40 | echo "# local merge with conflicts" | |
41 | hg co |
|
41 | hg co | |
42 | hg co 0 |
|
42 | hg co 0 | |
43 | hg diff --nodates | grep "^[+-][^<>]" |
|
43 | hg diff --nodates | grep "^[+-][^<>]" | |
44 | hg st |
|
44 | hg st | |
45 |
|
45 | |||
46 | echo "# local merge without conflicts" |
|
46 | echo "# local merge without conflicts" | |
47 | hg revert zzz2_merge_bad |
|
47 | hg revert zzz2_merge_bad | |
48 | hg co |
|
48 | hg co | |
49 | hg diff --nodates | grep "^[+-][^<>]" |
|
49 | hg diff --nodates | grep "^[+-][^<>]" | |
50 | hg st |
|
50 | hg st |
@@ -1,44 +1,44 b'' | |||||
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 "added file1" > file1 |
|
6 | echo "added file1" > file1 | |
7 | echo "added file2" > file2 |
|
7 | echo "added file2" > file2 | |
8 | hg add file1 file2 |
|
8 | hg add file1 file2 | |
9 |
hg commit -m "added file1 and file2" |
|
9 | hg commit -m "added file1 and file2" | |
10 | echo "changed file1" >> file1 |
|
10 | echo "changed file1" >> file1 | |
11 |
hg commit -m "changed file1" |
|
11 | hg commit -m "changed file1" | |
12 | hg -q log |
|
12 | hg -q log | |
13 | hg id |
|
13 | hg id | |
14 | hg update -C 0 |
|
14 | hg update -C 0 | |
15 | hg id |
|
15 | hg id | |
16 | echo "changed file1" >> file1 |
|
16 | echo "changed file1" >> file1 | |
17 | hg id |
|
17 | hg id | |
18 | hg revert --all |
|
18 | hg revert --all | |
19 | hg diff |
|
19 | hg diff | |
20 | hg status |
|
20 | hg status | |
21 | hg id |
|
21 | hg id | |
22 | hg update |
|
22 | hg update | |
23 | hg diff |
|
23 | hg diff | |
24 | hg status |
|
24 | hg status | |
25 | hg id |
|
25 | hg id | |
26 | hg update -C 0 |
|
26 | hg update -C 0 | |
27 | echo "changed file1" >> file1 |
|
27 | echo "changed file1" >> file1 | |
28 | hg update |
|
28 | hg update | |
29 | hg diff |
|
29 | hg diff | |
30 | hg status |
|
30 | hg status | |
31 | hg id |
|
31 | hg id | |
32 | hg revert --all |
|
32 | hg revert --all | |
33 | hg diff |
|
33 | hg diff | |
34 | hg status |
|
34 | hg status | |
35 | hg id |
|
35 | hg id | |
36 | hg revert -r tip --all |
|
36 | hg revert -r tip --all | |
37 | hg diff |
|
37 | hg diff | |
38 | hg status |
|
38 | hg status | |
39 | hg id |
|
39 | hg id | |
40 | hg update -C |
|
40 | hg update -C | |
41 | hg diff |
|
41 | hg diff | |
42 | hg status |
|
42 | hg status | |
43 | hg id |
|
43 | hg id | |
44 |
|
44 |
@@ -1,23 +1,23 b'' | |||||
1 | 1:016807e6fdaf |
|
1 | 1:08a16e8e4408 | |
2 | 0:eb43f19ff115 |
|
2 | 0:d29c767a4b52 | |
3 | 016807e6fdaf tip |
|
3 | 08a16e8e4408 tip | |
4 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
4 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
5 | eb43f19ff115 |
|
5 | d29c767a4b52 | |
6 | eb43f19ff115+ |
|
6 | d29c767a4b52+ | |
7 | reverting file1 |
|
7 | reverting file1 | |
8 | ? file1.orig |
|
8 | ? file1.orig | |
9 | eb43f19ff115 |
|
9 | d29c767a4b52 | |
10 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
10 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
11 | ? file1.orig |
|
11 | ? file1.orig | |
12 | 016807e6fdaf tip |
|
12 | 08a16e8e4408 tip | |
13 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
13 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
14 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
14 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
15 | ? file1.orig |
|
15 | ? file1.orig | |
16 | 016807e6fdaf tip |
|
16 | 08a16e8e4408 tip | |
17 | ? file1.orig |
|
17 | ? file1.orig | |
18 | 016807e6fdaf tip |
|
18 | 08a16e8e4408 tip | |
19 | ? file1.orig |
|
19 | ? file1.orig | |
20 | 016807e6fdaf tip |
|
20 | 08a16e8e4408 tip | |
21 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
21 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
22 | ? file1.orig |
|
22 | ? file1.orig | |
23 | 016807e6fdaf tip |
|
23 | 08a16e8e4408 tip |
@@ -1,45 +1,45 b'' | |||||
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 "added file1" > file1 |
|
6 | echo "added file1" > file1 | |
7 | echo "another line of text" >> file1 |
|
7 | echo "another line of text" >> file1 | |
8 | echo "added file2" > file2 |
|
8 | echo "added file2" > file2 | |
9 | hg add file1 file2 |
|
9 | hg add file1 file2 | |
10 |
hg commit -m "added file1 and file2" |
|
10 | hg commit -m "added file1 and file2" | |
11 | echo "changed file1" >> file1 |
|
11 | echo "changed file1" >> file1 | |
12 |
hg commit -m "changed file1" |
|
12 | hg commit -m "changed file1" | |
13 | hg -q log |
|
13 | hg -q log | |
14 | hg id |
|
14 | hg id | |
15 | hg update -C 0 |
|
15 | hg update -C 0 | |
16 | hg id |
|
16 | hg id | |
17 | echo "changed file1" >> file1 |
|
17 | echo "changed file1" >> file1 | |
18 | hg id |
|
18 | hg id | |
19 | hg revert --no-backup --all |
|
19 | hg revert --no-backup --all | |
20 | hg diff |
|
20 | hg diff | |
21 | hg status |
|
21 | hg status | |
22 | hg id |
|
22 | hg id | |
23 | hg update |
|
23 | hg update | |
24 | hg diff |
|
24 | hg diff | |
25 | hg status |
|
25 | hg status | |
26 | hg id |
|
26 | hg id | |
27 | hg update -C 0 |
|
27 | hg update -C 0 | |
28 | echo "changed file1 different" >> file1 |
|
28 | echo "changed file1 different" >> file1 | |
29 | hg update |
|
29 | hg update | |
30 | hg diff --nodates |
|
30 | hg diff --nodates | |
31 | hg status |
|
31 | hg status | |
32 | hg id |
|
32 | hg id | |
33 | hg revert --no-backup --all |
|
33 | hg revert --no-backup --all | |
34 | hg diff |
|
34 | hg diff | |
35 | hg status |
|
35 | hg status | |
36 | hg id |
|
36 | hg id | |
37 | hg revert -r tip --no-backup --all |
|
37 | hg revert -r tip --no-backup --all | |
38 | hg diff |
|
38 | hg diff | |
39 | hg status |
|
39 | hg status | |
40 | hg id |
|
40 | hg id | |
41 | hg update -C |
|
41 | hg update -C | |
42 | hg diff |
|
42 | hg diff | |
43 | hg status |
|
43 | hg status | |
44 | hg id |
|
44 | hg id | |
45 |
|
45 |
@@ -1,38 +1,38 b'' | |||||
1 | 1:f248da0d4c3e |
|
1 | 1:dfab7f3c2efb | |
2 | 0:9eca13a34789 |
|
2 | 0:c3fa057dd86f | |
3 | f248da0d4c3e tip |
|
3 | dfab7f3c2efb tip | |
4 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
4 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
5 | 9eca13a34789 |
|
5 | c3fa057dd86f | |
6 | 9eca13a34789+ |
|
6 | c3fa057dd86f+ | |
7 | reverting file1 |
|
7 | reverting file1 | |
8 | 9eca13a34789 |
|
8 | c3fa057dd86f | |
9 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
9 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
10 | f248da0d4c3e tip |
|
10 | dfab7f3c2efb tip | |
11 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
11 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
12 | merging file1 |
|
12 | merging file1 | |
13 | warning: conflicts during merge. |
|
13 | warning: conflicts during merge. | |
14 | merging file1 failed! |
|
14 | merging file1 failed! | |
15 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
15 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
16 | use 'hg resolve' to retry unresolved file merges |
|
16 | use 'hg resolve' to retry unresolved file merges | |
17 |
diff -r |
|
17 | diff -r dfab7f3c2efb file1 | |
18 | --- a/file1 |
|
18 | --- a/file1 | |
19 | +++ b/file1 |
|
19 | +++ b/file1 | |
20 | @@ -1,3 +1,7 @@ |
|
20 | @@ -1,3 +1,7 @@ | |
21 | added file1 |
|
21 | added file1 | |
22 | another line of text |
|
22 | another line of text | |
23 | +<<<<<<< local |
|
23 | +<<<<<<< local | |
24 | +changed file1 different |
|
24 | +changed file1 different | |
25 | +======= |
|
25 | +======= | |
26 | changed file1 |
|
26 | changed file1 | |
27 | +>>>>>>> other |
|
27 | +>>>>>>> other | |
28 | M file1 |
|
28 | M file1 | |
29 | ? file1.orig |
|
29 | ? file1.orig | |
30 | f248da0d4c3e+ tip |
|
30 | dfab7f3c2efb+ tip | |
31 | reverting file1 |
|
31 | reverting file1 | |
32 | ? file1.orig |
|
32 | ? file1.orig | |
33 | f248da0d4c3e tip |
|
33 | dfab7f3c2efb tip | |
34 | ? file1.orig |
|
34 | ? file1.orig | |
35 | f248da0d4c3e tip |
|
35 | dfab7f3c2efb tip | |
36 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
36 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
37 | ? file1.orig |
|
37 | ? file1.orig | |
38 | f248da0d4c3e tip |
|
38 | dfab7f3c2efb tip |
@@ -1,197 +1,197 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | # test merge-tools configuration - mostly exercising filemerge.py |
|
3 | # test merge-tools configuration - mostly exercising filemerge.py | |
4 |
|
4 | |||
5 | unset HGMERGE # make sure HGMERGE doesn't interfere with the test |
|
5 | unset HGMERGE # make sure HGMERGE doesn't interfere with the test | |
6 |
|
6 | |||
7 | hg init |
|
7 | hg init | |
8 |
|
8 | |||
9 | echo "# revision 0" |
|
9 | echo "# revision 0" | |
10 | echo "revision 0" > f |
|
10 | echo "revision 0" > f | |
11 | echo "space" >> f |
|
11 | echo "space" >> f | |
12 |
hg commit -Am "revision 0" |
|
12 | hg commit -Am "revision 0" | |
13 |
|
13 | |||
14 | echo "# revision 1" |
|
14 | echo "# revision 1" | |
15 | echo "revision 1" > f |
|
15 | echo "revision 1" > f | |
16 | echo "space" >> f |
|
16 | echo "space" >> f | |
17 |
hg commit -Am "revision 1" |
|
17 | hg commit -Am "revision 1" | |
18 |
|
18 | |||
19 | hg update 0 > /dev/null |
|
19 | hg update 0 > /dev/null | |
20 | echo "# revision 2" |
|
20 | echo "# revision 2" | |
21 | echo "revision 2" > f |
|
21 | echo "revision 2" > f | |
22 | echo "space" >> f |
|
22 | echo "space" >> f | |
23 |
hg commit -Am "revision 2" |
|
23 | hg commit -Am "revision 2" | |
24 |
|
24 | |||
25 | hg update 0 > /dev/null |
|
25 | hg update 0 > /dev/null | |
26 | echo "# revision 3 - simple to merge" |
|
26 | echo "# revision 3 - simple to merge" | |
27 | echo "revision 3" >> f |
|
27 | echo "revision 3" >> f | |
28 |
hg commit -Am "revision 3" |
|
28 | hg commit -Am "revision 3" | |
29 |
|
29 | |||
30 |
|
30 | |||
31 | echo "[merge-tools]" > .hg/hgrc |
|
31 | echo "[merge-tools]" > .hg/hgrc | |
32 | echo |
|
32 | echo | |
33 |
|
33 | |||
34 | beforemerge() { |
|
34 | beforemerge() { | |
35 | cat .hg/hgrc |
|
35 | cat .hg/hgrc | |
36 | echo "# hg update -C 1" |
|
36 | echo "# hg update -C 1" | |
37 | hg update -C 1 > /dev/null |
|
37 | hg update -C 1 > /dev/null | |
38 | } |
|
38 | } | |
39 |
|
39 | |||
40 | aftermerge() { |
|
40 | aftermerge() { | |
41 | echo "# cat f" |
|
41 | echo "# cat f" | |
42 | cat f |
|
42 | cat f | |
43 | echo "# hg stat" |
|
43 | echo "# hg stat" | |
44 | hg stat |
|
44 | hg stat | |
45 | rm -f f.orig |
|
45 | rm -f f.orig | |
46 | echo |
|
46 | echo | |
47 | } |
|
47 | } | |
48 |
|
48 | |||
49 | domerge() { |
|
49 | domerge() { | |
50 | beforemerge |
|
50 | beforemerge | |
51 | echo "# hg merge $*" |
|
51 | echo "# hg merge $*" | |
52 | hg merge $* |
|
52 | hg merge $* | |
53 | aftermerge |
|
53 | aftermerge | |
54 | } |
|
54 | } | |
55 |
|
55 | |||
56 | echo |
|
56 | echo | |
57 | echo Tool selection |
|
57 | echo Tool selection | |
58 | echo |
|
58 | echo | |
59 |
|
59 | |||
60 | echo "# default is internal merge:" |
|
60 | echo "# default is internal merge:" | |
61 | beforemerge |
|
61 | beforemerge | |
62 | echo "# hg merge -r 2" |
|
62 | echo "# hg merge -r 2" | |
63 | # override $PATH to ensure hgmerge not visible; use $PYTHON in case we're |
|
63 | # override $PATH to ensure hgmerge not visible; use $PYTHON in case we're | |
64 | # running from a devel copy, not a temp installation |
|
64 | # running from a devel copy, not a temp installation | |
65 | PATH="$BINDIR" $PYTHON "$BINDIR"/hg merge -r 2 |
|
65 | PATH="$BINDIR" $PYTHON "$BINDIR"/hg merge -r 2 | |
66 | aftermerge |
|
66 | aftermerge | |
67 |
|
67 | |||
68 | echo "# simplest hgrc using false for merge:" |
|
68 | echo "# simplest hgrc using false for merge:" | |
69 | echo "false.whatever=" >> .hg/hgrc |
|
69 | echo "false.whatever=" >> .hg/hgrc | |
70 | domerge -r 2 |
|
70 | domerge -r 2 | |
71 |
|
71 | |||
72 | echo "# true with higher .priority gets precedence:" |
|
72 | echo "# true with higher .priority gets precedence:" | |
73 | echo "true.priority=1" >> .hg/hgrc |
|
73 | echo "true.priority=1" >> .hg/hgrc | |
74 | domerge -r 2 |
|
74 | domerge -r 2 | |
75 |
|
75 | |||
76 | echo "# unless lowered on command line:" |
|
76 | echo "# unless lowered on command line:" | |
77 | domerge -r 2 --config merge-tools.true.priority=-7 |
|
77 | domerge -r 2 --config merge-tools.true.priority=-7 | |
78 |
|
78 | |||
79 | echo "# or false set higher on command line:" |
|
79 | echo "# or false set higher on command line:" | |
80 | domerge -r 2 --config merge-tools.false.priority=117 |
|
80 | domerge -r 2 --config merge-tools.false.priority=117 | |
81 |
|
81 | |||
82 | echo "# or true.executable not found in PATH:" |
|
82 | echo "# or true.executable not found in PATH:" | |
83 | domerge -r 2 --config merge-tools.true.executable=nonexistingmergetool |
|
83 | domerge -r 2 --config merge-tools.true.executable=nonexistingmergetool | |
84 |
|
84 | |||
85 | echo "# or true.executable with bogus path:" |
|
85 | echo "# or true.executable with bogus path:" | |
86 | domerge -r 2 --config merge-tools.true.executable=/nonexisting/mergetool |
|
86 | domerge -r 2 --config merge-tools.true.executable=/nonexisting/mergetool | |
87 |
|
87 | |||
88 | echo "# but true.executable set to cat found in PATH works:" |
|
88 | echo "# but true.executable set to cat found in PATH works:" | |
89 | echo "true.executable=cat" >> .hg/hgrc |
|
89 | echo "true.executable=cat" >> .hg/hgrc | |
90 | domerge -r 2 |
|
90 | domerge -r 2 | |
91 |
|
91 | |||
92 | echo "# and true.executable set to cat with path works:" |
|
92 | echo "# and true.executable set to cat with path works:" | |
93 | domerge -r 2 --config merge-tools.true.executable=cat |
|
93 | domerge -r 2 --config merge-tools.true.executable=cat | |
94 |
|
94 | |||
95 | echo |
|
95 | echo | |
96 | echo Tool selection and merge-patterns |
|
96 | echo Tool selection and merge-patterns | |
97 | echo |
|
97 | echo | |
98 |
|
98 | |||
99 | echo "# merge-patterns specifies new tool false:" |
|
99 | echo "# merge-patterns specifies new tool false:" | |
100 | domerge -r 2 --config merge-patterns.f=false |
|
100 | domerge -r 2 --config merge-patterns.f=false | |
101 |
|
101 | |||
102 | echo "# merge-patterns specifies executable not found in PATH and gets warning:" |
|
102 | echo "# merge-patterns specifies executable not found in PATH and gets warning:" | |
103 | domerge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=nonexistingmergetool |
|
103 | domerge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=nonexistingmergetool | |
104 |
|
104 | |||
105 | echo "# merge-patterns specifies executable with bogus path and gets warning:" |
|
105 | echo "# merge-patterns specifies executable with bogus path and gets warning:" | |
106 | domerge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=/nonexisting/mergetool |
|
106 | domerge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=/nonexisting/mergetool | |
107 |
|
107 | |||
108 | echo |
|
108 | echo | |
109 | echo ui.merge overrules priority |
|
109 | echo ui.merge overrules priority | |
110 | echo |
|
110 | echo | |
111 |
|
111 | |||
112 | echo "# ui.merge specifies false:" |
|
112 | echo "# ui.merge specifies false:" | |
113 | domerge -r 2 --config ui.merge=false |
|
113 | domerge -r 2 --config ui.merge=false | |
114 |
|
114 | |||
115 | echo "# ui.merge specifies internal:fail:" |
|
115 | echo "# ui.merge specifies internal:fail:" | |
116 | domerge -r 2 --config ui.merge=internal:fail |
|
116 | domerge -r 2 --config ui.merge=internal:fail | |
117 |
|
117 | |||
118 | echo "# ui.merge specifies internal:local:" |
|
118 | echo "# ui.merge specifies internal:local:" | |
119 | domerge -r 2 --config ui.merge=internal:local |
|
119 | domerge -r 2 --config ui.merge=internal:local | |
120 |
|
120 | |||
121 | echo "# ui.merge specifies internal:other:" |
|
121 | echo "# ui.merge specifies internal:other:" | |
122 | domerge -r 2 --config ui.merge=internal:other |
|
122 | domerge -r 2 --config ui.merge=internal:other | |
123 |
|
123 | |||
124 | echo "# ui.merge specifies internal:prompt:" |
|
124 | echo "# ui.merge specifies internal:prompt:" | |
125 | domerge -r 2 --config ui.merge=internal:prompt |
|
125 | domerge -r 2 --config ui.merge=internal:prompt | |
126 |
|
126 | |||
127 | echo "# ui.merge specifies internal:dump:" |
|
127 | echo "# ui.merge specifies internal:dump:" | |
128 | domerge -r 2 --config ui.merge=internal:dump |
|
128 | domerge -r 2 --config ui.merge=internal:dump | |
129 | echo f.base: |
|
129 | echo f.base: | |
130 | cat f.base |
|
130 | cat f.base | |
131 | echo f.local: |
|
131 | echo f.local: | |
132 | cat f.local |
|
132 | cat f.local | |
133 | echo f.other: |
|
133 | echo f.other: | |
134 | cat f.other |
|
134 | cat f.other | |
135 | rm f.base f.local f.other |
|
135 | rm f.base f.local f.other | |
136 | echo |
|
136 | echo | |
137 |
|
137 | |||
138 | echo "# ui.merge specifies internal:other but is overruled by pattern for false:" |
|
138 | echo "# ui.merge specifies internal:other but is overruled by pattern for false:" | |
139 | domerge -r 2 --config ui.merge=internal:other --config merge-patterns.f=false |
|
139 | domerge -r 2 --config ui.merge=internal:other --config merge-patterns.f=false | |
140 |
|
140 | |||
141 | echo |
|
141 | echo | |
142 | echo Premerge |
|
142 | echo Premerge | |
143 | echo |
|
143 | echo | |
144 |
|
144 | |||
145 | echo "# Default is silent simplemerge:" |
|
145 | echo "# Default is silent simplemerge:" | |
146 | domerge -r 3 |
|
146 | domerge -r 3 | |
147 |
|
147 | |||
148 | echo "# .premerge=True is same:" |
|
148 | echo "# .premerge=True is same:" | |
149 | domerge -r 3 --config merge-tools.true.premerge=True |
|
149 | domerge -r 3 --config merge-tools.true.premerge=True | |
150 |
|
150 | |||
151 | echo "# .premerge=False executes merge-tool:" |
|
151 | echo "# .premerge=False executes merge-tool:" | |
152 | domerge -r 3 --config merge-tools.true.premerge=False |
|
152 | domerge -r 3 --config merge-tools.true.premerge=False | |
153 |
|
153 | |||
154 |
|
154 | |||
155 | echo |
|
155 | echo | |
156 | echo Tool execution |
|
156 | echo Tool execution | |
157 | echo |
|
157 | echo | |
158 |
|
158 | |||
159 | echo '# set tools.args explicit to include $base $local $other $output:' # default '$local $base $other' |
|
159 | echo '# set tools.args explicit to include $base $local $other $output:' # default '$local $base $other' | |
160 | beforemerge |
|
160 | beforemerge | |
161 | hg merge -r 2 --config merge-tools.true.executable=head --config merge-tools.true.args='$base $local $other $output' \ |
|
161 | hg merge -r 2 --config merge-tools.true.executable=head --config merge-tools.true.args='$base $local $other $output' \ | |
162 | | sed 's,==> .* <==,==> ... <==,g' |
|
162 | | sed 's,==> .* <==,==> ... <==,g' | |
163 | aftermerge |
|
163 | aftermerge | |
164 |
|
164 | |||
165 | echo '# Merge with "echo mergeresult > $local":' |
|
165 | echo '# Merge with "echo mergeresult > $local":' | |
166 | beforemerge |
|
166 | beforemerge | |
167 | hg merge -r 2 --config merge-tools.true.executable=echo --config merge-tools.true.args='mergeresult > $local' |
|
167 | hg merge -r 2 --config merge-tools.true.executable=echo --config merge-tools.true.args='mergeresult > $local' | |
168 | aftermerge |
|
168 | aftermerge | |
169 |
|
169 | |||
170 | echo '# - and $local is the file f:' |
|
170 | echo '# - and $local is the file f:' | |
171 | beforemerge |
|
171 | beforemerge | |
172 | hg merge -r 2 --config merge-tools.true.executable=echo --config merge-tools.true.args='mergeresult > f' |
|
172 | hg merge -r 2 --config merge-tools.true.executable=echo --config merge-tools.true.args='mergeresult > f' | |
173 | aftermerge |
|
173 | aftermerge | |
174 |
|
174 | |||
175 | echo '# Merge with "echo mergeresult > $output" - the variable is a bit magic:' |
|
175 | echo '# Merge with "echo mergeresult > $output" - the variable is a bit magic:' | |
176 | beforemerge |
|
176 | beforemerge | |
177 | hg merge -r 2 --config merge-tools.true.executable=echo --config merge-tools.true.args='mergeresult > $output' |
|
177 | hg merge -r 2 --config merge-tools.true.executable=echo --config merge-tools.true.args='mergeresult > $output' | |
178 | aftermerge |
|
178 | aftermerge | |
179 |
|
179 | |||
180 | echo '# Merge using tool with a path that must be quoted:' |
|
180 | echo '# Merge using tool with a path that must be quoted:' | |
181 | beforemerge |
|
181 | beforemerge | |
182 | cat <<EOF > 'my merge tool' |
|
182 | cat <<EOF > 'my merge tool' | |
183 | #!/bin/sh |
|
183 | #!/bin/sh | |
184 | cat "\$1" "\$2" "\$3" > "\$4" |
|
184 | cat "\$1" "\$2" "\$3" > "\$4" | |
185 | EOF |
|
185 | EOF | |
186 | chmod +x 'my merge tool' |
|
186 | chmod +x 'my merge tool' | |
187 | hg merge -r 2 --config merge-tools.true.executable='./my merge tool' --config merge-tools.true.args='$base $local $other $output' |
|
187 | hg merge -r 2 --config merge-tools.true.executable='./my merge tool' --config merge-tools.true.args='$base $local $other $output' | |
188 | rm -f 'my merge tool' |
|
188 | rm -f 'my merge tool' | |
189 | aftermerge |
|
189 | aftermerge | |
190 |
|
190 | |||
191 |
|
191 | |||
192 | echo |
|
192 | echo | |
193 | echo Merge post-processing |
|
193 | echo Merge post-processing | |
194 | echo |
|
194 | echo | |
195 |
|
195 | |||
196 | echo "# cat is a bad merge-tool and doesn't change:" |
|
196 | echo "# cat is a bad merge-tool and doesn't change:" | |
197 | domerge -y -r 2 --config merge-tools.true.checkchanged=1 |
|
197 | domerge -y -r 2 --config merge-tools.true.checkchanged=1 |
@@ -1,165 +1,165 b'' | |||||
1 | $ cat <<EOF > merge |
|
1 | $ cat <<EOF > merge | |
2 | > import sys, os |
|
2 | > import sys, os | |
3 | > |
|
3 | > | |
4 | > try: |
|
4 | > try: | |
5 | > import msvcrt |
|
5 | > import msvcrt | |
6 | > msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY) |
|
6 | > msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY) | |
7 | > msvcrt.setmode(sys.stderr.fileno(), os.O_BINARY) |
|
7 | > msvcrt.setmode(sys.stderr.fileno(), os.O_BINARY) | |
8 | > except ImportError: |
|
8 | > except ImportError: | |
9 | > pass |
|
9 | > pass | |
10 | > |
|
10 | > | |
11 | > print "merging for", os.path.basename(sys.argv[1]) |
|
11 | > print "merging for", os.path.basename(sys.argv[1]) | |
12 | > EOF |
|
12 | > EOF | |
13 | $ HGMERGE="python ../merge"; export HGMERGE |
|
13 | $ HGMERGE="python ../merge"; export HGMERGE | |
14 |
|
14 | |||
15 | $ mkdir t |
|
15 | $ mkdir t | |
16 | $ cd t |
|
16 | $ cd t | |
17 | $ hg init |
|
17 | $ hg init | |
18 | $ echo This is file a1 > a |
|
18 | $ echo This is file a1 > a | |
19 | $ hg add a |
|
19 | $ hg add a | |
20 |
$ hg commit -m "commit #0" |
|
20 | $ hg commit -m "commit #0" | |
21 | $ echo This is file b1 > b |
|
21 | $ echo This is file b1 > b | |
22 | $ hg add b |
|
22 | $ hg add b | |
23 |
$ hg commit -m "commit #1" |
|
23 | $ hg commit -m "commit #1" | |
24 |
|
24 | |||
25 | $ hg update 0 |
|
25 | $ hg update 0 | |
26 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
26 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
27 | $ echo This is file c1 > c |
|
27 | $ echo This is file c1 > c | |
28 | $ hg add c |
|
28 | $ hg add c | |
29 |
$ hg commit -m "commit #2" |
|
29 | $ hg commit -m "commit #2" | |
30 | created new head |
|
30 | created new head | |
31 | $ echo This is file b1 > b |
|
31 | $ echo This is file b1 > b | |
32 | no merges expected |
|
32 | no merges expected | |
33 | $ hg merge -P 1 |
|
33 | $ hg merge -P 1 | |
34 |
changeset: 1: |
|
34 | changeset: 1:b8bb4a988f25 | |
35 | user: test |
|
35 | user: test | |
36 |
date: |
|
36 | date: Thu Jan 01 00:00:00 1970 +0000 | |
37 | summary: commit #1 |
|
37 | summary: commit #1 | |
38 |
|
38 | |||
39 | $ hg merge 1 |
|
39 | $ hg merge 1 | |
40 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
40 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
41 | (branch merge, don't forget to commit) |
|
41 | (branch merge, don't forget to commit) | |
42 | $ hg diff --nodates |
|
42 | $ hg diff --nodates | |
43 |
diff -r |
|
43 | diff -r 49035e18a8e6 b | |
44 | --- /dev/null |
|
44 | --- /dev/null | |
45 | +++ b/b |
|
45 | +++ b/b | |
46 | @@ -0,0 +1,1 @@ |
|
46 | @@ -0,0 +1,1 @@ | |
47 | +This is file b1 |
|
47 | +This is file b1 | |
48 | $ hg status |
|
48 | $ hg status | |
49 | M b |
|
49 | M b | |
50 | $ cd ..; rm -r t |
|
50 | $ cd ..; rm -r t | |
51 |
|
51 | |||
52 | $ mkdir t |
|
52 | $ mkdir t | |
53 | $ cd t |
|
53 | $ cd t | |
54 | $ hg init |
|
54 | $ hg init | |
55 | $ echo This is file a1 > a |
|
55 | $ echo This is file a1 > a | |
56 | $ hg add a |
|
56 | $ hg add a | |
57 |
$ hg commit -m "commit #0" |
|
57 | $ hg commit -m "commit #0" | |
58 | $ echo This is file b1 > b |
|
58 | $ echo This is file b1 > b | |
59 | $ hg add b |
|
59 | $ hg add b | |
60 |
$ hg commit -m "commit #1" |
|
60 | $ hg commit -m "commit #1" | |
61 |
|
61 | |||
62 | $ hg update 0 |
|
62 | $ hg update 0 | |
63 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
63 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
64 | $ echo This is file c1 > c |
|
64 | $ echo This is file c1 > c | |
65 | $ hg add c |
|
65 | $ hg add c | |
66 |
$ hg commit -m "commit #2" |
|
66 | $ hg commit -m "commit #2" | |
67 | created new head |
|
67 | created new head | |
68 | $ echo This is file b2 > b |
|
68 | $ echo This is file b2 > b | |
69 | merge should fail |
|
69 | merge should fail | |
70 | $ hg merge 1 |
|
70 | $ hg merge 1 | |
71 | abort: untracked file in working directory differs from file in requested revision: 'b' |
|
71 | abort: untracked file in working directory differs from file in requested revision: 'b' | |
72 | merge of b expected |
|
72 | merge of b expected | |
73 | $ hg merge -f 1 |
|
73 | $ hg merge -f 1 | |
74 | merging for b |
|
74 | merging for b | |
75 | merging b |
|
75 | merging b | |
76 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
76 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
77 | (branch merge, don't forget to commit) |
|
77 | (branch merge, don't forget to commit) | |
78 | $ hg diff --nodates |
|
78 | $ hg diff --nodates | |
79 |
diff -r |
|
79 | diff -r 49035e18a8e6 b | |
80 | --- /dev/null |
|
80 | --- /dev/null | |
81 | +++ b/b |
|
81 | +++ b/b | |
82 | @@ -0,0 +1,1 @@ |
|
82 | @@ -0,0 +1,1 @@ | |
83 | +This is file b2 |
|
83 | +This is file b2 | |
84 | $ hg status |
|
84 | $ hg status | |
85 | M b |
|
85 | M b | |
86 | $ cd ..; rm -r t |
|
86 | $ cd ..; rm -r t | |
87 |
|
87 | |||
88 | $ mkdir t |
|
88 | $ mkdir t | |
89 | $ cd t |
|
89 | $ cd t | |
90 | $ hg init |
|
90 | $ hg init | |
91 | $ echo This is file a1 > a |
|
91 | $ echo This is file a1 > a | |
92 | $ hg add a |
|
92 | $ hg add a | |
93 |
$ hg commit -m "commit #0" |
|
93 | $ hg commit -m "commit #0" | |
94 | $ echo This is file b1 > b |
|
94 | $ echo This is file b1 > b | |
95 | $ hg add b |
|
95 | $ hg add b | |
96 |
$ hg commit -m "commit #1" |
|
96 | $ hg commit -m "commit #1" | |
97 | $ echo This is file b22 > b |
|
97 | $ echo This is file b22 > b | |
98 |
$ hg commit -m "commit #2" |
|
98 | $ hg commit -m "commit #2" | |
99 | $ hg update 1 |
|
99 | $ hg update 1 | |
100 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
100 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
101 | $ echo This is file c1 > c |
|
101 | $ echo This is file c1 > c | |
102 | $ hg add c |
|
102 | $ hg add c | |
103 |
$ hg commit -m "commit #3" |
|
103 | $ hg commit -m "commit #3" | |
104 | created new head |
|
104 | created new head | |
105 |
|
105 | |||
106 | Contents of b should be "this is file b1" |
|
106 | Contents of b should be "this is file b1" | |
107 | $ cat b |
|
107 | $ cat b | |
108 | This is file b1 |
|
108 | This is file b1 | |
109 |
|
109 | |||
110 | $ echo This is file b22 > b |
|
110 | $ echo This is file b22 > b | |
111 | merge fails |
|
111 | merge fails | |
112 | $ hg merge 2 |
|
112 | $ hg merge 2 | |
113 | abort: outstanding uncommitted changes (use 'hg status' to list changes) |
|
113 | abort: outstanding uncommitted changes (use 'hg status' to list changes) | |
114 | $ echo %% merge expected! |
|
114 | $ echo %% merge expected! | |
115 | %% merge expected! |
|
115 | %% merge expected! | |
116 | $ hg merge -f 2 |
|
116 | $ hg merge -f 2 | |
117 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
117 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
118 | (branch merge, don't forget to commit) |
|
118 | (branch merge, don't forget to commit) | |
119 | $ hg diff --nodates |
|
119 | $ hg diff --nodates | |
120 | diff -r c1dd73cbf59f b |
|
120 | diff -r 85de557015a8 b | |
121 | --- a/b |
|
121 | --- a/b | |
122 | +++ b/b |
|
122 | +++ b/b | |
123 | @@ -1,1 +1,1 @@ |
|
123 | @@ -1,1 +1,1 @@ | |
124 | -This is file b1 |
|
124 | -This is file b1 | |
125 | +This is file b22 |
|
125 | +This is file b22 | |
126 | $ hg status |
|
126 | $ hg status | |
127 | M b |
|
127 | M b | |
128 | $ cd ..; rm -r t |
|
128 | $ cd ..; rm -r t | |
129 |
|
129 | |||
130 | $ mkdir t |
|
130 | $ mkdir t | |
131 | $ cd t |
|
131 | $ cd t | |
132 | $ hg init |
|
132 | $ hg init | |
133 | $ echo This is file a1 > a |
|
133 | $ echo This is file a1 > a | |
134 | $ hg add a |
|
134 | $ hg add a | |
135 |
$ hg commit -m "commit #0" |
|
135 | $ hg commit -m "commit #0" | |
136 | $ echo This is file b1 > b |
|
136 | $ echo This is file b1 > b | |
137 | $ hg add b |
|
137 | $ hg add b | |
138 |
$ hg commit -m "commit #1" |
|
138 | $ hg commit -m "commit #1" | |
139 | $ echo This is file b22 > b |
|
139 | $ echo This is file b22 > b | |
140 |
$ hg commit -m "commit #2" |
|
140 | $ hg commit -m "commit #2" | |
141 | $ hg update 1 |
|
141 | $ hg update 1 | |
142 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
142 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
143 | $ echo This is file c1 > c |
|
143 | $ echo This is file c1 > c | |
144 | $ hg add c |
|
144 | $ hg add c | |
145 |
$ hg commit -m "commit #3" |
|
145 | $ hg commit -m "commit #3" | |
146 | created new head |
|
146 | created new head | |
147 | $ echo This is file b33 > b |
|
147 | $ echo This is file b33 > b | |
148 | merge of b should fail |
|
148 | merge of b should fail | |
149 | $ hg merge 2 |
|
149 | $ hg merge 2 | |
150 | abort: outstanding uncommitted changes (use 'hg status' to list changes) |
|
150 | abort: outstanding uncommitted changes (use 'hg status' to list changes) | |
151 | merge of b expected |
|
151 | merge of b expected | |
152 | $ hg merge -f 2 |
|
152 | $ hg merge -f 2 | |
153 | merging for b |
|
153 | merging for b | |
154 | merging b |
|
154 | merging b | |
155 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
155 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
156 | (branch merge, don't forget to commit) |
|
156 | (branch merge, don't forget to commit) | |
157 | $ hg diff --nodates |
|
157 | $ hg diff --nodates | |
158 | diff -r c1dd73cbf59f b |
|
158 | diff -r 85de557015a8 b | |
159 | --- a/b |
|
159 | --- a/b | |
160 | +++ b/b |
|
160 | +++ b/b | |
161 | @@ -1,1 +1,1 @@ |
|
161 | @@ -1,1 +1,1 @@ | |
162 | -This is file b1 |
|
162 | -This is file b1 | |
163 | +This is file b33 |
|
163 | +This is file b33 | |
164 | $ hg status |
|
164 | $ hg status | |
165 | M b |
|
165 | M b |
@@ -1,51 +1,51 b'' | |||||
1 | Test for changeset 9fe267f77f56ff127cf7e65dc15dd9de71ce8ceb |
|
1 | Test for changeset 9fe267f77f56ff127cf7e65dc15dd9de71ce8ceb | |
2 | (merge correctly when all the files in a directory are moved |
|
2 | (merge correctly when all the files in a directory are moved | |
3 | but then local changes are added in the same directory) |
|
3 | but then local changes are added in the same directory) | |
4 |
|
4 | |||
5 | $ hg init a |
|
5 | $ hg init a | |
6 | $ cd a |
|
6 | $ cd a | |
7 | $ mkdir -p testdir |
|
7 | $ mkdir -p testdir | |
8 | $ echo a > testdir/a |
|
8 | $ echo a > testdir/a | |
9 | $ hg add testdir/a |
|
9 | $ hg add testdir/a | |
10 |
$ hg commit - |
|
10 | $ hg commit -m a | |
11 | $ cd .. |
|
11 | $ cd .. | |
12 |
|
12 | |||
13 | $ hg clone a b |
|
13 | $ hg clone a b | |
14 | updating to branch default |
|
14 | updating to branch default | |
15 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
15 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
16 | $ cd a |
|
16 | $ cd a | |
17 | $ echo alpha > testdir/a |
|
17 | $ echo alpha > testdir/a | |
18 |
$ hg commit - |
|
18 | $ hg commit -m remote-change | |
19 | $ cd .. |
|
19 | $ cd .. | |
20 |
|
20 | |||
21 | $ cd b |
|
21 | $ cd b | |
22 | $ mkdir testdir/subdir |
|
22 | $ mkdir testdir/subdir | |
23 | $ hg mv testdir/a testdir/subdir/a |
|
23 | $ hg mv testdir/a testdir/subdir/a | |
24 |
$ hg commit - |
|
24 | $ hg commit -m move | |
25 | $ mkdir newdir |
|
25 | $ mkdir newdir | |
26 | $ echo beta > newdir/beta |
|
26 | $ echo beta > newdir/beta | |
27 | $ hg add newdir/beta |
|
27 | $ hg add newdir/beta | |
28 |
$ hg commit - |
|
28 | $ hg commit -m local-addition | |
29 | $ hg pull ../a |
|
29 | $ hg pull ../a | |
30 | pulling from ../a |
|
30 | pulling from ../a | |
31 | searching for changes |
|
31 | searching for changes | |
32 | adding changesets |
|
32 | adding changesets | |
33 | adding manifests |
|
33 | adding manifests | |
34 | adding file changes |
|
34 | adding file changes | |
35 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
35 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
36 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
36 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
37 | $ hg up -C 2 |
|
37 | $ hg up -C 2 | |
38 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
38 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
39 | $ hg merge |
|
39 | $ hg merge | |
40 | merging testdir/subdir/a and testdir/a to testdir/subdir/a |
|
40 | merging testdir/subdir/a and testdir/a to testdir/subdir/a | |
41 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
41 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
42 | (branch merge, don't forget to commit) |
|
42 | (branch merge, don't forget to commit) | |
43 | $ hg stat |
|
43 | $ hg stat | |
44 | M testdir/subdir/a |
|
44 | M testdir/subdir/a | |
45 | $ hg diff --nodates |
|
45 | $ hg diff --nodates | |
46 |
diff -r |
|
46 | diff -r bc21c9773bfa testdir/subdir/a | |
47 | --- a/testdir/subdir/a |
|
47 | --- a/testdir/subdir/a | |
48 | +++ b/testdir/subdir/a |
|
48 | +++ b/testdir/subdir/a | |
49 | @@ -1,1 +1,1 @@ |
|
49 | @@ -1,1 +1,1 @@ | |
50 | -a |
|
50 | -a | |
51 | +alpha |
|
51 | +alpha |
@@ -1,53 +1,53 b'' | |||||
1 | $ mkdir t |
|
1 | $ mkdir t | |
2 | $ cd t |
|
2 | $ cd t | |
3 | $ hg init |
|
3 | $ hg init | |
4 | $ echo This is file a1 > a |
|
4 | $ echo This is file a1 > a | |
5 | $ hg add a |
|
5 | $ hg add a | |
6 |
$ hg commit -m "commit #0" |
|
6 | $ hg commit -m "commit #0" | |
7 | $ echo This is file b1 > b |
|
7 | $ echo This is file b1 > b | |
8 | $ hg add b |
|
8 | $ hg add b | |
9 |
$ hg commit -m "commit #1" |
|
9 | $ hg commit -m "commit #1" | |
10 | $ rm b |
|
10 | $ rm b | |
11 | $ hg update 0 |
|
11 | $ hg update 0 | |
12 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
12 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
13 | $ echo This is file b2 > b |
|
13 | $ echo This is file b2 > b | |
14 | $ hg add b |
|
14 | $ hg add b | |
15 |
$ hg commit -m "commit #2" |
|
15 | $ hg commit -m "commit #2" | |
16 | created new head |
|
16 | created new head | |
17 | $ cd ..; rm -r t |
|
17 | $ cd ..; rm -r t | |
18 |
|
18 | |||
19 | $ mkdir t |
|
19 | $ mkdir t | |
20 | $ cd t |
|
20 | $ cd t | |
21 | $ hg init |
|
21 | $ hg init | |
22 | $ echo This is file a1 > a |
|
22 | $ echo This is file a1 > a | |
23 | $ hg add a |
|
23 | $ hg add a | |
24 |
$ hg commit -m "commit #0" |
|
24 | $ hg commit -m "commit #0" | |
25 | $ echo This is file b1 > b |
|
25 | $ echo This is file b1 > b | |
26 | $ hg add b |
|
26 | $ hg add b | |
27 |
$ hg commit -m "commit #1" |
|
27 | $ hg commit -m "commit #1" | |
28 | $ rm b |
|
28 | $ rm b | |
29 | $ hg update 0 |
|
29 | $ hg update 0 | |
30 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
30 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
31 | $ echo This is file b2 > b |
|
31 | $ echo This is file b2 > b | |
32 |
$ hg commit -A -m "commit #2" |
|
32 | $ hg commit -A -m "commit #2" | |
33 | adding b |
|
33 | adding b | |
34 | created new head |
|
34 | created new head | |
35 | $ cd ..; rm -r t |
|
35 | $ cd ..; rm -r t | |
36 |
|
36 | |||
37 | $ mkdir t |
|
37 | $ mkdir t | |
38 | $ cd t |
|
38 | $ cd t | |
39 | $ hg init |
|
39 | $ hg init | |
40 | $ echo This is file a1 > a |
|
40 | $ echo This is file a1 > a | |
41 | $ hg add a |
|
41 | $ hg add a | |
42 |
$ hg commit -m "commit #0" |
|
42 | $ hg commit -m "commit #0" | |
43 | $ echo This is file b1 > b |
|
43 | $ echo This is file b1 > b | |
44 | $ hg add b |
|
44 | $ hg add b | |
45 |
$ hg commit -m "commit #1" |
|
45 | $ hg commit -m "commit #1" | |
46 | $ rm b |
|
46 | $ rm b | |
47 | $ hg remove b |
|
47 | $ hg remove b | |
48 | $ hg update 0 |
|
48 | $ hg update 0 | |
49 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
49 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
50 | $ echo This is file b2 > b |
|
50 | $ echo This is file b2 > b | |
51 |
$ hg commit -A -m "commit #2" |
|
51 | $ hg commit -A -m "commit #2" | |
52 | adding b |
|
52 | adding b | |
53 | created new head |
|
53 | created new head |
@@ -1,20 +1,20 b'' | |||||
1 | $ hg init |
|
1 | $ hg init | |
2 | $ echo This is file a1 > a |
|
2 | $ echo This is file a1 > a | |
3 | $ hg add a |
|
3 | $ hg add a | |
4 |
$ hg commit -m "commit #0" |
|
4 | $ hg commit -m "commit #0" | |
5 | $ echo This is file b1 > b |
|
5 | $ echo This is file b1 > b | |
6 | $ hg add b |
|
6 | $ hg add b | |
7 |
$ hg commit -m "commit #1" |
|
7 | $ hg commit -m "commit #1" | |
8 | $ hg update 0 |
|
8 | $ hg update 0 | |
9 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
9 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
10 | $ echo This is file c1 > c |
|
10 | $ echo This is file c1 > c | |
11 | $ hg add c |
|
11 | $ hg add c | |
12 |
$ hg commit -m "commit #2" |
|
12 | $ hg commit -m "commit #2" | |
13 | created new head |
|
13 | created new head | |
14 | $ hg merge 1 |
|
14 | $ hg merge 1 | |
15 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
15 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
16 | (branch merge, don't forget to commit) |
|
16 | (branch merge, don't forget to commit) | |
17 | $ rm b |
|
17 | $ rm b | |
18 | $ echo This is file c22 > c |
|
18 | $ echo This is file c22 > c | |
19 |
$ hg commit -m "commit #3" |
|
19 | $ hg commit -m "commit #3" | |
20 |
|
20 |
@@ -1,69 +1,69 b'' | |||||
1 | $ cat <<EOF > merge |
|
1 | $ cat <<EOF > merge | |
2 | > import sys, os |
|
2 | > import sys, os | |
3 | > print "merging for", os.path.basename(sys.argv[1]) |
|
3 | > print "merging for", os.path.basename(sys.argv[1]) | |
4 | > EOF |
|
4 | > EOF | |
5 | $ HGMERGE="python ../merge"; export HGMERGE |
|
5 | $ HGMERGE="python ../merge"; export HGMERGE | |
6 |
|
6 | |||
7 | $ mkdir A1 |
|
7 | $ mkdir A1 | |
8 | $ cd A1 |
|
8 | $ cd A1 | |
9 | $ hg init |
|
9 | $ hg init | |
10 | $ echo This is file foo1 > foo |
|
10 | $ echo This is file foo1 > foo | |
11 | $ echo This is file bar1 > bar |
|
11 | $ echo This is file bar1 > bar | |
12 | $ hg add foo bar |
|
12 | $ hg add foo bar | |
13 |
$ hg commit -m "commit text" |
|
13 | $ hg commit -m "commit text" | |
14 |
|
14 | |||
15 | $ cd .. |
|
15 | $ cd .. | |
16 | $ hg clone A1 B1 |
|
16 | $ hg clone A1 B1 | |
17 | updating to branch default |
|
17 | updating to branch default | |
18 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
18 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
19 |
|
19 | |||
20 | $ cd A1 |
|
20 | $ cd A1 | |
21 | $ rm bar |
|
21 | $ rm bar | |
22 | $ hg remove bar |
|
22 | $ hg remove bar | |
23 |
$ hg commit -m "commit test" |
|
23 | $ hg commit -m "commit test" | |
24 |
|
24 | |||
25 | $ cd ../B1 |
|
25 | $ cd ../B1 | |
26 | $ echo This is file foo22 > foo |
|
26 | $ echo This is file foo22 > foo | |
27 |
$ hg commit -m "commit test" |
|
27 | $ hg commit -m "commit test" | |
28 |
|
28 | |||
29 | $ cd .. |
|
29 | $ cd .. | |
30 | $ hg clone A1 A2 |
|
30 | $ hg clone A1 A2 | |
31 | updating to branch default |
|
31 | updating to branch default | |
32 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
32 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
33 | $ hg clone B1 B2 |
|
33 | $ hg clone B1 B2 | |
34 | updating to branch default |
|
34 | updating to branch default | |
35 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
35 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
36 |
|
36 | |||
37 | $ cd A1 |
|
37 | $ cd A1 | |
38 | $ hg pull ../B1 |
|
38 | $ hg pull ../B1 | |
39 | pulling from ../B1 |
|
39 | pulling from ../B1 | |
40 | searching for changes |
|
40 | searching for changes | |
41 | adding changesets |
|
41 | adding changesets | |
42 | adding manifests |
|
42 | adding manifests | |
43 | adding file changes |
|
43 | adding file changes | |
44 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
44 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
45 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
45 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
46 | $ hg merge |
|
46 | $ hg merge | |
47 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
47 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
48 | (branch merge, don't forget to commit) |
|
48 | (branch merge, don't forget to commit) | |
49 |
$ hg commit -m "commit test" |
|
49 | $ hg commit -m "commit test" | |
50 | bar should remain deleted. |
|
50 | bar should remain deleted. | |
51 | $ hg manifest --debug |
|
51 | $ hg manifest --debug | |
52 | f9b0e817f6a48de3564c6b2957687c5e7297c5a0 644 foo |
|
52 | f9b0e817f6a48de3564c6b2957687c5e7297c5a0 644 foo | |
53 |
|
53 | |||
54 | $ cd ../B2 |
|
54 | $ cd ../B2 | |
55 | $ hg pull ../A2 |
|
55 | $ hg pull ../A2 | |
56 | pulling from ../A2 |
|
56 | pulling from ../A2 | |
57 | searching for changes |
|
57 | searching for changes | |
58 | adding changesets |
|
58 | adding changesets | |
59 | adding manifests |
|
59 | adding manifests | |
60 | adding file changes |
|
60 | adding file changes | |
61 | added 1 changesets with 0 changes to 0 files (+1 heads) |
|
61 | added 1 changesets with 0 changes to 0 files (+1 heads) | |
62 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
62 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
63 | $ hg merge |
|
63 | $ hg merge | |
64 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
64 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
65 | (branch merge, don't forget to commit) |
|
65 | (branch merge, don't forget to commit) | |
66 |
$ hg commit -m "commit test" |
|
66 | $ hg commit -m "commit test" | |
67 | bar should remain deleted. |
|
67 | bar should remain deleted. | |
68 | $ hg manifest --debug |
|
68 | $ hg manifest --debug | |
69 | f9b0e817f6a48de3564c6b2957687c5e7297c5a0 644 foo |
|
69 | f9b0e817f6a48de3564c6b2957687c5e7297c5a0 644 foo |
@@ -1,143 +1,143 b'' | |||||
1 | initial |
|
1 | initial | |
2 | $ hg init test-a |
|
2 | $ hg init test-a | |
3 | $ cd test-a |
|
3 | $ cd test-a | |
4 | $ cat >test.txt <<"EOF" |
|
4 | $ cat >test.txt <<"EOF" | |
5 | > 1 |
|
5 | > 1 | |
6 | > 2 |
|
6 | > 2 | |
7 | > 3 |
|
7 | > 3 | |
8 | > EOF |
|
8 | > EOF | |
9 | $ hg add test.txt |
|
9 | $ hg add test.txt | |
10 |
$ hg commit -m "Initial" |
|
10 | $ hg commit -m "Initial" | |
11 |
|
11 | |||
12 | clone |
|
12 | clone | |
13 | $ cd .. |
|
13 | $ cd .. | |
14 | $ hg clone test-a test-b |
|
14 | $ hg clone test-a test-b | |
15 | updating to branch default |
|
15 | updating to branch default | |
16 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
16 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
17 |
|
17 | |||
18 | change test-a |
|
18 | change test-a | |
19 | $ cd test-a |
|
19 | $ cd test-a | |
20 | $ cat >test.txt <<"EOF" |
|
20 | $ cat >test.txt <<"EOF" | |
21 | > one |
|
21 | > one | |
22 | > two |
|
22 | > two | |
23 | > three |
|
23 | > three | |
24 | > EOF |
|
24 | > EOF | |
25 |
$ hg commit -m "Numbers as words" |
|
25 | $ hg commit -m "Numbers as words" | |
26 |
|
26 | |||
27 | change test-b |
|
27 | change test-b | |
28 | $ cd ../test-b |
|
28 | $ cd ../test-b | |
29 | $ cat >test.txt <<"EOF" |
|
29 | $ cat >test.txt <<"EOF" | |
30 | > 1 |
|
30 | > 1 | |
31 | > 2.5 |
|
31 | > 2.5 | |
32 | > 3 |
|
32 | > 3 | |
33 | > EOF |
|
33 | > EOF | |
34 |
$ hg commit -m "2 -> 2.5" |
|
34 | $ hg commit -m "2 -> 2.5" | |
35 |
|
35 | |||
36 | now pull and merge from test-a |
|
36 | now pull and merge from test-a | |
37 | $ hg pull ../test-a |
|
37 | $ hg pull ../test-a | |
38 | pulling from ../test-a |
|
38 | pulling from ../test-a | |
39 | searching for changes |
|
39 | searching for changes | |
40 | adding changesets |
|
40 | adding changesets | |
41 | adding manifests |
|
41 | adding manifests | |
42 | adding file changes |
|
42 | adding file changes | |
43 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
43 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
44 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
44 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
45 | $ hg merge |
|
45 | $ hg merge | |
46 | merging test.txt |
|
46 | merging test.txt | |
47 | warning: conflicts during merge. |
|
47 | warning: conflicts during merge. | |
48 | merging test.txt failed! |
|
48 | merging test.txt failed! | |
49 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
49 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
50 | use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon |
|
50 | use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon | |
51 | resolve conflict |
|
51 | resolve conflict | |
52 | $ cat >test.txt <<"EOF" |
|
52 | $ cat >test.txt <<"EOF" | |
53 | > one |
|
53 | > one | |
54 | > two-point-five |
|
54 | > two-point-five | |
55 | > three |
|
55 | > three | |
56 | > EOF |
|
56 | > EOF | |
57 | $ rm -f *.orig |
|
57 | $ rm -f *.orig | |
58 | $ hg resolve -m test.txt |
|
58 | $ hg resolve -m test.txt | |
59 |
$ hg commit -m "Merge 1" |
|
59 | $ hg commit -m "Merge 1" | |
60 |
|
60 | |||
61 | change test-a again |
|
61 | change test-a again | |
62 | $ cd ../test-a |
|
62 | $ cd ../test-a | |
63 | $ cat >test.txt <<"EOF" |
|
63 | $ cat >test.txt <<"EOF" | |
64 | > one |
|
64 | > one | |
65 | > two-point-one |
|
65 | > two-point-one | |
66 | > three |
|
66 | > three | |
67 | > EOF |
|
67 | > EOF | |
68 |
$ hg commit -m "two -> two-point-one" |
|
68 | $ hg commit -m "two -> two-point-one" | |
69 |
|
69 | |||
70 | pull and merge from test-a again |
|
70 | pull and merge from test-a again | |
71 | $ cd ../test-b |
|
71 | $ cd ../test-b | |
72 | $ hg pull ../test-a |
|
72 | $ hg pull ../test-a | |
73 | pulling from ../test-a |
|
73 | pulling from ../test-a | |
74 | searching for changes |
|
74 | searching for changes | |
75 | adding changesets |
|
75 | adding changesets | |
76 | adding manifests |
|
76 | adding manifests | |
77 | adding file changes |
|
77 | adding file changes | |
78 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
78 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
79 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
79 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
80 | $ hg merge --debug |
|
80 | $ hg merge --debug | |
81 | searching for copies back to rev 1 |
|
81 | searching for copies back to rev 1 | |
82 | resolving manifests |
|
82 | resolving manifests | |
83 | overwrite None partial False |
|
83 | overwrite None partial False | |
84 | ancestor faaea63e63a9 local 451c744aabcc+ remote a070d41e8360 |
|
84 | ancestor 96b70246a118 local 50c3a7e29886+ remote 40d11a4173a8 | |
85 | test.txt: versions differ -> m |
|
85 | test.txt: versions differ -> m | |
86 | preserving test.txt for resolve of test.txt |
|
86 | preserving test.txt for resolve of test.txt | |
87 | updating: test.txt 1/1 files (100.00%) |
|
87 | updating: test.txt 1/1 files (100.00%) | |
88 | picked tool 'internal:merge' for test.txt (binary False symlink False) |
|
88 | picked tool 'internal:merge' for test.txt (binary False symlink False) | |
89 | merging test.txt |
|
89 | merging test.txt | |
90 |
my test.txt@ |
|
90 | my test.txt@50c3a7e29886+ other test.txt@40d11a4173a8 ancestor test.txt@96b70246a118 | |
91 | warning: conflicts during merge. |
|
91 | warning: conflicts during merge. | |
92 | merging test.txt failed! |
|
92 | merging test.txt failed! | |
93 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
93 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
94 | use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon |
|
94 | use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon | |
95 |
|
95 | |||
96 | $ cat test.txt |
|
96 | $ cat test.txt | |
97 | one |
|
97 | one | |
98 | <<<<<<< local |
|
98 | <<<<<<< local | |
99 | two-point-five |
|
99 | two-point-five | |
100 | ======= |
|
100 | ======= | |
101 | two-point-one |
|
101 | two-point-one | |
102 | >>>>>>> other |
|
102 | >>>>>>> other | |
103 | three |
|
103 | three | |
104 |
|
104 | |||
105 | $ hg debugindex .hg/store/data/test.txt.i |
|
105 | $ hg debugindex .hg/store/data/test.txt.i | |
106 | rev offset length base linkrev nodeid p1 p2 |
|
106 | rev offset length base linkrev nodeid p1 p2 | |
107 | 0 0 7 0 0 01365c4cca56 000000000000 000000000000 |
|
107 | 0 0 7 0 0 01365c4cca56 000000000000 000000000000 | |
108 | 1 7 9 1 1 7b013192566a 01365c4cca56 000000000000 |
|
108 | 1 7 9 1 1 7b013192566a 01365c4cca56 000000000000 | |
109 | 2 16 15 2 2 8fe46a3eb557 01365c4cca56 000000000000 |
|
109 | 2 16 15 2 2 8fe46a3eb557 01365c4cca56 000000000000 | |
110 | 3 31 27 2 3 fc3148072371 7b013192566a 8fe46a3eb557 |
|
110 | 3 31 27 2 3 fc3148072371 7b013192566a 8fe46a3eb557 | |
111 | 4 58 25 4 4 d40249267ae3 8fe46a3eb557 000000000000 |
|
111 | 4 58 25 4 4 d40249267ae3 8fe46a3eb557 000000000000 | |
112 |
|
112 | |||
113 | $ hg log |
|
113 | $ hg log | |
114 |
changeset: 4: |
|
114 | changeset: 4:40d11a4173a8 | |
115 | tag: tip |
|
115 | tag: tip | |
116 |
parent: 2: |
|
116 | parent: 2:96b70246a118 | |
117 | user: test |
|
117 | user: test | |
118 |
date: |
|
118 | date: Thu Jan 01 00:00:00 1970 +0000 | |
119 | summary: two -> two-point-one |
|
119 | summary: two -> two-point-one | |
120 |
|
120 | |||
121 |
changeset: 3: |
|
121 | changeset: 3:50c3a7e29886 | |
122 |
parent: 1: |
|
122 | parent: 1:d1e159716d41 | |
123 |
parent: 2: |
|
123 | parent: 2:96b70246a118 | |
124 | user: test |
|
124 | user: test | |
125 |
date: |
|
125 | date: Thu Jan 01 00:00:00 1970 +0000 | |
126 | summary: Merge 1 |
|
126 | summary: Merge 1 | |
127 |
|
127 | |||
128 |
changeset: 2: |
|
128 | changeset: 2:96b70246a118 | |
129 |
parent: 0: |
|
129 | parent: 0:b1832b9d912a | |
130 | user: test |
|
130 | user: test | |
131 |
date: |
|
131 | date: Thu Jan 01 00:00:00 1970 +0000 | |
132 | summary: Numbers as words |
|
132 | summary: Numbers as words | |
133 |
|
133 | |||
134 |
changeset: 1: |
|
134 | changeset: 1:d1e159716d41 | |
135 | user: test |
|
135 | user: test | |
136 |
date: |
|
136 | date: Thu Jan 01 00:00:00 1970 +0000 | |
137 | summary: 2 -> 2.5 |
|
137 | summary: 2 -> 2.5 | |
138 |
|
138 | |||
139 |
changeset: 0: |
|
139 | changeset: 0:b1832b9d912a | |
140 | user: test |
|
140 | user: test | |
141 |
date: |
|
141 | date: Thu Jan 01 00:00:00 1970 +0000 | |
142 | summary: Initial |
|
142 | summary: Initial | |
143 |
|
143 |
@@ -1,124 +1,124 b'' | |||||
1 | $ branches=.hg/branchheads.cache |
|
1 | $ branches=.hg/branchheads.cache | |
2 | $ echo '[extensions]' >> $HGRCPATH |
|
2 | $ echo '[extensions]' >> $HGRCPATH | |
3 | $ echo 'mq =' >> $HGRCPATH |
|
3 | $ echo 'mq =' >> $HGRCPATH | |
4 |
|
4 | |||
5 | $ show_branch_cache() |
|
5 | $ show_branch_cache() | |
6 | > { |
|
6 | > { | |
7 | > # force cache (re)generation |
|
7 | > # force cache (re)generation | |
8 | > hg log -r does-not-exist 2> /dev/null |
|
8 | > hg log -r does-not-exist 2> /dev/null | |
9 | > hg log -r tip --template 'tip: {rev}\n' |
|
9 | > hg log -r tip --template 'tip: {rev}\n' | |
10 | > if [ -f $branches ]; then |
|
10 | > if [ -f $branches ]; then | |
11 | > sort $branches |
|
11 | > sort $branches | |
12 | > else |
|
12 | > else | |
13 | > echo No branch cache |
|
13 | > echo No branch cache | |
14 | > fi |
|
14 | > fi | |
15 | > if [ "$1" = 1 ]; then |
|
15 | > if [ "$1" = 1 ]; then | |
16 | > for b in foo bar; do |
|
16 | > for b in foo bar; do | |
17 | > hg log -r $b --template "branch $b: "'{rev}\n' |
|
17 | > hg log -r $b --template "branch $b: "'{rev}\n' | |
18 | > done |
|
18 | > done | |
19 | > fi |
|
19 | > fi | |
20 | > } |
|
20 | > } | |
21 |
|
21 | |||
22 | $ hg init a |
|
22 | $ hg init a | |
23 | $ cd a |
|
23 | $ cd a | |
24 | $ hg qinit -c |
|
24 | $ hg qinit -c | |
25 |
|
25 | |||
26 |
|
26 | |||
27 | mq patch on an empty repo |
|
27 | mq patch on an empty repo | |
28 |
|
28 | |||
29 | $ hg qnew p1 |
|
29 | $ hg qnew p1 | |
30 | $ show_branch_cache |
|
30 | $ show_branch_cache | |
31 | tip: 0 |
|
31 | tip: 0 | |
32 | No branch cache |
|
32 | No branch cache | |
33 |
|
33 | |||
34 | $ echo > pfile |
|
34 | $ echo > pfile | |
35 | $ hg add pfile |
|
35 | $ hg add pfile | |
36 | $ hg qrefresh -m 'patch 1' |
|
36 | $ hg qrefresh -m 'patch 1' | |
37 | $ show_branch_cache |
|
37 | $ show_branch_cache | |
38 | tip: 0 |
|
38 | tip: 0 | |
39 | No branch cache |
|
39 | No branch cache | |
40 |
|
40 | |||
41 | some regular revisions |
|
41 | some regular revisions | |
42 |
|
42 | |||
43 | $ hg qpop |
|
43 | $ hg qpop | |
44 | popping p1 |
|
44 | popping p1 | |
45 | patch queue now empty |
|
45 | patch queue now empty | |
46 | $ echo foo > foo |
|
46 | $ echo foo > foo | |
47 | $ hg add foo |
|
47 | $ hg add foo | |
48 | $ echo foo > .hg/branch |
|
48 | $ echo foo > .hg/branch | |
49 |
$ hg ci -m 'branch foo' |
|
49 | $ hg ci -m 'branch foo' | |
50 |
|
50 | |||
51 | $ echo bar > bar |
|
51 | $ echo bar > bar | |
52 | $ hg add bar |
|
52 | $ hg add bar | |
53 | $ echo bar > .hg/branch |
|
53 | $ echo bar > .hg/branch | |
54 |
$ hg ci -m 'branch bar' |
|
54 | $ hg ci -m 'branch bar' | |
55 | $ show_branch_cache |
|
55 | $ show_branch_cache | |
56 | tip: 1 |
|
56 | tip: 1 | |
57 | 3f910abad313ff802d3a23a7529433872df9b3ae 1 |
|
57 | c229711f16da3d7591f89b1b8d963b79bda22714 1 | |
58 | 3f910abad313ff802d3a23a7529433872df9b3ae bar |
|
58 | c229711f16da3d7591f89b1b8d963b79bda22714 bar | |
59 | 9539f35bdc80732cc9a3f84e46508f1ed1ec8cff foo |
|
59 | dc25e3827021582e979f600811852e36cbe57341 foo | |
60 |
|
60 | |||
61 | add some mq patches |
|
61 | add some mq patches | |
62 |
|
62 | |||
63 | $ hg qpush |
|
63 | $ hg qpush | |
64 | applying p1 |
|
64 | applying p1 | |
65 | now at: p1 |
|
65 | now at: p1 | |
66 | $ show_branch_cache |
|
66 | $ show_branch_cache | |
67 | tip: 2 |
|
67 | tip: 2 | |
68 | 3f910abad313ff802d3a23a7529433872df9b3ae 1 |
|
68 | c229711f16da3d7591f89b1b8d963b79bda22714 1 | |
69 | 3f910abad313ff802d3a23a7529433872df9b3ae bar |
|
69 | c229711f16da3d7591f89b1b8d963b79bda22714 bar | |
70 | 9539f35bdc80732cc9a3f84e46508f1ed1ec8cff foo |
|
70 | dc25e3827021582e979f600811852e36cbe57341 foo | |
71 |
|
71 | |||
72 | $ hg qnew p2 |
|
72 | $ hg qnew p2 | |
73 | $ echo foo > .hg/branch |
|
73 | $ echo foo > .hg/branch | |
74 | $ echo foo2 >> foo |
|
74 | $ echo foo2 >> foo | |
75 | $ hg qrefresh -m 'patch 2' |
|
75 | $ hg qrefresh -m 'patch 2' | |
76 | $ show_branch_cache 1 |
|
76 | $ show_branch_cache 1 | |
77 | tip: 3 |
|
77 | tip: 3 | |
78 | 3f910abad313ff802d3a23a7529433872df9b3ae 1 |
|
78 | c229711f16da3d7591f89b1b8d963b79bda22714 1 | |
79 | 3f910abad313ff802d3a23a7529433872df9b3ae bar |
|
79 | c229711f16da3d7591f89b1b8d963b79bda22714 bar | |
80 | 9539f35bdc80732cc9a3f84e46508f1ed1ec8cff foo |
|
80 | dc25e3827021582e979f600811852e36cbe57341 foo | |
81 | branch foo: 3 |
|
81 | branch foo: 3 | |
82 | branch bar: 2 |
|
82 | branch bar: 2 | |
83 |
|
83 | |||
84 | removing the cache |
|
84 | removing the cache | |
85 |
|
85 | |||
86 | $ rm $branches |
|
86 | $ rm $branches | |
87 | $ show_branch_cache 1 |
|
87 | $ show_branch_cache 1 | |
88 | tip: 3 |
|
88 | tip: 3 | |
89 | 3f910abad313ff802d3a23a7529433872df9b3ae 1 |
|
89 | c229711f16da3d7591f89b1b8d963b79bda22714 1 | |
90 | 3f910abad313ff802d3a23a7529433872df9b3ae bar |
|
90 | c229711f16da3d7591f89b1b8d963b79bda22714 bar | |
91 | 9539f35bdc80732cc9a3f84e46508f1ed1ec8cff foo |
|
91 | dc25e3827021582e979f600811852e36cbe57341 foo | |
92 | branch foo: 3 |
|
92 | branch foo: 3 | |
93 | branch bar: 2 |
|
93 | branch bar: 2 | |
94 |
|
94 | |||
95 | importing rev 1 (the cache now ends in one of the patches) |
|
95 | importing rev 1 (the cache now ends in one of the patches) | |
96 |
|
96 | |||
97 | $ hg qimport -r 1 -n p0 |
|
97 | $ hg qimport -r 1 -n p0 | |
98 | $ show_branch_cache 1 |
|
98 | $ show_branch_cache 1 | |
99 | tip: 3 |
|
99 | tip: 3 | |
100 | 3f910abad313ff802d3a23a7529433872df9b3ae 1 |
|
100 | c229711f16da3d7591f89b1b8d963b79bda22714 1 | |
101 | 3f910abad313ff802d3a23a7529433872df9b3ae bar |
|
101 | c229711f16da3d7591f89b1b8d963b79bda22714 bar | |
102 | 9539f35bdc80732cc9a3f84e46508f1ed1ec8cff foo |
|
102 | dc25e3827021582e979f600811852e36cbe57341 foo | |
103 | branch foo: 3 |
|
103 | branch foo: 3 | |
104 | branch bar: 2 |
|
104 | branch bar: 2 | |
105 | $ hg log -r qbase --template 'qbase: {rev}\n' |
|
105 | $ hg log -r qbase --template 'qbase: {rev}\n' | |
106 | qbase: 1 |
|
106 | qbase: 1 | |
107 |
|
107 | |||
108 | detect an invalid cache |
|
108 | detect an invalid cache | |
109 |
|
109 | |||
110 | $ hg qpop -a |
|
110 | $ hg qpop -a | |
111 | popping p2 |
|
111 | popping p2 | |
112 | popping p1 |
|
112 | popping p1 | |
113 | popping p0 |
|
113 | popping p0 | |
114 | patch queue now empty |
|
114 | patch queue now empty | |
115 | $ hg qpush -a |
|
115 | $ hg qpush -a | |
116 | applying p0 |
|
116 | applying p0 | |
117 | applying p1 |
|
117 | applying p1 | |
118 | applying p2 |
|
118 | applying p2 | |
119 | now at: p2 |
|
119 | now at: p2 | |
120 | $ show_branch_cache |
|
120 | $ show_branch_cache | |
121 | tip: 3 |
|
121 | tip: 3 | |
122 | 9539f35bdc80732cc9a3f84e46508f1ed1ec8cff 0 |
|
122 | dc25e3827021582e979f600811852e36cbe57341 0 | |
123 | 9539f35bdc80732cc9a3f84e46508f1ed1ec8cff foo |
|
123 | dc25e3827021582e979f600811852e36cbe57341 foo | |
124 |
|
124 |
@@ -1,113 +1,113 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | branchcache=.hg/branchheads.cache |
|
3 | branchcache=.hg/branchheads.cache | |
4 |
|
4 | |||
5 | hg init t |
|
5 | hg init t | |
6 | cd t |
|
6 | cd t | |
7 | hg branches |
|
7 | hg branches | |
8 |
|
8 | |||
9 | echo foo > a |
|
9 | echo foo > a | |
10 | hg add a |
|
10 | hg add a | |
11 |
hg ci -m "initial" |
|
11 | hg ci -m "initial" | |
12 | hg branch foo |
|
12 | hg branch foo | |
13 | hg branch |
|
13 | hg branch | |
14 |
hg ci -m "add branch name" |
|
14 | hg ci -m "add branch name" | |
15 | hg branch bar |
|
15 | hg branch bar | |
16 |
hg ci -m "change branch name" |
|
16 | hg ci -m "change branch name" | |
17 | echo % branch shadowing |
|
17 | echo % branch shadowing | |
18 | hg branch default |
|
18 | hg branch default | |
19 | hg branch -f default |
|
19 | hg branch -f default | |
20 |
hg ci -m "clear branch name" |
|
20 | hg ci -m "clear branch name" | |
21 |
|
21 | |||
22 | echo % there should be only one default branch head |
|
22 | echo % there should be only one default branch head | |
23 | hg heads . |
|
23 | hg heads . | |
24 |
|
24 | |||
25 | hg co foo |
|
25 | hg co foo | |
26 | hg branch |
|
26 | hg branch | |
27 | echo bleah > a |
|
27 | echo bleah > a | |
28 |
hg ci -m "modify a branch" |
|
28 | hg ci -m "modify a branch" | |
29 |
|
29 | |||
30 | hg merge default |
|
30 | hg merge default | |
31 | hg branch |
|
31 | hg branch | |
32 |
hg ci -m "merge" |
|
32 | hg ci -m "merge" | |
33 | hg log |
|
33 | hg log | |
34 |
|
34 | |||
35 | hg branches |
|
35 | hg branches | |
36 | hg branches -q |
|
36 | hg branches -q | |
37 |
|
37 | |||
38 | echo % test for invalid branch cache |
|
38 | echo % test for invalid branch cache | |
39 | hg rollback |
|
39 | hg rollback | |
40 | cp $branchcache .hg/bc-invalid |
|
40 | cp $branchcache .hg/bc-invalid | |
41 | hg log -r foo |
|
41 | hg log -r foo | |
42 | cp .hg/bc-invalid $branchcache |
|
42 | cp .hg/bc-invalid $branchcache | |
43 | hg --debug log -r foo |
|
43 | hg --debug log -r foo | |
44 | rm $branchcache |
|
44 | rm $branchcache | |
45 | echo corrupted > $branchcache |
|
45 | echo corrupted > $branchcache | |
46 | hg log -qr foo |
|
46 | hg log -qr foo | |
47 | cat $branchcache |
|
47 | cat $branchcache | |
48 |
|
48 | |||
49 | echo % push should update the branch cache |
|
49 | echo % push should update the branch cache | |
50 | hg init ../target |
|
50 | hg init ../target | |
51 | echo % pushing just rev 0 |
|
51 | echo % pushing just rev 0 | |
52 | hg push -qr 0 ../target |
|
52 | hg push -qr 0 ../target | |
53 | cat ../target/$branchcache |
|
53 | cat ../target/$branchcache | |
54 | echo % pushing everything |
|
54 | echo % pushing everything | |
55 | hg push -qf ../target |
|
55 | hg push -qf ../target | |
56 | cat ../target/$branchcache |
|
56 | cat ../target/$branchcache | |
57 |
|
57 | |||
58 | echo % update with no arguments: tipmost revision of the current branch |
|
58 | echo % update with no arguments: tipmost revision of the current branch | |
59 | hg up -q -C 0 |
|
59 | hg up -q -C 0 | |
60 | hg up -q |
|
60 | hg up -q | |
61 | hg id |
|
61 | hg id | |
62 | hg up -q 1 |
|
62 | hg up -q 1 | |
63 | hg up -q |
|
63 | hg up -q | |
64 | hg id |
|
64 | hg id | |
65 | hg branch foobar |
|
65 | hg branch foobar | |
66 | hg up |
|
66 | hg up | |
67 |
|
67 | |||
68 | echo % fastforward merge |
|
68 | echo % fastforward merge | |
69 | hg branch ff |
|
69 | hg branch ff | |
70 | echo ff > ff |
|
70 | echo ff > ff | |
71 |
hg ci -Am'fast forward' |
|
71 | hg ci -Am'fast forward' | |
72 | hg up foo |
|
72 | hg up foo | |
73 | hg merge ff |
|
73 | hg merge ff | |
74 | hg branch |
|
74 | hg branch | |
75 |
hg commit -m'Merge ff into foo' |
|
75 | hg commit -m'Merge ff into foo' | |
76 | hg parents |
|
76 | hg parents | |
77 | hg manifest |
|
77 | hg manifest | |
78 |
|
78 | |||
79 | echo % test merging, add 3 default heads and one test head |
|
79 | echo % test merging, add 3 default heads and one test head | |
80 | cd .. |
|
80 | cd .. | |
81 | hg init merges |
|
81 | hg init merges | |
82 | cd merges |
|
82 | cd merges | |
83 | echo a > a |
|
83 | echo a > a | |
84 | hg ci -Ama |
|
84 | hg ci -Ama | |
85 |
|
85 | |||
86 | echo b > b |
|
86 | echo b > b | |
87 | hg ci -Amb |
|
87 | hg ci -Amb | |
88 |
|
88 | |||
89 | hg up 0 |
|
89 | hg up 0 | |
90 | echo c > c |
|
90 | echo c > c | |
91 | hg ci -Amc |
|
91 | hg ci -Amc | |
92 |
|
92 | |||
93 | hg up 0 |
|
93 | hg up 0 | |
94 | echo d > d |
|
94 | echo d > d | |
95 | hg ci -Amd |
|
95 | hg ci -Amd | |
96 |
|
96 | |||
97 | hg up 0 |
|
97 | hg up 0 | |
98 | hg branch test |
|
98 | hg branch test | |
99 | echo e >> e |
|
99 | echo e >> e | |
100 | hg ci -Ame |
|
100 | hg ci -Ame | |
101 |
|
101 | |||
102 | hg log |
|
102 | hg log | |
103 |
|
103 | |||
104 | echo % implicit merge with test branch as parent |
|
104 | echo % implicit merge with test branch as parent | |
105 | hg merge |
|
105 | hg merge | |
106 | hg up -C default |
|
106 | hg up -C default | |
107 | echo % implicit merge with default branch as parent |
|
107 | echo % implicit merge with default branch as parent | |
108 | hg merge |
|
108 | hg merge | |
109 | echo % 3 branch heads, explicit merge required |
|
109 | echo % 3 branch heads, explicit merge required | |
110 | hg merge 2 |
|
110 | hg merge 2 | |
111 | hg ci -m merge |
|
111 | hg ci -m merge | |
112 | echo % 2 branch heads, implicit merge works |
|
112 | echo % 2 branch heads, implicit merge works | |
113 | hg merge |
|
113 | hg merge |
@@ -1,180 +1,180 b'' | |||||
1 | marked working directory as branch foo |
|
1 | marked working directory as branch foo | |
2 | foo |
|
2 | foo | |
3 | marked working directory as branch bar |
|
3 | marked working directory as branch bar | |
4 | % branch shadowing |
|
4 | % branch shadowing | |
5 | abort: a branch of the same name already exists (use 'hg update' to switch to it) |
|
5 | abort: a branch of the same name already exists (use 'hg update' to switch to it) | |
6 | marked working directory as branch default |
|
6 | marked working directory as branch default | |
7 | created new head |
|
7 | created new head | |
8 | % there should be only one default branch head |
|
8 | % there should be only one default branch head | |
9 |
changeset: 3: |
|
9 | changeset: 3:9d567d0b51f9 | |
10 | tag: tip |
|
10 | tag: tip | |
11 | user: test |
|
11 | user: test | |
12 |
date: |
|
12 | date: Thu Jan 01 00:00:00 1970 +0000 | |
13 | summary: clear branch name |
|
13 | summary: clear branch name | |
14 |
|
14 | |||
15 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
15 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
16 | foo |
|
16 | foo | |
17 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
17 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
18 | (branch merge, don't forget to commit) |
|
18 | (branch merge, don't forget to commit) | |
19 | foo |
|
19 | foo | |
20 |
changeset: 5: |
|
20 | changeset: 5:dc140083783b | |
21 | branch: foo |
|
21 | branch: foo | |
22 | tag: tip |
|
22 | tag: tip | |
23 |
parent: 4: |
|
23 | parent: 4:98d14f698afe | |
24 |
parent: 3: |
|
24 | parent: 3:9d567d0b51f9 | |
25 | user: test |
|
25 | user: test | |
26 |
date: |
|
26 | date: Thu Jan 01 00:00:00 1970 +0000 | |
27 | summary: merge |
|
27 | summary: merge | |
28 |
|
28 | |||
29 |
changeset: 4: |
|
29 | changeset: 4:98d14f698afe | |
30 | branch: foo |
|
30 | branch: foo | |
31 |
parent: 1: |
|
31 | parent: 1:0079f24813e2 | |
32 | user: test |
|
32 | user: test | |
33 |
date: |
|
33 | date: Thu Jan 01 00:00:00 1970 +0000 | |
34 | summary: modify a branch |
|
34 | summary: modify a branch | |
35 |
|
35 | |||
36 |
changeset: 3: |
|
36 | changeset: 3:9d567d0b51f9 | |
37 | user: test |
|
37 | user: test | |
38 |
date: |
|
38 | date: Thu Jan 01 00:00:00 1970 +0000 | |
39 | summary: clear branch name |
|
39 | summary: clear branch name | |
40 |
|
40 | |||
41 |
changeset: 2: |
|
41 | changeset: 2:ed2bbf4e0102 | |
42 | branch: bar |
|
42 | branch: bar | |
43 | user: test |
|
43 | user: test | |
44 |
date: |
|
44 | date: Thu Jan 01 00:00:00 1970 +0000 | |
45 | summary: change branch name |
|
45 | summary: change branch name | |
46 |
|
46 | |||
47 |
changeset: 1: |
|
47 | changeset: 1:0079f24813e2 | |
48 | branch: foo |
|
48 | branch: foo | |
49 | user: test |
|
49 | user: test | |
50 |
date: |
|
50 | date: Thu Jan 01 00:00:00 1970 +0000 | |
51 | summary: add branch name |
|
51 | summary: add branch name | |
52 |
|
52 | |||
53 |
changeset: 0: |
|
53 | changeset: 0:db01e8ea3388 | |
54 | user: test |
|
54 | user: test | |
55 |
date: |
|
55 | date: Thu Jan 01 00:00:00 1970 +0000 | |
56 | summary: initial |
|
56 | summary: initial | |
57 |
|
57 | |||
58 |
foo 5: |
|
58 | foo 5:dc140083783b | |
59 |
default 3: |
|
59 | default 3:9d567d0b51f9 (inactive) | |
60 |
bar 2: |
|
60 | bar 2:ed2bbf4e0102 (inactive) | |
61 | foo |
|
61 | foo | |
62 | default |
|
62 | default | |
63 | bar |
|
63 | bar | |
64 | % test for invalid branch cache |
|
64 | % test for invalid branch cache | |
65 | rolling back to revision 4 (undo commit) |
|
65 | rolling back to revision 4 (undo commit) | |
66 |
changeset: 4: |
|
66 | changeset: 4:98d14f698afe | |
67 | branch: foo |
|
67 | branch: foo | |
68 | tag: tip |
|
68 | tag: tip | |
69 |
parent: 1: |
|
69 | parent: 1:0079f24813e2 | |
70 | user: test |
|
70 | user: test | |
71 |
date: |
|
71 | date: Thu Jan 01 00:00:00 1970 +0000 | |
72 | summary: modify a branch |
|
72 | summary: modify a branch | |
73 |
|
73 | |||
74 | invalidating branch cache (tip differs) |
|
74 | invalidating branch cache (tip differs) | |
75 | changeset: 4:4909a3732169c0c20011c4f4b8fdff4e3d89b23f |
|
75 | changeset: 4:98d14f698afeaff8cb612dcf215ce95e639effc3 | |
76 | branch: foo |
|
76 | branch: foo | |
77 | tag: tip |
|
77 | tag: tip | |
78 | parent: 1:b699b1cec9c2966b3700de4fef0dc123cd754c31 |
|
78 | parent: 1:0079f24813e2b73a891577c243684c5066347bc8 | |
79 | parent: -1:0000000000000000000000000000000000000000 |
|
79 | parent: -1:0000000000000000000000000000000000000000 | |
80 | manifest: 4:d01b250baaa05909152f7ae07d7a649deea0df9a |
|
80 | manifest: 4:d01b250baaa05909152f7ae07d7a649deea0df9a | |
81 | user: test |
|
81 | user: test | |
82 |
date: |
|
82 | date: Thu Jan 01 00:00:00 1970 +0000 | |
83 | files: a |
|
83 | files: a | |
84 | extra: branch=foo |
|
84 | extra: branch=foo | |
85 | description: |
|
85 | description: | |
86 | modify a branch |
|
86 | modify a branch | |
87 |
|
87 | |||
88 |
|
88 | |||
89 | 4:4909a3732169 |
|
89 | 4:98d14f698afe | |
90 | 4909a3732169c0c20011c4f4b8fdff4e3d89b23f 4 |
|
90 | 98d14f698afeaff8cb612dcf215ce95e639effc3 4 | |
91 | bf1bc2f45e834c75404d0ddab57d53beab56e2f8 default |
|
91 | 9d567d0b51f9e2068b054e1948e1a927f99b5874 default | |
92 | 4909a3732169c0c20011c4f4b8fdff4e3d89b23f foo |
|
92 | 98d14f698afeaff8cb612dcf215ce95e639effc3 foo | |
93 | 67ec16bde7f1575d523313b9bca000f6a6f12dca bar |
|
93 | ed2bbf4e01029020711be82ca905283e883f0e11 bar | |
94 | % push should update the branch cache |
|
94 | % push should update the branch cache | |
95 | % pushing just rev 0 |
|
95 | % pushing just rev 0 | |
96 | be8523e69bf892e25817fc97187516b3c0804ae4 0 |
|
96 | db01e8ea3388fd3c7c94e1436ea2bd6a53d581c5 0 | |
97 | be8523e69bf892e25817fc97187516b3c0804ae4 default |
|
97 | db01e8ea3388fd3c7c94e1436ea2bd6a53d581c5 default | |
98 | % pushing everything |
|
98 | % pushing everything | |
99 | 4909a3732169c0c20011c4f4b8fdff4e3d89b23f 4 |
|
99 | 98d14f698afeaff8cb612dcf215ce95e639effc3 4 | |
100 | bf1bc2f45e834c75404d0ddab57d53beab56e2f8 default |
|
100 | 9d567d0b51f9e2068b054e1948e1a927f99b5874 default | |
101 | 4909a3732169c0c20011c4f4b8fdff4e3d89b23f foo |
|
101 | 98d14f698afeaff8cb612dcf215ce95e639effc3 foo | |
102 | 67ec16bde7f1575d523313b9bca000f6a6f12dca bar |
|
102 | ed2bbf4e01029020711be82ca905283e883f0e11 bar | |
103 | % update with no arguments: tipmost revision of the current branch |
|
103 | % update with no arguments: tipmost revision of the current branch | |
104 | bf1bc2f45e83 |
|
104 | 9d567d0b51f9 | |
105 | 4909a3732169 (foo) tip |
|
105 | 98d14f698afe (foo) tip | |
106 | marked working directory as branch foobar |
|
106 | marked working directory as branch foobar | |
107 | abort: branch foobar not found |
|
107 | abort: branch foobar not found | |
108 | % fastforward merge |
|
108 | % fastforward merge | |
109 | marked working directory as branch ff |
|
109 | marked working directory as branch ff | |
110 | adding ff |
|
110 | adding ff | |
111 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
111 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
112 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
112 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
113 | (branch merge, don't forget to commit) |
|
113 | (branch merge, don't forget to commit) | |
114 | foo |
|
114 | foo | |
115 |
changeset: 6: |
|
115 | changeset: 6:917eb54e1b4b | |
116 | branch: foo |
|
116 | branch: foo | |
117 | tag: tip |
|
117 | tag: tip | |
118 |
parent: 4: |
|
118 | parent: 4:98d14f698afe | |
119 |
parent: 5: |
|
119 | parent: 5:6683a60370cb | |
120 | user: test |
|
120 | user: test | |
121 |
date: |
|
121 | date: Thu Jan 01 00:00:00 1970 +0000 | |
122 | summary: Merge ff into foo |
|
122 | summary: Merge ff into foo | |
123 |
|
123 | |||
124 | a |
|
124 | a | |
125 | ff |
|
125 | ff | |
126 | % test merging, add 3 default heads and one test head |
|
126 | % test merging, add 3 default heads and one test head | |
127 | adding a |
|
127 | adding a | |
128 | adding b |
|
128 | adding b | |
129 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
129 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
130 | adding c |
|
130 | adding c | |
131 | created new head |
|
131 | created new head | |
132 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
132 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
133 | adding d |
|
133 | adding d | |
134 | created new head |
|
134 | created new head | |
135 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
135 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
136 | marked working directory as branch test |
|
136 | marked working directory as branch test | |
137 | adding e |
|
137 | adding e | |
138 | changeset: 4:3a1e01ed1df4 |
|
138 | changeset: 4:3a1e01ed1df4 | |
139 | branch: test |
|
139 | branch: test | |
140 | tag: tip |
|
140 | tag: tip | |
141 | parent: 0:cb9a9f314b8b |
|
141 | parent: 0:cb9a9f314b8b | |
142 | user: test |
|
142 | user: test | |
143 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
143 | date: Thu Jan 01 00:00:00 1970 +0000 | |
144 | summary: e |
|
144 | summary: e | |
145 |
|
145 | |||
146 | changeset: 3:980f7dc84c29 |
|
146 | changeset: 3:980f7dc84c29 | |
147 | parent: 0:cb9a9f314b8b |
|
147 | parent: 0:cb9a9f314b8b | |
148 | user: test |
|
148 | user: test | |
149 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
149 | date: Thu Jan 01 00:00:00 1970 +0000 | |
150 | summary: d |
|
150 | summary: d | |
151 |
|
151 | |||
152 | changeset: 2:d36c0562f908 |
|
152 | changeset: 2:d36c0562f908 | |
153 | parent: 0:cb9a9f314b8b |
|
153 | parent: 0:cb9a9f314b8b | |
154 | user: test |
|
154 | user: test | |
155 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
155 | date: Thu Jan 01 00:00:00 1970 +0000 | |
156 | summary: c |
|
156 | summary: c | |
157 |
|
157 | |||
158 | changeset: 1:d2ae7f538514 |
|
158 | changeset: 1:d2ae7f538514 | |
159 | user: test |
|
159 | user: test | |
160 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
160 | date: Thu Jan 01 00:00:00 1970 +0000 | |
161 | summary: b |
|
161 | summary: b | |
162 |
|
162 | |||
163 | changeset: 0:cb9a9f314b8b |
|
163 | changeset: 0:cb9a9f314b8b | |
164 | user: test |
|
164 | user: test | |
165 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
165 | date: Thu Jan 01 00:00:00 1970 +0000 | |
166 | summary: a |
|
166 | summary: a | |
167 |
|
167 | |||
168 | % implicit merge with test branch as parent |
|
168 | % implicit merge with test branch as parent | |
169 | abort: branch 'test' has one head - please merge with an explicit rev |
|
169 | abort: branch 'test' has one head - please merge with an explicit rev | |
170 | (run 'hg heads' to see all heads) |
|
170 | (run 'hg heads' to see all heads) | |
171 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
171 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
172 | % implicit merge with default branch as parent |
|
172 | % implicit merge with default branch as parent | |
173 | abort: branch 'default' has 3 heads - please merge with an explicit rev |
|
173 | abort: branch 'default' has 3 heads - please merge with an explicit rev | |
174 | (run 'hg heads .' to see heads) |
|
174 | (run 'hg heads .' to see heads) | |
175 | % 3 branch heads, explicit merge required |
|
175 | % 3 branch heads, explicit merge required | |
176 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
176 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
177 | (branch merge, don't forget to commit) |
|
177 | (branch merge, don't forget to commit) | |
178 | % 2 branch heads, implicit merge works |
|
178 | % 2 branch heads, implicit merge works | |
179 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
179 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
180 | (branch merge, don't forget to commit) |
|
180 | (branch merge, don't forget to commit) |
@@ -1,52 +1,52 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 | # |
|
2 | # | |
3 | # revlog.parseindex must be able to parse the index file even if |
|
3 | # revlog.parseindex must be able to parse the index file even if | |
4 | # an index entry is split between two 64k blocks. The ideal test |
|
4 | # an index entry is split between two 64k blocks. The ideal test | |
5 | # would be to create an index file with inline data where |
|
5 | # would be to create an index file with inline data where | |
6 | # 64k < size < 64k + 64 (64k is the size of the read buffer, 64 is |
|
6 | # 64k < size < 64k + 64 (64k is the size of the read buffer, 64 is | |
7 | # the size of an index entry) and with an index entry starting right |
|
7 | # the size of an index entry) and with an index entry starting right | |
8 | # before the 64k block boundary, and try to read it. |
|
8 | # before the 64k block boundary, and try to read it. | |
9 | # |
|
9 | # | |
10 | # We approximate that by reducing the read buffer to 1 byte. |
|
10 | # We approximate that by reducing the read buffer to 1 byte. | |
11 | # |
|
11 | # | |
12 |
|
12 | |||
13 | hg init a |
|
13 | hg init a | |
14 | cd a |
|
14 | cd a | |
15 | echo abc > foo |
|
15 | echo abc > foo | |
16 | hg add foo |
|
16 | hg add foo | |
17 |
hg commit -m 'add foo' |
|
17 | hg commit -m 'add foo' | |
18 |
|
18 | |||
19 | echo >> foo |
|
19 | echo >> foo | |
20 |
hg commit -m 'change foo' |
|
20 | hg commit -m 'change foo' | |
21 | hg log -r 0: |
|
21 | hg log -r 0: | |
22 |
|
22 | |||
23 | cat >> test.py << EOF |
|
23 | cat >> test.py << EOF | |
24 | from mercurial import changelog, util |
|
24 | from mercurial import changelog, util | |
25 | from mercurial.node import * |
|
25 | from mercurial.node import * | |
26 |
|
26 | |||
27 | class singlebyteread(object): |
|
27 | class singlebyteread(object): | |
28 | def __init__(self, real): |
|
28 | def __init__(self, real): | |
29 | self.real = real |
|
29 | self.real = real | |
30 |
|
30 | |||
31 | def read(self, size=-1): |
|
31 | def read(self, size=-1): | |
32 | if size == 65536: |
|
32 | if size == 65536: | |
33 | size = 1 |
|
33 | size = 1 | |
34 | return self.real.read(size) |
|
34 | return self.real.read(size) | |
35 |
|
35 | |||
36 | def __getattr__(self, key): |
|
36 | def __getattr__(self, key): | |
37 | return getattr(self.real, key) |
|
37 | return getattr(self.real, key) | |
38 |
|
38 | |||
39 | def opener(*args): |
|
39 | def opener(*args): | |
40 | o = util.opener(*args) |
|
40 | o = util.opener(*args) | |
41 | def wrapper(*a): |
|
41 | def wrapper(*a): | |
42 | f = o(*a) |
|
42 | f = o(*a) | |
43 | return singlebyteread(f) |
|
43 | return singlebyteread(f) | |
44 | return wrapper |
|
44 | return wrapper | |
45 |
|
45 | |||
46 | cl = changelog.changelog(opener('.hg/store')) |
|
46 | cl = changelog.changelog(opener('.hg/store')) | |
47 | print len(cl), 'revisions:' |
|
47 | print len(cl), 'revisions:' | |
48 | for r in cl: |
|
48 | for r in cl: | |
49 | print short(cl.node(r)) |
|
49 | print short(cl.node(r)) | |
50 | EOF |
|
50 | EOF | |
51 |
|
51 | |||
52 | python test.py |
|
52 | python test.py |
@@ -1,14 +1,14 b'' | |||||
1 |
changeset: 0: |
|
1 | changeset: 0:7c31755bf9b5 | |
2 | user: test |
|
2 | user: test | |
3 |
date: |
|
3 | date: Thu Jan 01 00:00:00 1970 +0000 | |
4 | summary: add foo |
|
4 | summary: add foo | |
5 |
|
5 | |||
6 |
changeset: 1: |
|
6 | changeset: 1:26333235a41c | |
7 | tag: tip |
|
7 | tag: tip | |
8 | user: test |
|
8 | user: test | |
9 |
date: |
|
9 | date: Thu Jan 01 00:00:00 1970 +0000 | |
10 | summary: change foo |
|
10 | summary: change foo | |
11 |
|
11 | |||
12 | 2 revisions: |
|
12 | 2 revisions: | |
13 | 9c2cf2b35aa7 |
|
13 | 7c31755bf9b5 | |
14 | 3756a9556b89 |
|
14 | 26333235a41c |
@@ -1,37 +1,37 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | echo '% hg init t' |
|
3 | echo '% hg init t' | |
4 | hg init t |
|
4 | hg init t | |
5 | cd t |
|
5 | cd t | |
6 | echo foo > a |
|
6 | echo foo > a | |
7 | echo '% hg add a' |
|
7 | echo '% hg add a' | |
8 | hg add a |
|
8 | hg add a | |
9 | echo '% hg commit' |
|
9 | echo '% hg commit' | |
10 |
hg commit -m "1" |
|
10 | hg commit -m "1" | |
11 | echo '% hg verify' |
|
11 | echo '% hg verify' | |
12 | hg verify |
|
12 | hg verify | |
13 | chmod -r .hg/store/data/a.i |
|
13 | chmod -r .hg/store/data/a.i | |
14 | echo '% hg verify' |
|
14 | echo '% hg verify' | |
15 | hg verify 2>/dev/null || echo verify failed |
|
15 | hg verify 2>/dev/null || echo verify failed | |
16 | chmod +r .hg/store/data/a.i |
|
16 | chmod +r .hg/store/data/a.i | |
17 | echo '% hg verify' |
|
17 | echo '% hg verify' | |
18 | hg verify 2>/dev/null || echo verify failed |
|
18 | hg verify 2>/dev/null || echo verify failed | |
19 | chmod -w .hg/store/data/a.i |
|
19 | chmod -w .hg/store/data/a.i | |
20 | echo barber > a |
|
20 | echo barber > a | |
21 | echo '% hg commit' |
|
21 | echo '% hg commit' | |
22 |
hg commit -m "2" |
|
22 | hg commit -m "2" 2>/dev/null || echo commit failed | |
23 | chmod -w . |
|
23 | chmod -w . | |
24 | echo '% hg diff' |
|
24 | echo '% hg diff' | |
25 | hg diff --nodates |
|
25 | hg diff --nodates | |
26 | chmod +w . |
|
26 | chmod +w . | |
27 |
|
27 | |||
28 | chmod +w .hg/store/data/a.i |
|
28 | chmod +w .hg/store/data/a.i | |
29 | mkdir dir |
|
29 | mkdir dir | |
30 | touch dir/a |
|
30 | touch dir/a | |
31 | echo '% hg status' |
|
31 | echo '% hg status' | |
32 | hg status |
|
32 | hg status | |
33 | chmod -rx dir |
|
33 | chmod -rx dir | |
34 | echo '% hg status' |
|
34 | echo '% hg status' | |
35 | hg status |
|
35 | hg status | |
36 | # reenable perm to allow deletion |
|
36 | # reenable perm to allow deletion | |
37 | chmod +rx dir |
|
37 | chmod +rx dir |
@@ -1,36 +1,36 b'' | |||||
1 | % hg init t |
|
1 | % hg init t | |
2 | % hg add a |
|
2 | % hg add a | |
3 | % hg commit |
|
3 | % hg commit | |
4 | % hg verify |
|
4 | % hg verify | |
5 | checking changesets |
|
5 | checking changesets | |
6 | checking manifests |
|
6 | checking manifests | |
7 | crosschecking files in changesets and manifests |
|
7 | crosschecking files in changesets and manifests | |
8 | checking files |
|
8 | checking files | |
9 | 1 files, 1 changesets, 1 total revisions |
|
9 | 1 files, 1 changesets, 1 total revisions | |
10 | % hg verify |
|
10 | % hg verify | |
11 | checking changesets |
|
11 | checking changesets | |
12 | checking manifests |
|
12 | checking manifests | |
13 | crosschecking files in changesets and manifests |
|
13 | crosschecking files in changesets and manifests | |
14 | checking files |
|
14 | checking files | |
15 | verify failed |
|
15 | verify failed | |
16 | % hg verify |
|
16 | % hg verify | |
17 | checking changesets |
|
17 | checking changesets | |
18 | checking manifests |
|
18 | checking manifests | |
19 | crosschecking files in changesets and manifests |
|
19 | crosschecking files in changesets and manifests | |
20 | checking files |
|
20 | checking files | |
21 | 1 files, 1 changesets, 1 total revisions |
|
21 | 1 files, 1 changesets, 1 total revisions | |
22 | % hg commit |
|
22 | % hg commit | |
23 | commit failed |
|
23 | commit failed | |
24 | % hg diff |
|
24 | % hg diff | |
25 | diff -r c1fab96507ef a |
|
25 | diff -r 2a18120dc1c9 a | |
26 | --- a/a |
|
26 | --- a/a | |
27 | +++ b/a |
|
27 | +++ b/a | |
28 | @@ -1,1 +1,1 @@ |
|
28 | @@ -1,1 +1,1 @@ | |
29 | -foo |
|
29 | -foo | |
30 | +barber |
|
30 | +barber | |
31 | % hg status |
|
31 | % hg status | |
32 | M a |
|
32 | M a | |
33 | ? dir/a |
|
33 | ? dir/a | |
34 | % hg status |
|
34 | % hg status | |
35 | dir: Permission denied |
|
35 | dir: Permission denied | |
36 | M a |
|
36 | M a |
@@ -1,19 +1,19 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | mkdir a |
|
3 | mkdir a | |
4 | cd a |
|
4 | cd a | |
5 | hg init |
|
5 | hg init | |
6 | echo foo > b |
|
6 | echo foo > b | |
7 | hg add b |
|
7 | hg add b | |
8 |
hg ci -m "b" |
|
8 | hg ci -m "b" | |
9 |
|
9 | |||
10 | chmod -w .hg/store |
|
10 | chmod -w .hg/store | |
11 |
|
11 | |||
12 | cd .. |
|
12 | cd .. | |
13 |
|
13 | |||
14 | hg clone a b |
|
14 | hg clone a b | |
15 |
|
15 | |||
16 | chmod +w a/.hg/store # let test clean up |
|
16 | chmod +w a/.hg/store # let test clean up | |
17 |
|
17 | |||
18 | cd b |
|
18 | cd b | |
19 | hg verify |
|
19 | hg verify |
@@ -1,317 +1,317 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | echo "[extensions]" >> $HGRCPATH |
|
3 | echo "[extensions]" >> $HGRCPATH | |
4 | echo "graphlog=" >> $HGRCPATH |
|
4 | echo "graphlog=" >> $HGRCPATH | |
5 |
|
5 | |||
6 | mkdir a |
|
6 | mkdir a | |
7 | cd a |
|
7 | cd a | |
8 | hg init |
|
8 | hg init | |
9 | echo foo > t1 |
|
9 | echo foo > t1 | |
10 | hg add t1 |
|
10 | hg add t1 | |
11 |
hg commit -m "1" |
|
11 | hg commit -m "1" | |
12 |
|
12 | |||
13 | cd .. |
|
13 | cd .. | |
14 | hg clone a b |
|
14 | hg clone a b | |
15 |
|
15 | |||
16 | cd a |
|
16 | cd a | |
17 | echo foo > t2 |
|
17 | echo foo > t2 | |
18 | hg add t2 |
|
18 | hg add t2 | |
19 |
hg commit -m "2" |
|
19 | hg commit -m "2" | |
20 |
|
20 | |||
21 | cd ../b |
|
21 | cd ../b | |
22 | echo foo > t3 |
|
22 | echo foo > t3 | |
23 | hg add t3 |
|
23 | hg add t3 | |
24 |
hg commit -m "3" |
|
24 | hg commit -m "3" | |
25 |
|
25 | |||
26 | hg push ../a |
|
26 | hg push ../a | |
27 | hg pull ../a |
|
27 | hg pull ../a | |
28 | hg push ../a |
|
28 | hg push ../a | |
29 | hg merge |
|
29 | hg merge | |
30 |
hg commit -m "4" |
|
30 | hg commit -m "4" | |
31 | hg push ../a |
|
31 | hg push ../a | |
32 | cd .. |
|
32 | cd .. | |
33 |
|
33 | |||
34 | hg init c |
|
34 | hg init c | |
35 | cd c |
|
35 | cd c | |
36 | for i in 0 1 2; do |
|
36 | for i in 0 1 2; do | |
37 | echo $i >> foo |
|
37 | echo $i >> foo | |
38 |
hg ci -Am $i |
|
38 | hg ci -Am $i | |
39 | done |
|
39 | done | |
40 | cd .. |
|
40 | cd .. | |
41 |
|
41 | |||
42 | hg clone c d |
|
42 | hg clone c d | |
43 | cd d |
|
43 | cd d | |
44 | for i in 0 1; do |
|
44 | for i in 0 1; do | |
45 | hg co -C $i |
|
45 | hg co -C $i | |
46 | echo d-$i >> foo |
|
46 | echo d-$i >> foo | |
47 |
hg ci -m d-$i |
|
47 | hg ci -m d-$i | |
48 | done |
|
48 | done | |
49 |
|
49 | |||
50 | HGMERGE=true hg merge 3 |
|
50 | HGMERGE=true hg merge 3 | |
51 |
hg ci -m c-d |
|
51 | hg ci -m c-d | |
52 |
|
52 | |||
53 | hg push ../c; echo $? |
|
53 | hg push ../c; echo $? | |
54 | hg push -r 2 ../c; echo $? |
|
54 | hg push -r 2 ../c; echo $? | |
55 | hg push -r 3 ../c; echo $? |
|
55 | hg push -r 3 ../c; echo $? | |
56 | hg push -r 3 -r 4 ../c; echo $? |
|
56 | hg push -r 3 -r 4 ../c; echo $? | |
57 | hg push -f -r 3 -r 4 ../c; echo $? |
|
57 | hg push -f -r 3 -r 4 ../c; echo $? | |
58 | hg push -r 5 ../c; echo $? |
|
58 | hg push -r 5 ../c; echo $? | |
59 | hg in ../c |
|
59 | hg in ../c | |
60 |
|
60 | |||
61 | echo % issue 450 |
|
61 | echo % issue 450 | |
62 | hg init ../e |
|
62 | hg init ../e | |
63 | hg push -r 0 ../e ; echo $? |
|
63 | hg push -r 0 ../e ; echo $? | |
64 | hg push -r 1 ../e ; echo $? |
|
64 | hg push -r 1 ../e ; echo $? | |
65 |
|
65 | |||
66 | cd .. |
|
66 | cd .. | |
67 |
|
67 | |||
68 | echo % issue 736 |
|
68 | echo % issue 736 | |
69 | hg init f |
|
69 | hg init f | |
70 | cd f |
|
70 | cd f | |
71 | hg -q branch a |
|
71 | hg -q branch a | |
72 | echo 0 > foo |
|
72 | echo 0 > foo | |
73 |
hg -q ci - |
|
73 | hg -q ci -Am 0 | |
74 | echo 1 > foo |
|
74 | echo 1 > foo | |
75 |
hg -q ci - |
|
75 | hg -q ci -m 1 | |
76 | hg -q up 0 |
|
76 | hg -q up 0 | |
77 | echo 2 > foo |
|
77 | echo 2 > foo | |
78 |
hg -q ci - |
|
78 | hg -q ci -m 2 | |
79 | hg -q up 0 |
|
79 | hg -q up 0 | |
80 | hg -q branch b |
|
80 | hg -q branch b | |
81 | echo 3 > foo |
|
81 | echo 3 > foo | |
82 |
hg -q ci - |
|
82 | hg -q ci -m 3 | |
83 | cd .. |
|
83 | cd .. | |
84 |
|
84 | |||
85 | hg -q clone f g |
|
85 | hg -q clone f g | |
86 | cd g |
|
86 | cd g | |
87 |
|
87 | |||
88 | echo % push on existing branch and new branch |
|
88 | echo % push on existing branch and new branch | |
89 | hg -q up 1 |
|
89 | hg -q up 1 | |
90 | echo 4 > foo |
|
90 | echo 4 > foo | |
91 |
hg -q ci - |
|
91 | hg -q ci -m 4 | |
92 | hg -q up 0 |
|
92 | hg -q up 0 | |
93 | echo 5 > foo |
|
93 | echo 5 > foo | |
94 | hg -q branch c |
|
94 | hg -q branch c | |
95 |
hg -q ci - |
|
95 | hg -q ci -m 5 | |
96 | hg push ../f; echo $? |
|
96 | hg push ../f; echo $? | |
97 | hg push -r 4 -r 5 ../f; echo $? |
|
97 | hg push -r 4 -r 5 ../f; echo $? | |
98 |
|
98 | |||
99 | echo % multiple new branches |
|
99 | echo % multiple new branches | |
100 | hg -q branch d |
|
100 | hg -q branch d | |
101 | echo 6 > foo |
|
101 | echo 6 > foo | |
102 |
hg -q ci - |
|
102 | hg -q ci -m 6 | |
103 | hg push ../f; echo $? |
|
103 | hg push ../f; echo $? | |
104 | hg push -r 4 -r 6 ../f; echo $? |
|
104 | hg push -r 4 -r 6 ../f; echo $? | |
105 | cd ../g |
|
105 | cd ../g | |
106 |
|
106 | |||
107 | echo % fail on multiple head push |
|
107 | echo % fail on multiple head push | |
108 | hg -q up 1 |
|
108 | hg -q up 1 | |
109 | echo 7 > foo |
|
109 | echo 7 > foo | |
110 |
hg -q ci - |
|
110 | hg -q ci -m 7 | |
111 | hg push -r 4 -r 7 ../f; echo $? |
|
111 | hg push -r 4 -r 7 ../f; echo $? | |
112 |
|
112 | |||
113 | echo % push replacement head on existing branches |
|
113 | echo % push replacement head on existing branches | |
114 | hg -q up 3 |
|
114 | hg -q up 3 | |
115 | echo 8 > foo |
|
115 | echo 8 > foo | |
116 |
hg -q ci - |
|
116 | hg -q ci -m 8 | |
117 | hg push -r 7 -r 8 ../f; echo $? |
|
117 | hg push -r 7 -r 8 ../f; echo $? | |
118 |
|
118 | |||
119 | echo % merge of branch a to other branch b followed by unrelated push on branch a |
|
119 | echo % merge of branch a to other branch b followed by unrelated push on branch a | |
120 | hg -q up 7 |
|
120 | hg -q up 7 | |
121 | HGMERGE=true hg -q merge 8 |
|
121 | HGMERGE=true hg -q merge 8 | |
122 |
hg -q ci - |
|
122 | hg -q ci -m 9 | |
123 | hg -q up 8 |
|
123 | hg -q up 8 | |
124 | echo 10 > foo |
|
124 | echo 10 > foo | |
125 |
hg -q ci - |
|
125 | hg -q ci -m 10 | |
126 | hg push -r 9 ../f; echo $? |
|
126 | hg push -r 9 ../f; echo $? | |
127 | hg push -r 10 ../f; echo $? |
|
127 | hg push -r 10 ../f; echo $? | |
128 |
|
128 | |||
129 | echo % cheating the counting algorithm |
|
129 | echo % cheating the counting algorithm | |
130 | hg -q up 9 |
|
130 | hg -q up 9 | |
131 | HGMERGE=true hg -q merge 2 |
|
131 | HGMERGE=true hg -q merge 2 | |
132 |
hg -q ci - |
|
132 | hg -q ci -m 11 | |
133 | hg -q up 1 |
|
133 | hg -q up 1 | |
134 | echo 12 > foo |
|
134 | echo 12 > foo | |
135 |
hg -q ci - |
|
135 | hg -q ci -m 12 | |
136 | hg push -r 11 -r 12 ../f; echo $? |
|
136 | hg push -r 11 -r 12 ../f; echo $? | |
137 |
|
137 | |||
138 | echo % failed push of new named branch |
|
138 | echo % failed push of new named branch | |
139 | echo 12 > foo |
|
139 | echo 12 > foo | |
140 |
hg -q ci - |
|
140 | hg -q ci -m 12a | |
141 | hg -q up 11 |
|
141 | hg -q up 11 | |
142 | echo 13 > foo |
|
142 | echo 13 > foo | |
143 | hg -q branch e |
|
143 | hg -q branch e | |
144 |
hg -q ci - |
|
144 | hg -q ci -m 13d | |
145 | hg push -r 12 -r 13 ../f; echo $? |
|
145 | hg push -r 12 -r 13 ../f; echo $? | |
146 |
|
146 | |||
147 | echo % using --new-branch to push new named branch |
|
147 | echo % using --new-branch to push new named branch | |
148 | hg push --new-branch -r 12 -r 13 ../f; echo $? |
|
148 | hg push --new-branch -r 12 -r 13 ../f; echo $? | |
149 |
|
149 | |||
150 | echo % checking prepush logic does not allow silently pushing multiple new heads |
|
150 | echo % checking prepush logic does not allow silently pushing multiple new heads | |
151 | cd .. |
|
151 | cd .. | |
152 | hg init h |
|
152 | hg init h | |
153 | echo init > h/init |
|
153 | echo init > h/init | |
154 | hg -R h ci -Am init |
|
154 | hg -R h ci -Am init | |
155 | echo a > h/a |
|
155 | echo a > h/a | |
156 | hg -R h ci -Am a |
|
156 | hg -R h ci -Am a | |
157 | hg clone h i |
|
157 | hg clone h i | |
158 | hg -R h up 0 |
|
158 | hg -R h up 0 | |
159 | echo b > h/b |
|
159 | echo b > h/b | |
160 | hg -R h ci -Am b |
|
160 | hg -R h ci -Am b | |
161 | hg -R i up 0 |
|
161 | hg -R i up 0 | |
162 | echo c > i/c |
|
162 | echo c > i/c | |
163 | hg -R i ci -Am c |
|
163 | hg -R i ci -Am c | |
164 | hg -R i push h |
|
164 | hg -R i push h | |
165 | echo |
|
165 | echo | |
166 |
|
166 | |||
167 | echo % check prepush logic with merged branches |
|
167 | echo % check prepush logic with merged branches | |
168 | hg init j |
|
168 | hg init j | |
169 | hg -R j branch a |
|
169 | hg -R j branch a | |
170 | echo init > j/foo |
|
170 | echo init > j/foo | |
171 | hg -R j ci -Am init |
|
171 | hg -R j ci -Am init | |
172 | hg clone j k |
|
172 | hg clone j k | |
173 | echo a1 > j/foo |
|
173 | echo a1 > j/foo | |
174 | hg -R j ci -m a1 |
|
174 | hg -R j ci -m a1 | |
175 | hg -R k branch b |
|
175 | hg -R k branch b | |
176 | echo b > k/foo |
|
176 | echo b > k/foo | |
177 | hg -R k ci -m b |
|
177 | hg -R k ci -m b | |
178 | hg -R k up 0 |
|
178 | hg -R k up 0 | |
179 | hg -R k merge b |
|
179 | hg -R k merge b | |
180 | hg -R k ci -m merge |
|
180 | hg -R k ci -m merge | |
181 | hg -R k push -r a j |
|
181 | hg -R k push -r a j | |
182 | echo |
|
182 | echo | |
183 |
|
183 | |||
184 | echo % prepush -r should not allow you to sneak in new heads |
|
184 | echo % prepush -r should not allow you to sneak in new heads | |
185 | hg init l |
|
185 | hg init l | |
186 | cd l |
|
186 | cd l | |
187 | echo a >> foo |
|
187 | echo a >> foo | |
188 | hg -q add foo |
|
188 | hg -q add foo | |
189 | hg -q branch a |
|
189 | hg -q branch a | |
190 |
hg -q ci - |
|
190 | hg -q ci -ma | |
191 | hg -q up null |
|
191 | hg -q up null | |
192 | echo a >> foo |
|
192 | echo a >> foo | |
193 | hg -q add foo |
|
193 | hg -q add foo | |
194 | hg -q branch b |
|
194 | hg -q branch b | |
195 |
hg -q ci - |
|
195 | hg -q ci -mb | |
196 | cd .. |
|
196 | cd .. | |
197 | hg -q clone l m -u a |
|
197 | hg -q clone l m -u a | |
198 | cd m |
|
198 | cd m | |
199 | hg -q merge b |
|
199 | hg -q merge b | |
200 |
hg -q ci - |
|
200 | hg -q ci -mmb | |
201 | hg -q up 0 |
|
201 | hg -q up 0 | |
202 | echo a >> foo |
|
202 | echo a >> foo | |
203 | hg -q ci -ma2 |
|
203 | hg -q ci -ma2 | |
204 | hg -q up 2 |
|
204 | hg -q up 2 | |
205 | echo a >> foo |
|
205 | echo a >> foo | |
206 | hg -q branch -f b |
|
206 | hg -q branch -f b | |
207 |
hg -q ci - |
|
207 | hg -q ci -mb2 | |
208 | hg -q merge 3 |
|
208 | hg -q merge 3 | |
209 |
hg -q ci - |
|
209 | hg -q ci -mma | |
210 | hg push ../l -b b |
|
210 | hg push ../l -b b | |
211 | cd .. |
|
211 | cd .. | |
212 |
|
212 | |||
213 | echo % check prepush with new branch head on former topo non-head |
|
213 | echo % check prepush with new branch head on former topo non-head | |
214 | hg init n |
|
214 | hg init n | |
215 | cd n |
|
215 | cd n | |
216 | hg branch A |
|
216 | hg branch A | |
217 | echo a >a |
|
217 | echo a >a | |
218 | hg ci -Ama |
|
218 | hg ci -Ama | |
219 | hg branch B |
|
219 | hg branch B | |
220 | echo b >b |
|
220 | echo b >b | |
221 | hg ci -Amb |
|
221 | hg ci -Amb | |
222 | # b is now branch head of B, and a topological head |
|
222 | # b is now branch head of B, and a topological head | |
223 | # a is now branch head of A, but not a topological head |
|
223 | # a is now branch head of A, but not a topological head | |
224 | hg clone . inner |
|
224 | hg clone . inner | |
225 | cd inner |
|
225 | cd inner | |
226 | hg up B |
|
226 | hg up B | |
227 | echo b1 >b1 |
|
227 | echo b1 >b1 | |
228 | hg ci -Amb1 |
|
228 | hg ci -Amb1 | |
229 | # in the clone b1 is now the head of B |
|
229 | # in the clone b1 is now the head of B | |
230 | cd .. |
|
230 | cd .. | |
231 | hg up 0 |
|
231 | hg up 0 | |
232 | echo a2 >a2 |
|
232 | echo a2 >a2 | |
233 | hg ci -Ama2 |
|
233 | hg ci -Ama2 | |
234 | # a2 is now the new branch head of A, and a new topological head |
|
234 | # a2 is now the new branch head of A, and a new topological head | |
235 | # it replaces a former inner branch head, so it should at most warn about A, not B |
|
235 | # it replaces a former inner branch head, so it should at most warn about A, not B | |
236 | echo %% glog of local |
|
236 | echo %% glog of local | |
237 | hg glog --template "{rev}: {branches} {desc}\n" |
|
237 | hg glog --template "{rev}: {branches} {desc}\n" | |
238 | echo %% glog of remote |
|
238 | echo %% glog of remote | |
239 | hg glog -R inner --template "{rev}: {branches} {desc}\n" |
|
239 | hg glog -R inner --template "{rev}: {branches} {desc}\n" | |
240 | echo %% outgoing |
|
240 | echo %% outgoing | |
241 | hg out inner --template "{rev}: {branches} {desc}\n" |
|
241 | hg out inner --template "{rev}: {branches} {desc}\n" | |
242 | hg push inner |
|
242 | hg push inner | |
243 | cd .. |
|
243 | cd .. | |
244 |
|
244 | |||
245 | echo % check prepush with new branch head on former topo head |
|
245 | echo % check prepush with new branch head on former topo head | |
246 | hg init o |
|
246 | hg init o | |
247 | cd o |
|
247 | cd o | |
248 | hg branch A |
|
248 | hg branch A | |
249 | echo a >a |
|
249 | echo a >a | |
250 | hg ci -Ama |
|
250 | hg ci -Ama | |
251 | hg branch B |
|
251 | hg branch B | |
252 | echo b >b |
|
252 | echo b >b | |
253 | hg ci -Amb |
|
253 | hg ci -Amb | |
254 | # b is now branch head of B, and a topological head |
|
254 | # b is now branch head of B, and a topological head | |
255 | hg up 0 |
|
255 | hg up 0 | |
256 | echo a1 >a1 |
|
256 | echo a1 >a1 | |
257 | hg ci -Ama1 |
|
257 | hg ci -Ama1 | |
258 | # a1 is now branch head of A, and a topological head |
|
258 | # a1 is now branch head of A, and a topological head | |
259 | hg clone . inner |
|
259 | hg clone . inner | |
260 | cd inner |
|
260 | cd inner | |
261 | hg up B |
|
261 | hg up B | |
262 | echo b1 >b1 |
|
262 | echo b1 >b1 | |
263 | hg ci -Amb1 |
|
263 | hg ci -Amb1 | |
264 | # in the clone b1 is now the head of B |
|
264 | # in the clone b1 is now the head of B | |
265 | cd .. |
|
265 | cd .. | |
266 | echo a2 >a2 |
|
266 | echo a2 >a2 | |
267 | hg ci -Ama2 |
|
267 | hg ci -Ama2 | |
268 | # a2 is now the new branch head of A, and a topological head |
|
268 | # a2 is now the new branch head of A, and a topological head | |
269 | # it replaces a former topological and branch head, so this should not warn |
|
269 | # it replaces a former topological and branch head, so this should not warn | |
270 | echo %% glog of local |
|
270 | echo %% glog of local | |
271 | hg glog --template "{rev}: {branches} {desc}\n" |
|
271 | hg glog --template "{rev}: {branches} {desc}\n" | |
272 | echo %% glog of remote |
|
272 | echo %% glog of remote | |
273 | hg glog -R inner --template "{rev}: {branches} {desc}\n" |
|
273 | hg glog -R inner --template "{rev}: {branches} {desc}\n" | |
274 | echo %% outgoing |
|
274 | echo %% outgoing | |
275 | hg out inner --template "{rev}: {branches} {desc}\n" |
|
275 | hg out inner --template "{rev}: {branches} {desc}\n" | |
276 | hg push inner |
|
276 | hg push inner | |
277 | cd .. |
|
277 | cd .. | |
278 |
|
278 | |||
279 | echo % check prepush with new branch head and new child of former branch head |
|
279 | echo % check prepush with new branch head and new child of former branch head | |
280 | echo % but child is on different branch |
|
280 | echo % but child is on different branch | |
281 | hg init p |
|
281 | hg init p | |
282 | cd p |
|
282 | cd p | |
283 | hg branch A |
|
283 | hg branch A | |
284 | echo a0 >a |
|
284 | echo a0 >a | |
285 | hg ci -Ama0 |
|
285 | hg ci -Ama0 | |
286 | echo a1 >a |
|
286 | echo a1 >a | |
287 | hg ci -ma1 |
|
287 | hg ci -ma1 | |
288 | hg up null |
|
288 | hg up null | |
289 | hg branch B |
|
289 | hg branch B | |
290 | echo b0 >b |
|
290 | echo b0 >b | |
291 | hg ci -Amb0 |
|
291 | hg ci -Amb0 | |
292 | echo b1 >b |
|
292 | echo b1 >b | |
293 | hg ci -mb1 |
|
293 | hg ci -mb1 | |
294 |
|
294 | |||
295 | hg clone . inner |
|
295 | hg clone . inner | |
296 |
|
296 | |||
297 | hg up A |
|
297 | hg up A | |
298 | hg branch -f B |
|
298 | hg branch -f B | |
299 | echo a3 >a |
|
299 | echo a3 >a | |
300 | hg ci -ma3 |
|
300 | hg ci -ma3 | |
301 | hg up 3 |
|
301 | hg up 3 | |
302 | hg branch -f A |
|
302 | hg branch -f A | |
303 | echo b3 >b |
|
303 | echo b3 >b | |
304 | hg ci -mb3 |
|
304 | hg ci -mb3 | |
305 |
|
305 | |||
306 | echo %% glog of local |
|
306 | echo %% glog of local | |
307 | hg glog --template "{rev}: {branches} {desc}\n" |
|
307 | hg glog --template "{rev}: {branches} {desc}\n" | |
308 | echo %% glog of remote |
|
308 | echo %% glog of remote | |
309 | hg glog -R inner --template "{rev}: {branches} {desc}\n" |
|
309 | hg glog -R inner --template "{rev}: {branches} {desc}\n" | |
310 | echo %% outgoing |
|
310 | echo %% outgoing | |
311 | hg out inner --template "{rev}: {branches} {desc}\n" |
|
311 | hg out inner --template "{rev}: {branches} {desc}\n" | |
312 | hg push inner |
|
312 | hg push inner | |
313 | hg push inner -r4 -r5 |
|
313 | hg push inner -r4 -r5 | |
314 | hg in inner |
|
314 | hg in inner | |
315 | cd .. |
|
315 | cd .. | |
316 |
|
316 | |||
317 | exit 0 |
|
317 | exit 0 |
@@ -1,13 +1,13 b'' | |||||
1 | test that 'hg commit' does not crash if the user removes a newly added file |
|
1 | test that 'hg commit' does not crash if the user removes a newly added file | |
2 |
|
2 | |||
3 | $ hg init |
|
3 | $ hg init | |
4 | $ echo This is file a1 > a |
|
4 | $ echo This is file a1 > a | |
5 | $ hg add a |
|
5 | $ hg add a | |
6 |
$ hg commit -m "commit #0" |
|
6 | $ hg commit -m "commit #0" | |
7 | $ touch b |
|
7 | $ touch b | |
8 | $ hg add b |
|
8 | $ hg add b | |
9 | $ rm b |
|
9 | $ rm b | |
10 |
$ hg commit -A -m"comment #1" |
|
10 | $ hg commit -A -m"comment #1" | |
11 | removing b |
|
11 | removing b | |
12 | nothing changed |
|
12 | nothing changed | |
13 | $ exit 0 |
|
13 | $ exit 0 |
@@ -1,599 +1,599 b'' | |||||
1 | $ hg init |
|
1 | $ hg init | |
2 | $ mkdir d1 d1/d11 d2 |
|
2 | $ mkdir d1 d1/d11 d2 | |
3 | $ echo d1/a > d1/a |
|
3 | $ echo d1/a > d1/a | |
4 | $ echo d1/ba > d1/ba |
|
4 | $ echo d1/ba > d1/ba | |
5 | $ echo d1/a1 > d1/d11/a1 |
|
5 | $ echo d1/a1 > d1/d11/a1 | |
6 | $ echo d1/b > d1/b |
|
6 | $ echo d1/b > d1/b | |
7 | $ echo d2/b > d2/b |
|
7 | $ echo d2/b > d2/b | |
8 | $ hg add d1/a d1/b d1/ba d1/d11/a1 d2/b |
|
8 | $ hg add d1/a d1/b d1/ba d1/d11/a1 d2/b | |
9 |
$ hg commit -m "1" |
|
9 | $ hg commit -m "1" | |
10 |
|
10 | |||
11 | rename a single file |
|
11 | rename a single file | |
12 |
|
12 | |||
13 | $ hg rename d1/d11/a1 d2/c |
|
13 | $ hg rename d1/d11/a1 d2/c | |
14 | $ hg sum |
|
14 | $ hg sum | |
15 |
parent: 0: |
|
15 | parent: 0:9b4b6e7b2c26 tip | |
16 | 1 |
|
16 | 1 | |
17 | branch: default |
|
17 | branch: default | |
18 | commit: 1 renamed |
|
18 | commit: 1 renamed | |
19 | update: (current) |
|
19 | update: (current) | |
20 | $ hg status -C |
|
20 | $ hg status -C | |
21 | A d2/c |
|
21 | A d2/c | |
22 | d1/d11/a1 |
|
22 | d1/d11/a1 | |
23 | R d1/d11/a1 |
|
23 | R d1/d11/a1 | |
24 | $ hg update -C |
|
24 | $ hg update -C | |
25 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
25 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
26 | $ rm d2/c |
|
26 | $ rm d2/c | |
27 |
|
27 | |||
28 | rename --after a single file |
|
28 | rename --after a single file | |
29 |
|
29 | |||
30 | $ mv d1/d11/a1 d2/c |
|
30 | $ mv d1/d11/a1 d2/c | |
31 | $ hg rename --after d1/d11/a1 d2/c |
|
31 | $ hg rename --after d1/d11/a1 d2/c | |
32 | $ hg status -C |
|
32 | $ hg status -C | |
33 | A d2/c |
|
33 | A d2/c | |
34 | d1/d11/a1 |
|
34 | d1/d11/a1 | |
35 | R d1/d11/a1 |
|
35 | R d1/d11/a1 | |
36 | $ hg update -C |
|
36 | $ hg update -C | |
37 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
37 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
38 | $ rm d2/c |
|
38 | $ rm d2/c | |
39 |
|
39 | |||
40 | rename --after a single file when src and tgt already tracked |
|
40 | rename --after a single file when src and tgt already tracked | |
41 |
|
41 | |||
42 | $ mv d1/d11/a1 d2/c |
|
42 | $ mv d1/d11/a1 d2/c | |
43 | $ hg addrem -s 0 |
|
43 | $ hg addrem -s 0 | |
44 | removing d1/d11/a1 |
|
44 | removing d1/d11/a1 | |
45 | adding d2/c |
|
45 | adding d2/c | |
46 | $ hg rename --after d1/d11/a1 d2/c |
|
46 | $ hg rename --after d1/d11/a1 d2/c | |
47 | $ hg status -C |
|
47 | $ hg status -C | |
48 | A d2/c |
|
48 | A d2/c | |
49 | d1/d11/a1 |
|
49 | d1/d11/a1 | |
50 | R d1/d11/a1 |
|
50 | R d1/d11/a1 | |
51 | $ hg update -C |
|
51 | $ hg update -C | |
52 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
52 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
53 | $ rm d2/c |
|
53 | $ rm d2/c | |
54 |
|
54 | |||
55 | rename --after a single file to a nonexistant target filename |
|
55 | rename --after a single file to a nonexistant target filename | |
56 |
|
56 | |||
57 | $ hg rename --after d1/a dummy |
|
57 | $ hg rename --after d1/a dummy | |
58 | d1/a: not recording move - dummy does not exist |
|
58 | d1/a: not recording move - dummy does not exist | |
59 |
|
59 | |||
60 | move a single file to an existing directory |
|
60 | move a single file to an existing directory | |
61 |
|
61 | |||
62 | $ hg rename d1/d11/a1 d2 |
|
62 | $ hg rename d1/d11/a1 d2 | |
63 | $ hg status -C |
|
63 | $ hg status -C | |
64 | A d2/a1 |
|
64 | A d2/a1 | |
65 | d1/d11/a1 |
|
65 | d1/d11/a1 | |
66 | R d1/d11/a1 |
|
66 | R d1/d11/a1 | |
67 | $ hg update -C |
|
67 | $ hg update -C | |
68 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
68 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
69 | $ rm d2/a1 |
|
69 | $ rm d2/a1 | |
70 |
|
70 | |||
71 | move --after a single file to an existing directory |
|
71 | move --after a single file to an existing directory | |
72 |
|
72 | |||
73 | $ mv d1/d11/a1 d2 |
|
73 | $ mv d1/d11/a1 d2 | |
74 | $ hg rename --after d1/d11/a1 d2 |
|
74 | $ hg rename --after d1/d11/a1 d2 | |
75 | $ hg status -C |
|
75 | $ hg status -C | |
76 | A d2/a1 |
|
76 | A d2/a1 | |
77 | d1/d11/a1 |
|
77 | d1/d11/a1 | |
78 | R d1/d11/a1 |
|
78 | R d1/d11/a1 | |
79 | $ hg update -C |
|
79 | $ hg update -C | |
80 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
80 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
81 | $ rm d2/a1 |
|
81 | $ rm d2/a1 | |
82 |
|
82 | |||
83 | rename a file using a relative path |
|
83 | rename a file using a relative path | |
84 |
|
84 | |||
85 | $ (cd d1/d11; hg rename ../../d2/b e) |
|
85 | $ (cd d1/d11; hg rename ../../d2/b e) | |
86 | $ hg status -C |
|
86 | $ hg status -C | |
87 | A d1/d11/e |
|
87 | A d1/d11/e | |
88 | d2/b |
|
88 | d2/b | |
89 | R d2/b |
|
89 | R d2/b | |
90 | $ hg update -C |
|
90 | $ hg update -C | |
91 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
91 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
92 | $ rm d1/d11/e |
|
92 | $ rm d1/d11/e | |
93 |
|
93 | |||
94 | rename --after a file using a relative path |
|
94 | rename --after a file using a relative path | |
95 |
|
95 | |||
96 | $ (cd d1/d11; mv ../../d2/b e; hg rename --after ../../d2/b e) |
|
96 | $ (cd d1/d11; mv ../../d2/b e; hg rename --after ../../d2/b e) | |
97 | $ hg status -C |
|
97 | $ hg status -C | |
98 | A d1/d11/e |
|
98 | A d1/d11/e | |
99 | d2/b |
|
99 | d2/b | |
100 | R d2/b |
|
100 | R d2/b | |
101 | $ hg update -C |
|
101 | $ hg update -C | |
102 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
102 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
103 | $ rm d1/d11/e |
|
103 | $ rm d1/d11/e | |
104 |
|
104 | |||
105 | rename directory d1 as d3 |
|
105 | rename directory d1 as d3 | |
106 |
|
106 | |||
107 | $ hg rename d1/ d3 |
|
107 | $ hg rename d1/ d3 | |
108 | moving d1/a to d3/a |
|
108 | moving d1/a to d3/a | |
109 | moving d1/b to d3/b |
|
109 | moving d1/b to d3/b | |
110 | moving d1/ba to d3/ba |
|
110 | moving d1/ba to d3/ba | |
111 | moving d1/d11/a1 to d3/d11/a1 |
|
111 | moving d1/d11/a1 to d3/d11/a1 | |
112 | $ hg status -C |
|
112 | $ hg status -C | |
113 | A d3/a |
|
113 | A d3/a | |
114 | d1/a |
|
114 | d1/a | |
115 | A d3/b |
|
115 | A d3/b | |
116 | d1/b |
|
116 | d1/b | |
117 | A d3/ba |
|
117 | A d3/ba | |
118 | d1/ba |
|
118 | d1/ba | |
119 | A d3/d11/a1 |
|
119 | A d3/d11/a1 | |
120 | d1/d11/a1 |
|
120 | d1/d11/a1 | |
121 | R d1/a |
|
121 | R d1/a | |
122 | R d1/b |
|
122 | R d1/b | |
123 | R d1/ba |
|
123 | R d1/ba | |
124 | R d1/d11/a1 |
|
124 | R d1/d11/a1 | |
125 | $ hg update -C |
|
125 | $ hg update -C | |
126 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
126 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
127 | $ rm -rf d3 |
|
127 | $ rm -rf d3 | |
128 |
|
128 | |||
129 | rename --after directory d1 as d3 |
|
129 | rename --after directory d1 as d3 | |
130 |
|
130 | |||
131 | $ mv d1 d3 |
|
131 | $ mv d1 d3 | |
132 | $ hg rename --after d1 d3 |
|
132 | $ hg rename --after d1 d3 | |
133 | moving d1/a to d3/a |
|
133 | moving d1/a to d3/a | |
134 | moving d1/b to d3/b |
|
134 | moving d1/b to d3/b | |
135 | moving d1/ba to d3/ba |
|
135 | moving d1/ba to d3/ba | |
136 | moving d1/d11/a1 to d3/d11/a1 |
|
136 | moving d1/d11/a1 to d3/d11/a1 | |
137 | $ hg status -C |
|
137 | $ hg status -C | |
138 | A d3/a |
|
138 | A d3/a | |
139 | d1/a |
|
139 | d1/a | |
140 | A d3/b |
|
140 | A d3/b | |
141 | d1/b |
|
141 | d1/b | |
142 | A d3/ba |
|
142 | A d3/ba | |
143 | d1/ba |
|
143 | d1/ba | |
144 | A d3/d11/a1 |
|
144 | A d3/d11/a1 | |
145 | d1/d11/a1 |
|
145 | d1/d11/a1 | |
146 | R d1/a |
|
146 | R d1/a | |
147 | R d1/b |
|
147 | R d1/b | |
148 | R d1/ba |
|
148 | R d1/ba | |
149 | R d1/d11/a1 |
|
149 | R d1/d11/a1 | |
150 | $ hg update -C |
|
150 | $ hg update -C | |
151 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
151 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
152 | $ rm -rf d3 |
|
152 | $ rm -rf d3 | |
153 |
|
153 | |||
154 | move a directory using a relative path |
|
154 | move a directory using a relative path | |
155 |
|
155 | |||
156 | $ (cd d2; mkdir d3; hg rename ../d1/d11 d3) |
|
156 | $ (cd d2; mkdir d3; hg rename ../d1/d11 d3) | |
157 | moving ../d1/d11/a1 to d3/d11/a1 |
|
157 | moving ../d1/d11/a1 to d3/d11/a1 | |
158 | $ hg status -C |
|
158 | $ hg status -C | |
159 | A d2/d3/d11/a1 |
|
159 | A d2/d3/d11/a1 | |
160 | d1/d11/a1 |
|
160 | d1/d11/a1 | |
161 | R d1/d11/a1 |
|
161 | R d1/d11/a1 | |
162 | $ hg update -C |
|
162 | $ hg update -C | |
163 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
163 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
164 | $ rm -rf d2/d3 |
|
164 | $ rm -rf d2/d3 | |
165 |
|
165 | |||
166 | move --after a directory using a relative path |
|
166 | move --after a directory using a relative path | |
167 |
|
167 | |||
168 | $ (cd d2; mkdir d3; mv ../d1/d11 d3; hg rename --after ../d1/d11 d3) |
|
168 | $ (cd d2; mkdir d3; mv ../d1/d11 d3; hg rename --after ../d1/d11 d3) | |
169 | moving ../d1/d11/a1 to d3/d11/a1 |
|
169 | moving ../d1/d11/a1 to d3/d11/a1 | |
170 | $ hg status -C |
|
170 | $ hg status -C | |
171 | A d2/d3/d11/a1 |
|
171 | A d2/d3/d11/a1 | |
172 | d1/d11/a1 |
|
172 | d1/d11/a1 | |
173 | R d1/d11/a1 |
|
173 | R d1/d11/a1 | |
174 | $ hg update -C |
|
174 | $ hg update -C | |
175 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
175 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
176 | $ rm -rf d2/d3 |
|
176 | $ rm -rf d2/d3 | |
177 |
|
177 | |||
178 | move directory d1/d11 to an existing directory d2 (removes empty d1) |
|
178 | move directory d1/d11 to an existing directory d2 (removes empty d1) | |
179 |
|
179 | |||
180 | $ hg rename d1/d11/ d2 |
|
180 | $ hg rename d1/d11/ d2 | |
181 | moving d1/d11/a1 to d2/d11/a1 |
|
181 | moving d1/d11/a1 to d2/d11/a1 | |
182 | $ hg status -C |
|
182 | $ hg status -C | |
183 | A d2/d11/a1 |
|
183 | A d2/d11/a1 | |
184 | d1/d11/a1 |
|
184 | d1/d11/a1 | |
185 | R d1/d11/a1 |
|
185 | R d1/d11/a1 | |
186 | $ hg update -C |
|
186 | $ hg update -C | |
187 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
187 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
188 | $ rm -rf d2/d11 |
|
188 | $ rm -rf d2/d11 | |
189 |
|
189 | |||
190 | move directories d1 and d2 to a new directory d3 |
|
190 | move directories d1 and d2 to a new directory d3 | |
191 |
|
191 | |||
192 | $ mkdir d3 |
|
192 | $ mkdir d3 | |
193 | $ hg rename d1 d2 d3 |
|
193 | $ hg rename d1 d2 d3 | |
194 | moving d1/a to d3/d1/a |
|
194 | moving d1/a to d3/d1/a | |
195 | moving d1/b to d3/d1/b |
|
195 | moving d1/b to d3/d1/b | |
196 | moving d1/ba to d3/d1/ba |
|
196 | moving d1/ba to d3/d1/ba | |
197 | moving d1/d11/a1 to d3/d1/d11/a1 |
|
197 | moving d1/d11/a1 to d3/d1/d11/a1 | |
198 | moving d2/b to d3/d2/b |
|
198 | moving d2/b to d3/d2/b | |
199 | $ hg status -C |
|
199 | $ hg status -C | |
200 | A d3/d1/a |
|
200 | A d3/d1/a | |
201 | d1/a |
|
201 | d1/a | |
202 | A d3/d1/b |
|
202 | A d3/d1/b | |
203 | d1/b |
|
203 | d1/b | |
204 | A d3/d1/ba |
|
204 | A d3/d1/ba | |
205 | d1/ba |
|
205 | d1/ba | |
206 | A d3/d1/d11/a1 |
|
206 | A d3/d1/d11/a1 | |
207 | d1/d11/a1 |
|
207 | d1/d11/a1 | |
208 | A d3/d2/b |
|
208 | A d3/d2/b | |
209 | d2/b |
|
209 | d2/b | |
210 | R d1/a |
|
210 | R d1/a | |
211 | R d1/b |
|
211 | R d1/b | |
212 | R d1/ba |
|
212 | R d1/ba | |
213 | R d1/d11/a1 |
|
213 | R d1/d11/a1 | |
214 | R d2/b |
|
214 | R d2/b | |
215 | $ hg update -C |
|
215 | $ hg update -C | |
216 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
216 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
217 | $ rm -rf d3 |
|
217 | $ rm -rf d3 | |
218 |
|
218 | |||
219 | move --after directories d1 and d2 to a new directory d3 |
|
219 | move --after directories d1 and d2 to a new directory d3 | |
220 |
|
220 | |||
221 | $ mkdir d3 |
|
221 | $ mkdir d3 | |
222 | $ mv d1 d2 d3 |
|
222 | $ mv d1 d2 d3 | |
223 | $ hg rename --after d1 d2 d3 |
|
223 | $ hg rename --after d1 d2 d3 | |
224 | moving d1/a to d3/d1/a |
|
224 | moving d1/a to d3/d1/a | |
225 | moving d1/b to d3/d1/b |
|
225 | moving d1/b to d3/d1/b | |
226 | moving d1/ba to d3/d1/ba |
|
226 | moving d1/ba to d3/d1/ba | |
227 | moving d1/d11/a1 to d3/d1/d11/a1 |
|
227 | moving d1/d11/a1 to d3/d1/d11/a1 | |
228 | moving d2/b to d3/d2/b |
|
228 | moving d2/b to d3/d2/b | |
229 | $ hg status -C |
|
229 | $ hg status -C | |
230 | A d3/d1/a |
|
230 | A d3/d1/a | |
231 | d1/a |
|
231 | d1/a | |
232 | A d3/d1/b |
|
232 | A d3/d1/b | |
233 | d1/b |
|
233 | d1/b | |
234 | A d3/d1/ba |
|
234 | A d3/d1/ba | |
235 | d1/ba |
|
235 | d1/ba | |
236 | A d3/d1/d11/a1 |
|
236 | A d3/d1/d11/a1 | |
237 | d1/d11/a1 |
|
237 | d1/d11/a1 | |
238 | A d3/d2/b |
|
238 | A d3/d2/b | |
239 | d2/b |
|
239 | d2/b | |
240 | R d1/a |
|
240 | R d1/a | |
241 | R d1/b |
|
241 | R d1/b | |
242 | R d1/ba |
|
242 | R d1/ba | |
243 | R d1/d11/a1 |
|
243 | R d1/d11/a1 | |
244 | R d2/b |
|
244 | R d2/b | |
245 | $ hg update -C |
|
245 | $ hg update -C | |
246 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
246 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
247 | $ rm -rf d3 |
|
247 | $ rm -rf d3 | |
248 |
|
248 | |||
249 | move everything under directory d1 to existing directory d2, do not |
|
249 | move everything under directory d1 to existing directory d2, do not | |
250 | overwrite existing files (d2/b) |
|
250 | overwrite existing files (d2/b) | |
251 |
|
251 | |||
252 | $ hg rename d1/* d2 |
|
252 | $ hg rename d1/* d2 | |
253 | d2/b: not overwriting - file exists |
|
253 | d2/b: not overwriting - file exists | |
254 | moving d1/d11/a1 to d2/d11/a1 |
|
254 | moving d1/d11/a1 to d2/d11/a1 | |
255 | $ hg status -C |
|
255 | $ hg status -C | |
256 | A d2/a |
|
256 | A d2/a | |
257 | d1/a |
|
257 | d1/a | |
258 | A d2/ba |
|
258 | A d2/ba | |
259 | d1/ba |
|
259 | d1/ba | |
260 | A d2/d11/a1 |
|
260 | A d2/d11/a1 | |
261 | d1/d11/a1 |
|
261 | d1/d11/a1 | |
262 | R d1/a |
|
262 | R d1/a | |
263 | R d1/ba |
|
263 | R d1/ba | |
264 | R d1/d11/a1 |
|
264 | R d1/d11/a1 | |
265 | $ diff -u d1/b d2/b |
|
265 | $ diff -u d1/b d2/b | |
266 | --- d1/b .* |
|
266 | --- d1/b .* | |
267 | \+\+\+ d2/b .* |
|
267 | \+\+\+ d2/b .* | |
268 | @@ -1 +1 @@ |
|
268 | @@ -1 +1 @@ | |
269 | -d1/b |
|
269 | -d1/b | |
270 | +d2/b |
|
270 | +d2/b | |
271 | $ hg update -C |
|
271 | $ hg update -C | |
272 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
272 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
273 | $ rm d2/a d2/ba d2/d11/a1 |
|
273 | $ rm d2/a d2/ba d2/d11/a1 | |
274 |
|
274 | |||
275 | attempt to move one file into a non-existent directory |
|
275 | attempt to move one file into a non-existent directory | |
276 |
|
276 | |||
277 | $ hg rename d1/a dx/ |
|
277 | $ hg rename d1/a dx/ | |
278 | abort: destination dx/ is not a directory |
|
278 | abort: destination dx/ is not a directory | |
279 | $ hg status -C |
|
279 | $ hg status -C | |
280 | $ hg update -C |
|
280 | $ hg update -C | |
281 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
281 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
282 |
|
282 | |||
283 | attempt to move potentially more than one file into a non-existent directory |
|
283 | attempt to move potentially more than one file into a non-existent directory | |
284 |
|
284 | |||
285 | $ hg rename 'glob:d1/**' dx |
|
285 | $ hg rename 'glob:d1/**' dx | |
286 | abort: with multiple sources, destination must be an existing directory |
|
286 | abort: with multiple sources, destination must be an existing directory | |
287 |
|
287 | |||
288 | move every file under d1 to d2/d21 (glob) |
|
288 | move every file under d1 to d2/d21 (glob) | |
289 |
|
289 | |||
290 | $ mkdir d2/d21 |
|
290 | $ mkdir d2/d21 | |
291 | $ hg rename 'glob:d1/**' d2/d21 |
|
291 | $ hg rename 'glob:d1/**' d2/d21 | |
292 | moving d1/a to d2/d21/a |
|
292 | moving d1/a to d2/d21/a | |
293 | moving d1/b to d2/d21/b |
|
293 | moving d1/b to d2/d21/b | |
294 | moving d1/ba to d2/d21/ba |
|
294 | moving d1/ba to d2/d21/ba | |
295 | moving d1/d11/a1 to d2/d21/a1 |
|
295 | moving d1/d11/a1 to d2/d21/a1 | |
296 | $ hg status -C |
|
296 | $ hg status -C | |
297 | A d2/d21/a |
|
297 | A d2/d21/a | |
298 | d1/a |
|
298 | d1/a | |
299 | A d2/d21/a1 |
|
299 | A d2/d21/a1 | |
300 | d1/d11/a1 |
|
300 | d1/d11/a1 | |
301 | A d2/d21/b |
|
301 | A d2/d21/b | |
302 | d1/b |
|
302 | d1/b | |
303 | A d2/d21/ba |
|
303 | A d2/d21/ba | |
304 | d1/ba |
|
304 | d1/ba | |
305 | R d1/a |
|
305 | R d1/a | |
306 | R d1/b |
|
306 | R d1/b | |
307 | R d1/ba |
|
307 | R d1/ba | |
308 | R d1/d11/a1 |
|
308 | R d1/d11/a1 | |
309 | $ hg update -C |
|
309 | $ hg update -C | |
310 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
310 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
311 | $ rm -rf d2/d21 |
|
311 | $ rm -rf d2/d21 | |
312 |
|
312 | |||
313 | move --after some files under d1 to d2/d21 (glob) |
|
313 | move --after some files under d1 to d2/d21 (glob) | |
314 |
|
314 | |||
315 | $ mkdir d2/d21 |
|
315 | $ mkdir d2/d21 | |
316 | $ mv d1/a d1/d11/a1 d2/d21 |
|
316 | $ mv d1/a d1/d11/a1 d2/d21 | |
317 | $ hg rename --after 'glob:d1/**' d2/d21 |
|
317 | $ hg rename --after 'glob:d1/**' d2/d21 | |
318 | moving d1/a to d2/d21/a |
|
318 | moving d1/a to d2/d21/a | |
319 | d1/b: not recording move - d2/d21/b does not exist |
|
319 | d1/b: not recording move - d2/d21/b does not exist | |
320 | d1/ba: not recording move - d2/d21/ba does not exist |
|
320 | d1/ba: not recording move - d2/d21/ba does not exist | |
321 | moving d1/d11/a1 to d2/d21/a1 |
|
321 | moving d1/d11/a1 to d2/d21/a1 | |
322 | $ hg status -C |
|
322 | $ hg status -C | |
323 | A d2/d21/a |
|
323 | A d2/d21/a | |
324 | d1/a |
|
324 | d1/a | |
325 | A d2/d21/a1 |
|
325 | A d2/d21/a1 | |
326 | d1/d11/a1 |
|
326 | d1/d11/a1 | |
327 | R d1/a |
|
327 | R d1/a | |
328 | R d1/d11/a1 |
|
328 | R d1/d11/a1 | |
329 | $ hg update -C |
|
329 | $ hg update -C | |
330 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
330 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
331 | $ rm -rf d2/d21 |
|
331 | $ rm -rf d2/d21 | |
332 |
|
332 | |||
333 | move every file under d1 starting with an 'a' to d2/d21 (regexp) |
|
333 | move every file under d1 starting with an 'a' to d2/d21 (regexp) | |
334 |
|
334 | |||
335 | $ mkdir d2/d21 |
|
335 | $ mkdir d2/d21 | |
336 | $ hg rename 're:d1/([^a][^/]*/)*a.*' d2/d21 |
|
336 | $ hg rename 're:d1/([^a][^/]*/)*a.*' d2/d21 | |
337 | moving d1/a to d2/d21/a |
|
337 | moving d1/a to d2/d21/a | |
338 | moving d1/d11/a1 to d2/d21/a1 |
|
338 | moving d1/d11/a1 to d2/d21/a1 | |
339 | $ hg status -C |
|
339 | $ hg status -C | |
340 | A d2/d21/a |
|
340 | A d2/d21/a | |
341 | d1/a |
|
341 | d1/a | |
342 | A d2/d21/a1 |
|
342 | A d2/d21/a1 | |
343 | d1/d11/a1 |
|
343 | d1/d11/a1 | |
344 | R d1/a |
|
344 | R d1/a | |
345 | R d1/d11/a1 |
|
345 | R d1/d11/a1 | |
346 | $ hg update -C |
|
346 | $ hg update -C | |
347 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
347 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
348 | $ rm -rf d2/d21 |
|
348 | $ rm -rf d2/d21 | |
349 |
|
349 | |||
350 | attempt to overwrite an existing file |
|
350 | attempt to overwrite an existing file | |
351 |
|
351 | |||
352 | $ echo "ca" > d1/ca |
|
352 | $ echo "ca" > d1/ca | |
353 | $ hg rename d1/ba d1/ca |
|
353 | $ hg rename d1/ba d1/ca | |
354 | d1/ca: not overwriting - file exists |
|
354 | d1/ca: not overwriting - file exists | |
355 | $ hg status -C |
|
355 | $ hg status -C | |
356 | ? d1/ca |
|
356 | ? d1/ca | |
357 | $ hg update -C |
|
357 | $ hg update -C | |
358 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
358 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
359 |
|
359 | |||
360 | forced overwrite of an existing file |
|
360 | forced overwrite of an existing file | |
361 |
|
361 | |||
362 | $ echo "ca" > d1/ca |
|
362 | $ echo "ca" > d1/ca | |
363 | $ hg rename --force d1/ba d1/ca |
|
363 | $ hg rename --force d1/ba d1/ca | |
364 | $ hg status -C |
|
364 | $ hg status -C | |
365 | A d1/ca |
|
365 | A d1/ca | |
366 | d1/ba |
|
366 | d1/ba | |
367 | R d1/ba |
|
367 | R d1/ba | |
368 | $ hg update -C |
|
368 | $ hg update -C | |
369 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
369 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
370 | $ rm d1/ca |
|
370 | $ rm d1/ca | |
371 |
|
371 | |||
372 | replace a symlink with a file |
|
372 | replace a symlink with a file | |
373 |
|
373 | |||
374 | $ ln -s ba d1/ca |
|
374 | $ ln -s ba d1/ca | |
375 | $ hg rename --force d1/ba d1/ca |
|
375 | $ hg rename --force d1/ba d1/ca | |
376 | $ hg status -C |
|
376 | $ hg status -C | |
377 | A d1/ca |
|
377 | A d1/ca | |
378 | d1/ba |
|
378 | d1/ba | |
379 | R d1/ba |
|
379 | R d1/ba | |
380 | $ hg update -C |
|
380 | $ hg update -C | |
381 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
381 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
382 | $ rm d1/ca |
|
382 | $ rm d1/ca | |
383 |
|
383 | |||
384 | do not copy more than one source file to the same destination file |
|
384 | do not copy more than one source file to the same destination file | |
385 |
|
385 | |||
386 | $ mkdir d3 |
|
386 | $ mkdir d3 | |
387 | $ hg rename d1/* d2/* d3 |
|
387 | $ hg rename d1/* d2/* d3 | |
388 | moving d1/d11/a1 to d3/d11/a1 |
|
388 | moving d1/d11/a1 to d3/d11/a1 | |
389 | d3/b: not overwriting - d2/b collides with d1/b |
|
389 | d3/b: not overwriting - d2/b collides with d1/b | |
390 | $ hg status -C |
|
390 | $ hg status -C | |
391 | A d3/a |
|
391 | A d3/a | |
392 | d1/a |
|
392 | d1/a | |
393 | A d3/b |
|
393 | A d3/b | |
394 | d1/b |
|
394 | d1/b | |
395 | A d3/ba |
|
395 | A d3/ba | |
396 | d1/ba |
|
396 | d1/ba | |
397 | A d3/d11/a1 |
|
397 | A d3/d11/a1 | |
398 | d1/d11/a1 |
|
398 | d1/d11/a1 | |
399 | R d1/a |
|
399 | R d1/a | |
400 | R d1/b |
|
400 | R d1/b | |
401 | R d1/ba |
|
401 | R d1/ba | |
402 | R d1/d11/a1 |
|
402 | R d1/d11/a1 | |
403 | $ hg update -C |
|
403 | $ hg update -C | |
404 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
404 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
405 | $ rm -rf d3 |
|
405 | $ rm -rf d3 | |
406 |
|
406 | |||
407 | move a whole subtree with \"hg rename .\" |
|
407 | move a whole subtree with \"hg rename .\" | |
408 |
|
408 | |||
409 | $ mkdir d3 |
|
409 | $ mkdir d3 | |
410 | $ (cd d1; hg rename . ../d3) |
|
410 | $ (cd d1; hg rename . ../d3) | |
411 | moving a to ../d3/d1/a |
|
411 | moving a to ../d3/d1/a | |
412 | moving b to ../d3/d1/b |
|
412 | moving b to ../d3/d1/b | |
413 | moving ba to ../d3/d1/ba |
|
413 | moving ba to ../d3/d1/ba | |
414 | moving d11/a1 to ../d3/d1/d11/a1 |
|
414 | moving d11/a1 to ../d3/d1/d11/a1 | |
415 | $ hg status -C |
|
415 | $ hg status -C | |
416 | A d3/d1/a |
|
416 | A d3/d1/a | |
417 | d1/a |
|
417 | d1/a | |
418 | A d3/d1/b |
|
418 | A d3/d1/b | |
419 | d1/b |
|
419 | d1/b | |
420 | A d3/d1/ba |
|
420 | A d3/d1/ba | |
421 | d1/ba |
|
421 | d1/ba | |
422 | A d3/d1/d11/a1 |
|
422 | A d3/d1/d11/a1 | |
423 | d1/d11/a1 |
|
423 | d1/d11/a1 | |
424 | R d1/a |
|
424 | R d1/a | |
425 | R d1/b |
|
425 | R d1/b | |
426 | R d1/ba |
|
426 | R d1/ba | |
427 | R d1/d11/a1 |
|
427 | R d1/d11/a1 | |
428 | $ hg update -C |
|
428 | $ hg update -C | |
429 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
429 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
430 | $ rm -rf d3 |
|
430 | $ rm -rf d3 | |
431 |
|
431 | |||
432 | move a whole subtree with \"hg rename --after .\" |
|
432 | move a whole subtree with \"hg rename --after .\" | |
433 |
|
433 | |||
434 | $ mkdir d3 |
|
434 | $ mkdir d3 | |
435 | $ mv d1/* d3 |
|
435 | $ mv d1/* d3 | |
436 | $ (cd d1; hg rename --after . ../d3) |
|
436 | $ (cd d1; hg rename --after . ../d3) | |
437 | moving a to ../d3/a |
|
437 | moving a to ../d3/a | |
438 | moving b to ../d3/b |
|
438 | moving b to ../d3/b | |
439 | moving ba to ../d3/ba |
|
439 | moving ba to ../d3/ba | |
440 | moving d11/a1 to ../d3/d11/a1 |
|
440 | moving d11/a1 to ../d3/d11/a1 | |
441 | $ hg status -C |
|
441 | $ hg status -C | |
442 | A d3/a |
|
442 | A d3/a | |
443 | d1/a |
|
443 | d1/a | |
444 | A d3/b |
|
444 | A d3/b | |
445 | d1/b |
|
445 | d1/b | |
446 | A d3/ba |
|
446 | A d3/ba | |
447 | d1/ba |
|
447 | d1/ba | |
448 | A d3/d11/a1 |
|
448 | A d3/d11/a1 | |
449 | d1/d11/a1 |
|
449 | d1/d11/a1 | |
450 | R d1/a |
|
450 | R d1/a | |
451 | R d1/b |
|
451 | R d1/b | |
452 | R d1/ba |
|
452 | R d1/ba | |
453 | R d1/d11/a1 |
|
453 | R d1/d11/a1 | |
454 | $ hg update -C |
|
454 | $ hg update -C | |
455 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
455 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
456 | $ rm -rf d3 |
|
456 | $ rm -rf d3 | |
457 |
|
457 | |||
458 | move the parent tree with \"hg rename ..\" |
|
458 | move the parent tree with \"hg rename ..\" | |
459 |
|
459 | |||
460 | $ (cd d1/d11; hg rename .. ../../d3) |
|
460 | $ (cd d1/d11; hg rename .. ../../d3) | |
461 | moving ../a to ../../d3/a |
|
461 | moving ../a to ../../d3/a | |
462 | moving ../b to ../../d3/b |
|
462 | moving ../b to ../../d3/b | |
463 | moving ../ba to ../../d3/ba |
|
463 | moving ../ba to ../../d3/ba | |
464 | moving a1 to ../../d3/d11/a1 |
|
464 | moving a1 to ../../d3/d11/a1 | |
465 | $ hg status -C |
|
465 | $ hg status -C | |
466 | A d3/a |
|
466 | A d3/a | |
467 | d1/a |
|
467 | d1/a | |
468 | A d3/b |
|
468 | A d3/b | |
469 | d1/b |
|
469 | d1/b | |
470 | A d3/ba |
|
470 | A d3/ba | |
471 | d1/ba |
|
471 | d1/ba | |
472 | A d3/d11/a1 |
|
472 | A d3/d11/a1 | |
473 | d1/d11/a1 |
|
473 | d1/d11/a1 | |
474 | R d1/a |
|
474 | R d1/a | |
475 | R d1/b |
|
475 | R d1/b | |
476 | R d1/ba |
|
476 | R d1/ba | |
477 | R d1/d11/a1 |
|
477 | R d1/d11/a1 | |
478 | $ hg update -C |
|
478 | $ hg update -C | |
479 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
479 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
480 | $ rm -rf d3 |
|
480 | $ rm -rf d3 | |
481 |
|
481 | |||
482 | skip removed files |
|
482 | skip removed files | |
483 |
|
483 | |||
484 | $ hg remove d1/b |
|
484 | $ hg remove d1/b | |
485 | $ hg rename d1 d3 |
|
485 | $ hg rename d1 d3 | |
486 | moving d1/a to d3/a |
|
486 | moving d1/a to d3/a | |
487 | moving d1/ba to d3/ba |
|
487 | moving d1/ba to d3/ba | |
488 | moving d1/d11/a1 to d3/d11/a1 |
|
488 | moving d1/d11/a1 to d3/d11/a1 | |
489 | $ hg status -C |
|
489 | $ hg status -C | |
490 | A d3/a |
|
490 | A d3/a | |
491 | d1/a |
|
491 | d1/a | |
492 | A d3/ba |
|
492 | A d3/ba | |
493 | d1/ba |
|
493 | d1/ba | |
494 | A d3/d11/a1 |
|
494 | A d3/d11/a1 | |
495 | d1/d11/a1 |
|
495 | d1/d11/a1 | |
496 | R d1/a |
|
496 | R d1/a | |
497 | R d1/b |
|
497 | R d1/b | |
498 | R d1/ba |
|
498 | R d1/ba | |
499 | R d1/d11/a1 |
|
499 | R d1/d11/a1 | |
500 | $ hg update -C |
|
500 | $ hg update -C | |
501 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
501 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
502 | $ rm -rf d3 |
|
502 | $ rm -rf d3 | |
503 |
|
503 | |||
504 | transitive rename |
|
504 | transitive rename | |
505 |
|
505 | |||
506 | $ hg rename d1/b d1/bb |
|
506 | $ hg rename d1/b d1/bb | |
507 | $ hg rename d1/bb d1/bc |
|
507 | $ hg rename d1/bb d1/bc | |
508 | $ hg status -C |
|
508 | $ hg status -C | |
509 | A d1/bc |
|
509 | A d1/bc | |
510 | d1/b |
|
510 | d1/b | |
511 | R d1/b |
|
511 | R d1/b | |
512 | $ hg update -C |
|
512 | $ hg update -C | |
513 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
513 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
514 | $ rm d1/bc |
|
514 | $ rm d1/bc | |
515 |
|
515 | |||
516 | transitive rename --after |
|
516 | transitive rename --after | |
517 |
|
517 | |||
518 | $ hg rename d1/b d1/bb |
|
518 | $ hg rename d1/b d1/bb | |
519 | $ mv d1/bb d1/bc |
|
519 | $ mv d1/bb d1/bc | |
520 | $ hg rename --after d1/bb d1/bc |
|
520 | $ hg rename --after d1/bb d1/bc | |
521 | $ hg status -C |
|
521 | $ hg status -C | |
522 | A d1/bc |
|
522 | A d1/bc | |
523 | d1/b |
|
523 | d1/b | |
524 | R d1/b |
|
524 | R d1/b | |
525 | $ hg update -C |
|
525 | $ hg update -C | |
526 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
526 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
527 | $ rm d1/bc |
|
527 | $ rm d1/bc | |
528 |
|
528 | |||
529 | $ echo "# idempotent renames (d1/b -> d1/bb followed by d1/bb -> d1/b)" |
|
529 | $ echo "# idempotent renames (d1/b -> d1/bb followed by d1/bb -> d1/b)" | |
530 | # idempotent renames (d1/b -> d1/bb followed by d1/bb -> d1/b) |
|
530 | # idempotent renames (d1/b -> d1/bb followed by d1/bb -> d1/b) | |
531 | $ hg rename d1/b d1/bb |
|
531 | $ hg rename d1/b d1/bb | |
532 | $ echo "some stuff added to d1/bb" >> d1/bb |
|
532 | $ echo "some stuff added to d1/bb" >> d1/bb | |
533 | $ hg rename d1/bb d1/b |
|
533 | $ hg rename d1/bb d1/b | |
534 | $ hg status -C |
|
534 | $ hg status -C | |
535 | M d1/b |
|
535 | M d1/b | |
536 | $ hg update -C |
|
536 | $ hg update -C | |
537 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
537 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
538 |
|
538 | |||
539 | overwriting with renames (issue1959) |
|
539 | overwriting with renames (issue1959) | |
540 |
|
540 | |||
541 | $ hg rename d1/a d1/c |
|
541 | $ hg rename d1/a d1/c | |
542 | $ hg rename d1/b d1/a |
|
542 | $ hg rename d1/b d1/a | |
543 | $ hg status -C |
|
543 | $ hg status -C | |
544 | A d1/a |
|
544 | A d1/a | |
545 | d1/b |
|
545 | d1/b | |
546 | A d1/c |
|
546 | A d1/c | |
547 | d1/a |
|
547 | d1/a | |
548 | R d1/b |
|
548 | R d1/b | |
549 | $ hg diff --git |
|
549 | $ hg diff --git | |
550 | diff --git a/d1/b b/d1/a |
|
550 | diff --git a/d1/b b/d1/a | |
551 | rename from d1/b |
|
551 | rename from d1/b | |
552 | rename to d1/a |
|
552 | rename to d1/a | |
553 | diff --git a/d1/a b/d1/c |
|
553 | diff --git a/d1/a b/d1/c | |
554 | copy from d1/a |
|
554 | copy from d1/a | |
555 | copy to d1/c |
|
555 | copy to d1/c | |
556 | $ hg update -C |
|
556 | $ hg update -C | |
557 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
557 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
558 |
|
558 | |||
559 | check illegal path components |
|
559 | check illegal path components | |
560 |
|
560 | |||
561 | $ hg rename d1/d11/a1 .hg/foo |
|
561 | $ hg rename d1/d11/a1 .hg/foo | |
562 | abort: path contains illegal component: .hg/foo |
|
562 | abort: path contains illegal component: .hg/foo | |
563 | $ hg status -C |
|
563 | $ hg status -C | |
564 | $ hg rename d1/d11/a1 ../foo |
|
564 | $ hg rename d1/d11/a1 ../foo | |
565 | abort: ../foo not under root |
|
565 | abort: ../foo not under root | |
566 | $ hg status -C |
|
566 | $ hg status -C | |
567 |
|
567 | |||
568 | $ mv d1/d11/a1 .hg/foo |
|
568 | $ mv d1/d11/a1 .hg/foo | |
569 | $ hg rename --after d1/d11/a1 .hg/foo |
|
569 | $ hg rename --after d1/d11/a1 .hg/foo | |
570 | abort: path contains illegal component: .hg/foo |
|
570 | abort: path contains illegal component: .hg/foo | |
571 | $ hg status -C |
|
571 | $ hg status -C | |
572 | ! d1/d11/a1 |
|
572 | ! d1/d11/a1 | |
573 | $ hg update -C |
|
573 | $ hg update -C | |
574 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
574 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
575 | $ rm .hg/foo |
|
575 | $ rm .hg/foo | |
576 |
|
576 | |||
577 | $ hg rename d1/d11/a1 .hg |
|
577 | $ hg rename d1/d11/a1 .hg | |
578 | abort: path contains illegal component: .hg/a1 |
|
578 | abort: path contains illegal component: .hg/a1 | |
579 | $ hg status -C |
|
579 | $ hg status -C | |
580 | $ hg rename d1/d11/a1 .. |
|
580 | $ hg rename d1/d11/a1 .. | |
581 | abort: ../a1 not under root |
|
581 | abort: ../a1 not under root | |
582 | $ hg status -C |
|
582 | $ hg status -C | |
583 |
|
583 | |||
584 | $ mv d1/d11/a1 .hg |
|
584 | $ mv d1/d11/a1 .hg | |
585 | $ hg rename --after d1/d11/a1 .hg |
|
585 | $ hg rename --after d1/d11/a1 .hg | |
586 | abort: path contains illegal component: .hg/a1 |
|
586 | abort: path contains illegal component: .hg/a1 | |
587 | $ hg status -C |
|
587 | $ hg status -C | |
588 | ! d1/d11/a1 |
|
588 | ! d1/d11/a1 | |
589 | $ hg update -C |
|
589 | $ hg update -C | |
590 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
590 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
591 | $ rm .hg/a1 |
|
591 | $ rm .hg/a1 | |
592 |
|
592 | |||
593 | $ (cd d1/d11; hg rename ../../d2/b ../../.hg/foo) |
|
593 | $ (cd d1/d11; hg rename ../../d2/b ../../.hg/foo) | |
594 | abort: path contains illegal component: .hg/foo |
|
594 | abort: path contains illegal component: .hg/foo | |
595 | $ hg status -C |
|
595 | $ hg status -C | |
596 | $ (cd d1/d11; hg rename ../../d2/b ../../../foo) |
|
596 | $ (cd d1/d11; hg rename ../../d2/b ../../../foo) | |
597 | abort: ../../../foo not under root |
|
597 | abort: ../../../foo not under root | |
598 | $ hg status -C |
|
598 | $ hg status -C | |
599 |
|
599 |
@@ -1,14 +1,14 b'' | |||||
1 | $ mkdir t |
|
1 | $ mkdir t | |
2 | $ cd t |
|
2 | $ cd t | |
3 | $ hg init |
|
3 | $ hg init | |
4 | $ echo a > a |
|
4 | $ echo a > a | |
5 | $ hg add a |
|
5 | $ hg add a | |
6 |
$ hg commit -m test |
|
6 | $ hg commit -m test | |
7 |
$ |
|
7 | $ rm .hg/requires | |
8 |
$ |
|
8 | $ hg tip | |
9 | abort: index 00changelog.i unknown format 2! |
|
9 | abort: index 00changelog.i unknown format 2! | |
10 | $ echo indoor-pool > .hg/requires |
|
10 | $ echo indoor-pool > .hg/requires | |
11 | $ hg tip |
|
11 | $ hg tip | |
12 | abort: requirement 'indoor-pool' not supported! |
|
12 | abort: requirement 'indoor-pool' not supported! | |
13 |
|
13 | |||
14 | $ true |
|
14 | $ true |
@@ -1,29 +1,29 b'' | |||||
1 | $ hg init |
|
1 | $ hg init | |
2 | $ touch unknown |
|
2 | $ touch unknown | |
3 |
|
3 | |||
4 | $ touch a |
|
4 | $ touch a | |
5 | $ hg add a |
|
5 | $ hg add a | |
6 |
$ hg ci -m "1" |
|
6 | $ hg ci -m "1" | |
7 |
|
7 | |||
8 | $ touch b |
|
8 | $ touch b | |
9 | $ hg add b |
|
9 | $ hg add b | |
10 |
$ hg ci -m "2" |
|
10 | $ hg ci -m "2" | |
11 |
|
11 | |||
12 | Should show unknown |
|
12 | Should show unknown | |
13 |
|
13 | |||
14 | $ hg status |
|
14 | $ hg status | |
15 | ? unknown |
|
15 | ? unknown | |
16 | $ hg revert -r 0 --all |
|
16 | $ hg revert -r 0 --all | |
17 | removing b |
|
17 | removing b | |
18 |
|
18 | |||
19 | Should show unknown and b removed |
|
19 | Should show unknown and b removed | |
20 |
|
20 | |||
21 | $ hg status |
|
21 | $ hg status | |
22 | R b |
|
22 | R b | |
23 | ? unknown |
|
23 | ? unknown | |
24 |
|
24 | |||
25 | Should show a and unknown |
|
25 | Should show a and unknown | |
26 |
|
26 | |||
27 | $ ls |
|
27 | $ ls | |
28 | a |
|
28 | a | |
29 | unknown |
|
29 | unknown |
@@ -1,263 +1,263 b'' | |||||
1 | $ hg init repo |
|
1 | $ hg init repo | |
2 | $ cd repo |
|
2 | $ cd repo | |
3 | $ echo 123 > a |
|
3 | $ echo 123 > a | |
4 | $ echo 123 > c |
|
4 | $ echo 123 > c | |
5 | $ echo 123 > e |
|
5 | $ echo 123 > e | |
6 | $ hg add a c e |
|
6 | $ hg add a c e | |
7 |
$ hg commit -m "first" |
|
7 | $ hg commit -m "first" a c e | |
8 | $ echo 123 > b |
|
8 | $ echo 123 > b | |
9 |
|
9 | |||
10 | should show b unknown |
|
10 | should show b unknown | |
11 |
|
11 | |||
12 | $ hg status |
|
12 | $ hg status | |
13 | ? b |
|
13 | ? b | |
14 | $ echo 12 > c |
|
14 | $ echo 12 > c | |
15 |
|
15 | |||
16 | should show b unknown and c modified |
|
16 | should show b unknown and c modified | |
17 |
|
17 | |||
18 | $ hg status |
|
18 | $ hg status | |
19 | M c |
|
19 | M c | |
20 | ? b |
|
20 | ? b | |
21 | $ hg add b |
|
21 | $ hg add b | |
22 |
|
22 | |||
23 | should show b added and c modified |
|
23 | should show b added and c modified | |
24 |
|
24 | |||
25 | $ hg status |
|
25 | $ hg status | |
26 | M c |
|
26 | M c | |
27 | A b |
|
27 | A b | |
28 | $ hg rm a |
|
28 | $ hg rm a | |
29 |
|
29 | |||
30 | should show a removed, b added and c modified |
|
30 | should show a removed, b added and c modified | |
31 |
|
31 | |||
32 | $ hg status |
|
32 | $ hg status | |
33 | M c |
|
33 | M c | |
34 | A b |
|
34 | A b | |
35 | R a |
|
35 | R a | |
36 | $ hg revert a |
|
36 | $ hg revert a | |
37 |
|
37 | |||
38 | should show b added, copy saved, and c modified |
|
38 | should show b added, copy saved, and c modified | |
39 |
|
39 | |||
40 | $ hg status |
|
40 | $ hg status | |
41 | M c |
|
41 | M c | |
42 | A b |
|
42 | A b | |
43 | $ hg revert b |
|
43 | $ hg revert b | |
44 |
|
44 | |||
45 | should show b unknown, and c modified |
|
45 | should show b unknown, and c modified | |
46 |
|
46 | |||
47 | $ hg status |
|
47 | $ hg status | |
48 | M c |
|
48 | M c | |
49 | ? b |
|
49 | ? b | |
50 | $ hg revert --no-backup c |
|
50 | $ hg revert --no-backup c | |
51 |
|
51 | |||
52 | should show unknown: b |
|
52 | should show unknown: b | |
53 |
|
53 | |||
54 | $ hg status |
|
54 | $ hg status | |
55 | ? b |
|
55 | ? b | |
56 | $ hg add b |
|
56 | $ hg add b | |
57 |
|
57 | |||
58 | should show b added |
|
58 | should show b added | |
59 |
|
59 | |||
60 | $ hg status b |
|
60 | $ hg status b | |
61 | A b |
|
61 | A b | |
62 | $ rm b |
|
62 | $ rm b | |
63 |
|
63 | |||
64 | should show b deleted |
|
64 | should show b deleted | |
65 |
|
65 | |||
66 | $ hg status b |
|
66 | $ hg status b | |
67 | ! b |
|
67 | ! b | |
68 | $ hg revert -v b |
|
68 | $ hg revert -v b | |
69 | forgetting b |
|
69 | forgetting b | |
70 |
|
70 | |||
71 | should not find b |
|
71 | should not find b | |
72 |
|
72 | |||
73 | $ hg status b |
|
73 | $ hg status b | |
74 | b: No such file or directory |
|
74 | b: No such file or directory | |
75 |
|
75 | |||
76 | should show a c e |
|
76 | should show a c e | |
77 |
|
77 | |||
78 | $ ls |
|
78 | $ ls | |
79 | a |
|
79 | a | |
80 | c |
|
80 | c | |
81 | e |
|
81 | e | |
82 |
|
82 | |||
83 | should verbosely save backup to e.orig |
|
83 | should verbosely save backup to e.orig | |
84 |
|
84 | |||
85 | $ echo z > e |
|
85 | $ echo z > e | |
86 | $ hg revert --all -v |
|
86 | $ hg revert --all -v | |
87 | saving current version of e as e.orig |
|
87 | saving current version of e as e.orig | |
88 | reverting e |
|
88 | reverting e | |
89 |
|
89 | |||
90 | should say no changes needed |
|
90 | should say no changes needed | |
91 |
|
91 | |||
92 | $ hg revert a |
|
92 | $ hg revert a | |
93 | no changes needed to a |
|
93 | no changes needed to a | |
94 |
|
94 | |||
95 | should say file not managed |
|
95 | should say file not managed | |
96 |
|
96 | |||
97 | $ echo q > q |
|
97 | $ echo q > q | |
98 | $ hg revert q |
|
98 | $ hg revert q | |
99 | file not managed: q |
|
99 | file not managed: q | |
100 | $ rm q |
|
100 | $ rm q | |
101 |
|
101 | |||
102 | should say file not found |
|
102 | should say file not found | |
103 |
|
103 | |||
104 | $ hg revert notfound |
|
104 | $ hg revert notfound | |
105 |
notfound: no such file in rev |
|
105 | notfound: no such file in rev 334a9e57682c | |
106 | $ touch d |
|
106 | $ touch d | |
107 | $ hg add d |
|
107 | $ hg add d | |
108 | $ hg rm a |
|
108 | $ hg rm a | |
109 |
$ hg commit -m "second" |
|
109 | $ hg commit -m "second" | |
110 | $ echo z > z |
|
110 | $ echo z > z | |
111 | $ hg add z |
|
111 | $ hg add z | |
112 | $ hg st |
|
112 | $ hg st | |
113 | A z |
|
113 | A z | |
114 | ? e.orig |
|
114 | ? e.orig | |
115 |
|
115 | |||
116 | should add a, remove d, forget z |
|
116 | should add a, remove d, forget z | |
117 |
|
117 | |||
118 | $ hg revert --all -r0 |
|
118 | $ hg revert --all -r0 | |
119 | adding a |
|
119 | adding a | |
120 | removing d |
|
120 | removing d | |
121 | forgetting z |
|
121 | forgetting z | |
122 |
|
122 | |||
123 | should forget a, undelete d |
|
123 | should forget a, undelete d | |
124 |
|
124 | |||
125 | $ hg revert --all -rtip |
|
125 | $ hg revert --all -rtip | |
126 | forgetting a |
|
126 | forgetting a | |
127 | undeleting d |
|
127 | undeleting d | |
128 | $ rm a *.orig |
|
128 | $ rm a *.orig | |
129 |
|
129 | |||
130 | should silently add a |
|
130 | should silently add a | |
131 |
|
131 | |||
132 | $ hg revert -r0 a |
|
132 | $ hg revert -r0 a | |
133 | $ hg st a |
|
133 | $ hg st a | |
134 | A a |
|
134 | A a | |
135 | $ hg rm d |
|
135 | $ hg rm d | |
136 | $ hg st d |
|
136 | $ hg st d | |
137 | R d |
|
137 | R d | |
138 |
|
138 | |||
139 | should silently keep d removed |
|
139 | should silently keep d removed | |
140 |
|
140 | |||
141 | $ hg revert -r0 d |
|
141 | $ hg revert -r0 d | |
142 | $ hg st d |
|
142 | $ hg st d | |
143 | R d |
|
143 | R d | |
144 |
|
144 | |||
145 | $ hg update -C |
|
145 | $ hg update -C | |
146 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
146 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
147 | $ chmod +x c |
|
147 | $ chmod +x c | |
148 | $ hg revert --all |
|
148 | $ hg revert --all | |
149 | reverting c |
|
149 | reverting c | |
150 |
|
150 | |||
151 | should print non-executable |
|
151 | should print non-executable | |
152 |
|
152 | |||
153 | $ test -x c || echo non-executable |
|
153 | $ test -x c || echo non-executable | |
154 | non-executable |
|
154 | non-executable | |
155 |
|
155 | |||
156 | $ chmod +x c |
|
156 | $ chmod +x c | |
157 |
$ hg commit - |
|
157 | $ hg commit -m exe | |
158 |
|
158 | |||
159 | $ chmod -x c |
|
159 | $ chmod -x c | |
160 | $ hg revert --all |
|
160 | $ hg revert --all | |
161 | reverting c |
|
161 | reverting c | |
162 |
|
162 | |||
163 | should print executable |
|
163 | should print executable | |
164 |
|
164 | |||
165 | $ test -x c && echo executable |
|
165 | $ test -x c && echo executable | |
166 | executable |
|
166 | executable | |
167 |
|
167 | |||
168 | $ cd .. |
|
168 | $ cd .. | |
169 |
|
169 | |||
170 |
|
170 | |||
171 | issue 241 |
|
171 | issue 241 | |
172 |
|
172 | |||
173 | $ hg init a |
|
173 | $ hg init a | |
174 | $ cd a |
|
174 | $ cd a | |
175 | $ echo a >> a |
|
175 | $ echo a >> a | |
176 | $ hg commit -A -d '1 0' -m a |
|
176 | $ hg commit -A -d '1 0' -m a | |
177 | adding a |
|
177 | adding a | |
178 | $ echo a >> a |
|
178 | $ echo a >> a | |
179 | $ hg commit -d '2 0' -m a |
|
179 | $ hg commit -d '2 0' -m a | |
180 | $ hg update 0 |
|
180 | $ hg update 0 | |
181 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
181 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
182 | $ mkdir b |
|
182 | $ mkdir b | |
183 | $ echo b > b/b |
|
183 | $ echo b > b/b | |
184 |
|
184 | |||
185 | should fail - no arguments |
|
185 | should fail - no arguments | |
186 |
|
186 | |||
187 | $ hg revert -rtip |
|
187 | $ hg revert -rtip | |
188 | abort: no files or directories specified; use --all to revert the whole repo |
|
188 | abort: no files or directories specified; use --all to revert the whole repo | |
189 |
|
189 | |||
190 | should succeed |
|
190 | should succeed | |
191 |
|
191 | |||
192 | $ hg revert --all -rtip |
|
192 | $ hg revert --all -rtip | |
193 | reverting a |
|
193 | reverting a | |
194 |
|
194 | |||
195 |
|
195 | |||
196 | issue332 |
|
196 | issue332 | |
197 |
|
197 | |||
198 |
$ hg ci -A -m b |
|
198 | $ hg ci -A -m b | |
199 | adding b/b |
|
199 | adding b/b | |
200 | created new head |
|
200 | created new head | |
201 | $ echo foobar > b/b |
|
201 | $ echo foobar > b/b | |
202 | $ mkdir newdir |
|
202 | $ mkdir newdir | |
203 | $ echo foo > newdir/newfile |
|
203 | $ echo foo > newdir/newfile | |
204 | $ hg add newdir/newfile |
|
204 | $ hg add newdir/newfile | |
205 | $ hg revert b newdir |
|
205 | $ hg revert b newdir | |
206 | reverting b/b |
|
206 | reverting b/b | |
207 | forgetting newdir/newfile |
|
207 | forgetting newdir/newfile | |
208 | $ echo foobar > b/b |
|
208 | $ echo foobar > b/b | |
209 | $ hg revert . |
|
209 | $ hg revert . | |
210 | reverting b/b |
|
210 | reverting b/b | |
211 |
|
211 | |||
212 |
|
212 | |||
213 | reverting a rename target should revert the source |
|
213 | reverting a rename target should revert the source | |
214 |
|
214 | |||
215 | $ hg mv a newa |
|
215 | $ hg mv a newa | |
216 | $ hg revert newa |
|
216 | $ hg revert newa | |
217 | $ hg st a newa |
|
217 | $ hg st a newa | |
218 | ? newa |
|
218 | ? newa | |
219 |
|
219 | |||
220 | $ cd .. |
|
220 | $ cd .. | |
221 |
|
221 | |||
222 | $ hg init ignored |
|
222 | $ hg init ignored | |
223 | $ cd ignored |
|
223 | $ cd ignored | |
224 | $ echo '^ignored$' > .hgignore |
|
224 | $ echo '^ignored$' > .hgignore | |
225 | $ echo '^ignoreddir$' >> .hgignore |
|
225 | $ echo '^ignoreddir$' >> .hgignore | |
226 | $ echo '^removed$' >> .hgignore |
|
226 | $ echo '^removed$' >> .hgignore | |
227 |
|
227 | |||
228 | $ mkdir ignoreddir |
|
228 | $ mkdir ignoreddir | |
229 | $ touch ignoreddir/file |
|
229 | $ touch ignoreddir/file | |
230 | $ touch ignoreddir/removed |
|
230 | $ touch ignoreddir/removed | |
231 | $ touch ignored |
|
231 | $ touch ignored | |
232 | $ touch removed |
|
232 | $ touch removed | |
233 |
|
233 | |||
234 | 4 ignored files (we will add/commit everything) |
|
234 | 4 ignored files (we will add/commit everything) | |
235 |
|
235 | |||
236 | $ hg st -A -X .hgignore |
|
236 | $ hg st -A -X .hgignore | |
237 | I ignored |
|
237 | I ignored | |
238 | I ignoreddir/file |
|
238 | I ignoreddir/file | |
239 | I ignoreddir/removed |
|
239 | I ignoreddir/removed | |
240 | I removed |
|
240 | I removed | |
241 | $ hg ci -qAm 'add files' ignored ignoreddir/file ignoreddir/removed removed |
|
241 | $ hg ci -qAm 'add files' ignored ignoreddir/file ignoreddir/removed removed | |
242 |
|
242 | |||
243 | $ echo >> ignored |
|
243 | $ echo >> ignored | |
244 | $ echo >> ignoreddir/file |
|
244 | $ echo >> ignoreddir/file | |
245 | $ hg rm removed ignoreddir/removed |
|
245 | $ hg rm removed ignoreddir/removed | |
246 |
|
246 | |||
247 | should revert ignored* and undelete *removed |
|
247 | should revert ignored* and undelete *removed | |
248 |
|
248 | |||
249 | $ hg revert -a --no-backup |
|
249 | $ hg revert -a --no-backup | |
250 | reverting ignored |
|
250 | reverting ignored | |
251 | reverting ignoreddir/file |
|
251 | reverting ignoreddir/file | |
252 | undeleting ignoreddir/removed |
|
252 | undeleting ignoreddir/removed | |
253 | undeleting removed |
|
253 | undeleting removed | |
254 | $ hg st -mardi |
|
254 | $ hg st -mardi | |
255 |
|
255 | |||
256 | $ hg up -qC |
|
256 | $ hg up -qC | |
257 | $ echo >> ignored |
|
257 | $ echo >> ignored | |
258 | $ hg rm removed |
|
258 | $ hg rm removed | |
259 |
|
259 | |||
260 | should silently revert the named files |
|
260 | should silently revert the named files | |
261 |
|
261 | |||
262 | $ hg revert --no-backup ignored removed |
|
262 | $ hg revert --no-backup ignored removed | |
263 | $ hg st -mardi |
|
263 | $ hg st -mardi |
@@ -1,48 +1,48 b'' | |||||
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 a > a |
|
6 | echo a > a | |
7 | hg add a |
|
7 | hg add a | |
8 |
hg commit -m "test" |
|
8 | hg commit -m "test" | |
9 | hg verify |
|
9 | hg verify | |
10 | hg parents |
|
10 | hg parents | |
11 | hg status |
|
11 | hg status | |
12 | hg rollback |
|
12 | hg rollback | |
13 | hg verify |
|
13 | hg verify | |
14 | hg parents |
|
14 | hg parents | |
15 | hg status |
|
15 | hg status | |
16 |
|
16 | |||
17 | echo % Test issue 902 |
|
17 | echo % Test issue 902 | |
18 | hg commit -m "test2" |
|
18 | hg commit -m "test2" | |
19 | hg branch test |
|
19 | hg branch test | |
20 | hg rollback |
|
20 | hg rollback | |
21 | hg branch |
|
21 | hg branch | |
22 |
|
22 | |||
23 | echo '% Test issue 1635 (commit message saved)' |
|
23 | echo '% Test issue 1635 (commit message saved)' | |
24 | echo '.hg/last-message.txt:' |
|
24 | echo '.hg/last-message.txt:' | |
25 | cat .hg/last-message.txt ; echo |
|
25 | cat .hg/last-message.txt ; echo | |
26 |
|
26 | |||
27 | echo % Test rollback of hg before issue 902 was fixed |
|
27 | echo % Test rollback of hg before issue 902 was fixed | |
28 | hg commit -m "test3" |
|
28 | hg commit -m "test3" | |
29 | hg branch test |
|
29 | hg branch test | |
30 | rm .hg/undo.branch |
|
30 | rm .hg/undo.branch | |
31 | hg rollback |
|
31 | hg rollback | |
32 | hg branch |
|
32 | hg branch | |
33 |
|
33 | |||
34 | echo '% rollback by pretxncommit saves commit message (issue 1635)' |
|
34 | echo '% rollback by pretxncommit saves commit message (issue 1635)' | |
35 | echo a >> a |
|
35 | echo a >> a | |
36 | hg --config hooks.pretxncommit=false commit -m"precious commit message" 2>&1 | sed 's,exited with status .*,exited ...,g' |
|
36 | hg --config hooks.pretxncommit=false commit -m"precious commit message" 2>&1 | sed 's,exited with status .*,exited ...,g' | |
37 | echo '.hg/last-message.txt:' |
|
37 | echo '.hg/last-message.txt:' | |
38 | cat .hg/last-message.txt ; echo |
|
38 | cat .hg/last-message.txt ; echo | |
39 |
|
39 | |||
40 | echo '% same thing, but run $EDITOR' |
|
40 | echo '% same thing, but run $EDITOR' | |
41 | cat > $HGTMP/editor <<'__EOF__' |
|
41 | cat > $HGTMP/editor <<'__EOF__' | |
42 | #!/bin/sh |
|
42 | #!/bin/sh | |
43 | echo "another precious commit message" > "$1" |
|
43 | echo "another precious commit message" > "$1" | |
44 | __EOF__ |
|
44 | __EOF__ | |
45 | chmod +x "$HGTMP"/editor |
|
45 | chmod +x "$HGTMP"/editor | |
46 | HGEDITOR="'$HGTMP'"/editor hg --config hooks.pretxncommit=false commit 2>&1 | sed 's,exited with status .*,exited ...,g' |
|
46 | HGEDITOR="'$HGTMP'"/editor hg --config hooks.pretxncommit=false commit 2>&1 | sed 's,exited with status .*,exited ...,g' | |
47 | echo '.hg/last-message.txt:' |
|
47 | echo '.hg/last-message.txt:' | |
48 | cat .hg/last-message.txt |
|
48 | cat .hg/last-message.txt |
@@ -1,43 +1,43 b'' | |||||
1 | checking changesets |
|
1 | checking changesets | |
2 | checking manifests |
|
2 | checking manifests | |
3 | crosschecking files in changesets and manifests |
|
3 | crosschecking files in changesets and manifests | |
4 | checking files |
|
4 | checking files | |
5 | 1 files, 1 changesets, 1 total revisions |
|
5 | 1 files, 1 changesets, 1 total revisions | |
6 |
changeset: 0: |
|
6 | changeset: 0:acb14030fe0a | |
7 | tag: tip |
|
7 | tag: tip | |
8 | user: test |
|
8 | user: test | |
9 |
date: |
|
9 | date: Thu Jan 01 00:00:00 1970 +0000 | |
10 | summary: test |
|
10 | summary: test | |
11 |
|
11 | |||
12 | rolling back to revision -1 (undo commit) |
|
12 | rolling back to revision -1 (undo commit) | |
13 | checking changesets |
|
13 | checking changesets | |
14 | checking manifests |
|
14 | checking manifests | |
15 | crosschecking files in changesets and manifests |
|
15 | crosschecking files in changesets and manifests | |
16 | checking files |
|
16 | checking files | |
17 | 0 files, 0 changesets, 0 total revisions |
|
17 | 0 files, 0 changesets, 0 total revisions | |
18 | A a |
|
18 | A a | |
19 | % Test issue 902 |
|
19 | % Test issue 902 | |
20 | marked working directory as branch test |
|
20 | marked working directory as branch test | |
21 | rolling back to revision -1 (undo commit) |
|
21 | rolling back to revision -1 (undo commit) | |
22 | default |
|
22 | default | |
23 | % Test issue 1635 (commit message saved) |
|
23 | % Test issue 1635 (commit message saved) | |
24 | .hg/last-message.txt: |
|
24 | .hg/last-message.txt: | |
25 | test2 |
|
25 | test2 | |
26 | % Test rollback of hg before issue 902 was fixed |
|
26 | % Test rollback of hg before issue 902 was fixed | |
27 | marked working directory as branch test |
|
27 | marked working directory as branch test | |
28 | rolling back to revision -1 (undo commit) |
|
28 | rolling back to revision -1 (undo commit) | |
29 | Named branch could not be reset, current branch still is: test |
|
29 | Named branch could not be reset, current branch still is: test | |
30 | test |
|
30 | test | |
31 | % rollback by pretxncommit saves commit message (issue 1635) |
|
31 | % rollback by pretxncommit saves commit message (issue 1635) | |
32 | transaction abort! |
|
32 | transaction abort! | |
33 | rollback completed |
|
33 | rollback completed | |
34 | abort: pretxncommit hook exited ... |
|
34 | abort: pretxncommit hook exited ... | |
35 | .hg/last-message.txt: |
|
35 | .hg/last-message.txt: | |
36 | precious commit message |
|
36 | precious commit message | |
37 | % same thing, but run $EDITOR |
|
37 | % same thing, but run $EDITOR | |
38 | transaction abort! |
|
38 | transaction abort! | |
39 | rollback completed |
|
39 | rollback completed | |
40 | note: commit message saved in .hg/last-message.txt |
|
40 | note: commit message saved in .hg/last-message.txt | |
41 | abort: pretxncommit hook exited ... |
|
41 | abort: pretxncommit hook exited ... | |
42 | .hg/last-message.txt: |
|
42 | .hg/last-message.txt: | |
43 | another precious commit message |
|
43 | another precious commit message |
@@ -1,111 +1,111 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | cp "$TESTDIR"/printenv.py . |
|
3 | cp "$TESTDIR"/printenv.py . | |
4 |
|
4 | |||
5 | # This test tries to exercise the ssh functionality with a dummy script |
|
5 | # This test tries to exercise the ssh functionality with a dummy script | |
6 |
|
6 | |||
7 | cat <<EOF > dummyssh |
|
7 | cat <<EOF > dummyssh | |
8 | import sys |
|
8 | import sys | |
9 | import os |
|
9 | import os | |
10 |
|
10 | |||
11 | os.chdir(os.path.dirname(sys.argv[0])) |
|
11 | os.chdir(os.path.dirname(sys.argv[0])) | |
12 | if sys.argv[1] != "user@dummy": |
|
12 | if sys.argv[1] != "user@dummy": | |
13 | sys.exit(-1) |
|
13 | sys.exit(-1) | |
14 |
|
14 | |||
15 | if not os.path.exists("dummyssh"): |
|
15 | if not os.path.exists("dummyssh"): | |
16 | sys.exit(-1) |
|
16 | sys.exit(-1) | |
17 |
|
17 | |||
18 | os.environ["SSH_CLIENT"] = "127.0.0.1 1 2" |
|
18 | os.environ["SSH_CLIENT"] = "127.0.0.1 1 2" | |
19 |
|
19 | |||
20 | log = open("dummylog", "ab") |
|
20 | log = open("dummylog", "ab") | |
21 | log.write("Got arguments") |
|
21 | log.write("Got arguments") | |
22 | for i, arg in enumerate(sys.argv[1:]): |
|
22 | for i, arg in enumerate(sys.argv[1:]): | |
23 | log.write(" %d:%s" % (i+1, arg)) |
|
23 | log.write(" %d:%s" % (i+1, arg)) | |
24 | log.write("\n") |
|
24 | log.write("\n") | |
25 | log.close() |
|
25 | log.close() | |
26 | r = os.system(sys.argv[2]) |
|
26 | r = os.system(sys.argv[2]) | |
27 | sys.exit(bool(r)) |
|
27 | sys.exit(bool(r)) | |
28 | EOF |
|
28 | EOF | |
29 |
|
29 | |||
30 | cat <<EOF > badhook |
|
30 | cat <<EOF > badhook | |
31 | import sys |
|
31 | import sys | |
32 | sys.stdout.write("KABOOM\n") |
|
32 | sys.stdout.write("KABOOM\n") | |
33 | EOF |
|
33 | EOF | |
34 |
|
34 | |||
35 | echo "# creating 'remote'" |
|
35 | echo "# creating 'remote'" | |
36 | hg init remote |
|
36 | hg init remote | |
37 | cd remote |
|
37 | cd remote | |
38 | echo this > foo |
|
38 | echo this > foo | |
39 | echo this > fooO |
|
39 | echo this > fooO | |
40 |
hg ci -A -m "init" |
|
40 | hg ci -A -m "init" foo fooO | |
41 | echo '[server]' > .hg/hgrc |
|
41 | echo '[server]' > .hg/hgrc | |
42 | echo 'uncompressed = True' >> .hg/hgrc |
|
42 | echo 'uncompressed = True' >> .hg/hgrc | |
43 | echo '[hooks]' >> .hg/hgrc |
|
43 | echo '[hooks]' >> .hg/hgrc | |
44 | echo 'changegroup = python ../printenv.py changegroup-in-remote 0 ../dummylog' >> .hg/hgrc |
|
44 | echo 'changegroup = python ../printenv.py changegroup-in-remote 0 ../dummylog' >> .hg/hgrc | |
45 |
|
45 | |||
46 | cd .. |
|
46 | cd .. | |
47 |
|
47 | |||
48 | echo "# repo not found error" |
|
48 | echo "# repo not found error" | |
49 | hg clone -e "python ./dummyssh" ssh://user@dummy/nonexistent local |
|
49 | hg clone -e "python ./dummyssh" ssh://user@dummy/nonexistent local | |
50 |
|
50 | |||
51 | echo "# clone remote via stream" |
|
51 | echo "# clone remote via stream" | |
52 | hg clone -e "python ./dummyssh" --uncompressed ssh://user@dummy/remote local-stream 2>&1 | \ |
|
52 | hg clone -e "python ./dummyssh" --uncompressed ssh://user@dummy/remote local-stream 2>&1 | \ | |
53 | sed -e 's/[0-9][0-9.]*/XXX/g' -e 's/[KM]\(B\/sec\)/X\1/' |
|
53 | sed -e 's/[0-9][0-9.]*/XXX/g' -e 's/[KM]\(B\/sec\)/X\1/' | |
54 | cd local-stream |
|
54 | cd local-stream | |
55 | hg verify |
|
55 | hg verify | |
56 | cd .. |
|
56 | cd .. | |
57 |
|
57 | |||
58 | echo "# clone remote via pull" |
|
58 | echo "# clone remote via pull" | |
59 | hg clone -e "python ./dummyssh" ssh://user@dummy/remote local |
|
59 | hg clone -e "python ./dummyssh" ssh://user@dummy/remote local | |
60 |
|
60 | |||
61 | echo "# verify" |
|
61 | echo "# verify" | |
62 | cd local |
|
62 | cd local | |
63 | hg verify |
|
63 | hg verify | |
64 |
|
64 | |||
65 | echo '[hooks]' >> .hg/hgrc |
|
65 | echo '[hooks]' >> .hg/hgrc | |
66 | echo 'changegroup = python ../printenv.py changegroup-in-local 0 ../dummylog' >> .hg/hgrc |
|
66 | echo 'changegroup = python ../printenv.py changegroup-in-local 0 ../dummylog' >> .hg/hgrc | |
67 |
|
67 | |||
68 | echo "# empty default pull" |
|
68 | echo "# empty default pull" | |
69 | hg paths |
|
69 | hg paths | |
70 | hg pull -e "python ../dummyssh" |
|
70 | hg pull -e "python ../dummyssh" | |
71 |
|
71 | |||
72 | echo "# local change" |
|
72 | echo "# local change" | |
73 | echo bleah > foo |
|
73 | echo bleah > foo | |
74 |
hg ci -m "add" |
|
74 | hg ci -m "add" | |
75 |
|
75 | |||
76 | echo "# updating rc" |
|
76 | echo "# updating rc" | |
77 | echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc |
|
77 | echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc | |
78 | echo "[ui]" >> .hg/hgrc |
|
78 | echo "[ui]" >> .hg/hgrc | |
79 | echo "ssh = python ../dummyssh" >> .hg/hgrc |
|
79 | echo "ssh = python ../dummyssh" >> .hg/hgrc | |
80 |
|
80 | |||
81 | echo "# find outgoing" |
|
81 | echo "# find outgoing" | |
82 | hg out ssh://user@dummy/remote |
|
82 | hg out ssh://user@dummy/remote | |
83 |
|
83 | |||
84 | echo "# find incoming on the remote side" |
|
84 | echo "# find incoming on the remote side" | |
85 | hg incoming -R ../remote -e "python ../dummyssh" ssh://user@dummy/local |
|
85 | hg incoming -R ../remote -e "python ../dummyssh" ssh://user@dummy/local | |
86 |
|
86 | |||
87 | echo "# push" |
|
87 | echo "# push" | |
88 | hg push |
|
88 | hg push | |
89 |
|
89 | |||
90 | cd ../remote |
|
90 | cd ../remote | |
91 |
|
91 | |||
92 | echo "# check remote tip" |
|
92 | echo "# check remote tip" | |
93 | hg tip |
|
93 | hg tip | |
94 | hg verify |
|
94 | hg verify | |
95 | hg cat -r tip foo |
|
95 | hg cat -r tip foo | |
96 |
|
96 | |||
97 | echo z > z |
|
97 | echo z > z | |
98 |
hg ci -A -m z |
|
98 | hg ci -A -m z z | |
99 | # a bad, evil hook that prints to stdout |
|
99 | # a bad, evil hook that prints to stdout | |
100 | echo 'changegroup.stdout = python ../badhook' >> .hg/hgrc |
|
100 | echo 'changegroup.stdout = python ../badhook' >> .hg/hgrc | |
101 |
|
101 | |||
102 | cd ../local |
|
102 | cd ../local | |
103 | echo r > r |
|
103 | echo r > r | |
104 |
hg ci -A -m z |
|
104 | hg ci -A -m z r | |
105 |
|
105 | |||
106 | echo "# push should succeed even though it has an unexpected response" |
|
106 | echo "# push should succeed even though it has an unexpected response" | |
107 | hg push |
|
107 | hg push | |
108 | hg -R ../remote heads |
|
108 | hg -R ../remote heads | |
109 |
|
109 | |||
110 | cd .. |
|
110 | cd .. | |
111 | cat dummylog |
|
111 | cat dummylog |
@@ -1,107 +1,107 b'' | |||||
1 | # creating 'remote' |
|
1 | # creating 'remote' | |
2 | # repo not found error |
|
2 | # repo not found error | |
3 | remote: abort: There is no Mercurial repository here (.hg not found)! |
|
3 | remote: abort: There is no Mercurial repository here (.hg not found)! | |
4 | abort: no suitable response from remote hg! |
|
4 | abort: no suitable response from remote hg! | |
5 | # clone remote via stream |
|
5 | # clone remote via stream | |
6 | streaming all changes |
|
6 | streaming all changes | |
7 | XXX files to transfer, XXX bytes of data |
|
7 | XXX files to transfer, XXX bytes of data | |
8 | transferred XXX bytes in XXX seconds (XXX XB/sec) |
|
8 | transferred XXX bytes in XXX seconds (XXX XB/sec) | |
9 | updating to branch default |
|
9 | updating to branch default | |
10 | XXX files updated, XXX files merged, XXX files removed, XXX files unresolved |
|
10 | XXX files updated, XXX files merged, XXX files removed, XXX files unresolved | |
11 | checking changesets |
|
11 | checking changesets | |
12 | checking manifests |
|
12 | checking manifests | |
13 | crosschecking files in changesets and manifests |
|
13 | crosschecking files in changesets and manifests | |
14 | checking files |
|
14 | checking files | |
15 | 2 files, 1 changesets, 2 total revisions |
|
15 | 2 files, 1 changesets, 2 total revisions | |
16 | # clone remote via pull |
|
16 | # clone remote via pull | |
17 | requesting all changes |
|
17 | requesting all changes | |
18 | adding changesets |
|
18 | adding changesets | |
19 | adding manifests |
|
19 | adding manifests | |
20 | adding file changes |
|
20 | adding file changes | |
21 | added 1 changesets with 2 changes to 2 files |
|
21 | added 1 changesets with 2 changes to 2 files | |
22 | updating to branch default |
|
22 | updating to branch default | |
23 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
23 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
24 | # verify |
|
24 | # verify | |
25 | checking changesets |
|
25 | checking changesets | |
26 | checking manifests |
|
26 | checking manifests | |
27 | crosschecking files in changesets and manifests |
|
27 | crosschecking files in changesets and manifests | |
28 | checking files |
|
28 | checking files | |
29 | 2 files, 1 changesets, 2 total revisions |
|
29 | 2 files, 1 changesets, 2 total revisions | |
30 | # empty default pull |
|
30 | # empty default pull | |
31 | default = ssh://user@dummy/remote |
|
31 | default = ssh://user@dummy/remote | |
32 | pulling from ssh://user@dummy/remote |
|
32 | pulling from ssh://user@dummy/remote | |
33 | searching for changes |
|
33 | searching for changes | |
34 | no changes found |
|
34 | no changes found | |
35 | # local change |
|
35 | # local change | |
36 | # updating rc |
|
36 | # updating rc | |
37 | # find outgoing |
|
37 | # find outgoing | |
38 | comparing with ssh://user@dummy/remote |
|
38 | comparing with ssh://user@dummy/remote | |
39 | searching for changes |
|
39 | searching for changes | |
40 |
changeset: 1: |
|
40 | changeset: 1:a28a9d1a809c | |
41 | tag: tip |
|
41 | tag: tip | |
42 | user: test |
|
42 | user: test | |
43 |
date: |
|
43 | date: Thu Jan 01 00:00:00 1970 +0000 | |
44 | summary: add |
|
44 | summary: add | |
45 |
|
45 | |||
46 | # find incoming on the remote side |
|
46 | # find incoming on the remote side | |
47 | comparing with ssh://user@dummy/local |
|
47 | comparing with ssh://user@dummy/local | |
48 | searching for changes |
|
48 | searching for changes | |
49 |
changeset: 1: |
|
49 | changeset: 1:a28a9d1a809c | |
50 | tag: tip |
|
50 | tag: tip | |
51 | user: test |
|
51 | user: test | |
52 |
date: |
|
52 | date: Thu Jan 01 00:00:00 1970 +0000 | |
53 | summary: add |
|
53 | summary: add | |
54 |
|
54 | |||
55 | # push |
|
55 | # push | |
56 | pushing to ssh://user@dummy/remote |
|
56 | pushing to ssh://user@dummy/remote | |
57 | searching for changes |
|
57 | searching for changes | |
58 | remote: adding changesets |
|
58 | remote: adding changesets | |
59 | remote: adding manifests |
|
59 | remote: adding manifests | |
60 | remote: adding file changes |
|
60 | remote: adding file changes | |
61 | remote: added 1 changesets with 1 changes to 1 files |
|
61 | remote: added 1 changesets with 1 changes to 1 files | |
62 | # check remote tip |
|
62 | # check remote tip | |
63 |
changeset: 1: |
|
63 | changeset: 1:a28a9d1a809c | |
64 | tag: tip |
|
64 | tag: tip | |
65 | user: test |
|
65 | user: test | |
66 |
date: |
|
66 | date: Thu Jan 01 00:00:00 1970 +0000 | |
67 | summary: add |
|
67 | summary: add | |
68 |
|
68 | |||
69 | checking changesets |
|
69 | checking changesets | |
70 | checking manifests |
|
70 | checking manifests | |
71 | crosschecking files in changesets and manifests |
|
71 | crosschecking files in changesets and manifests | |
72 | checking files |
|
72 | checking files | |
73 | 2 files, 2 changesets, 3 total revisions |
|
73 | 2 files, 2 changesets, 3 total revisions | |
74 | bleah |
|
74 | bleah | |
75 | created new head |
|
75 | created new head | |
76 | # push should succeed even though it has an unexpected response |
|
76 | # push should succeed even though it has an unexpected response | |
77 | pushing to ssh://user@dummy/remote |
|
77 | pushing to ssh://user@dummy/remote | |
78 | searching for changes |
|
78 | searching for changes | |
79 | note: unsynced remote changes! |
|
79 | note: unsynced remote changes! | |
80 | remote: adding changesets |
|
80 | remote: adding changesets | |
81 | remote: adding manifests |
|
81 | remote: adding manifests | |
82 | remote: adding file changes |
|
82 | remote: adding file changes | |
83 | remote: added 1 changesets with 1 changes to 1 files |
|
83 | remote: added 1 changesets with 1 changes to 1 files | |
84 | remote: KABOOM |
|
84 | remote: KABOOM | |
85 |
changeset: 3: |
|
85 | changeset: 3:1383141674ec | |
86 | tag: tip |
|
86 | tag: tip | |
87 |
parent: 1: |
|
87 | parent: 1:a28a9d1a809c | |
88 | user: test |
|
88 | user: test | |
89 |
date: |
|
89 | date: Thu Jan 01 00:00:00 1970 +0000 | |
90 | summary: z |
|
90 | summary: z | |
91 |
|
91 | |||
92 |
changeset: 2: |
|
92 | changeset: 2:6c0482d977a3 | |
93 |
parent: 0: |
|
93 | parent: 0:1160648e36ce | |
94 | user: test |
|
94 | user: test | |
95 |
date: |
|
95 | date: Thu Jan 01 00:00:00 1970 +0000 | |
96 | summary: z |
|
96 | summary: z | |
97 |
|
97 | |||
98 | Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio |
|
98 | Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio | |
99 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
99 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
100 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
100 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
101 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
101 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
102 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
102 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
103 | Got arguments 1:user@dummy 2:hg -R local serve --stdio |
|
103 | Got arguments 1:user@dummy 2:hg -R local serve --stdio | |
104 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
104 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
105 |
changegroup-in-remote hook: HG_NODE= |
|
105 | changegroup-in-remote hook: HG_NODE=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 HG_SOURCE=serve HG_URL=remote:ssh:127.0.0.1 | |
106 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
106 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
107 |
changegroup-in-remote hook: HG_NODE= |
|
107 | changegroup-in-remote hook: HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 HG_SOURCE=serve HG_URL=remote:ssh:127.0.0.1 |
@@ -1,93 +1,93 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | cp "$TESTDIR"/printenv.py . |
|
3 | cp "$TESTDIR"/printenv.py . | |
4 |
|
4 | |||
5 | hg clone http://localhost:$HGPORT/ copy |
|
5 | hg clone http://localhost:$HGPORT/ copy | |
6 | echo $? |
|
6 | echo $? | |
7 | test -d copy || echo copy: No such file or directory |
|
7 | test -d copy || echo copy: No such file or directory | |
8 |
|
8 | |||
9 | # This server doesn't do range requests so it's basically only good for |
|
9 | # This server doesn't do range requests so it's basically only good for | |
10 | # one pull |
|
10 | # one pull | |
11 | cat > dumb.py <<EOF |
|
11 | cat > dumb.py <<EOF | |
12 | import BaseHTTPServer, SimpleHTTPServer, os, signal |
|
12 | import BaseHTTPServer, SimpleHTTPServer, os, signal | |
13 |
|
13 | |||
14 | def run(server_class=BaseHTTPServer.HTTPServer, |
|
14 | def run(server_class=BaseHTTPServer.HTTPServer, | |
15 | handler_class=SimpleHTTPServer.SimpleHTTPRequestHandler): |
|
15 | handler_class=SimpleHTTPServer.SimpleHTTPRequestHandler): | |
16 | server_address = ('localhost', int(os.environ['HGPORT'])) |
|
16 | server_address = ('localhost', int(os.environ['HGPORT'])) | |
17 | httpd = server_class(server_address, handler_class) |
|
17 | httpd = server_class(server_address, handler_class) | |
18 | httpd.serve_forever() |
|
18 | httpd.serve_forever() | |
19 |
|
19 | |||
20 | signal.signal(signal.SIGTERM, lambda x: sys.exit(0)) |
|
20 | signal.signal(signal.SIGTERM, lambda x: sys.exit(0)) | |
21 | run() |
|
21 | run() | |
22 | EOF |
|
22 | EOF | |
23 |
|
23 | |||
24 | python dumb.py 2>/dev/null & |
|
24 | python dumb.py 2>/dev/null & | |
25 | echo $! >> $DAEMON_PIDS |
|
25 | echo $! >> $DAEMON_PIDS | |
26 |
|
26 | |||
27 | mkdir remote |
|
27 | mkdir remote | |
28 | cd remote |
|
28 | cd remote | |
29 | hg init |
|
29 | hg init | |
30 | echo foo > bar |
|
30 | echo foo > bar | |
31 | hg add bar |
|
31 | hg add bar | |
32 |
hg commit -m"test" |
|
32 | hg commit -m"test" | |
33 | hg tip |
|
33 | hg tip | |
34 |
|
34 | |||
35 | cd .. |
|
35 | cd .. | |
36 |
|
36 | |||
37 | hg clone static-http://localhost:$HGPORT/remote local | sed -e "s,:$HGPORT/,:\$HGPORT/," |
|
37 | hg clone static-http://localhost:$HGPORT/remote local | sed -e "s,:$HGPORT/,:\$HGPORT/," | |
38 |
|
38 | |||
39 | cd local |
|
39 | cd local | |
40 | hg verify |
|
40 | hg verify | |
41 | cat bar |
|
41 | cat bar | |
42 |
|
42 | |||
43 | cd ../remote |
|
43 | cd ../remote | |
44 | echo baz > quux |
|
44 | echo baz > quux | |
45 |
hg commit -A -mtest2 |
|
45 | hg commit -A -mtest2 | |
46 | # check for HTTP opener failures when cachefile does not exist |
|
46 | # check for HTTP opener failures when cachefile does not exist | |
47 | rm .hg/*.cache |
|
47 | rm .hg/*.cache | |
48 |
|
48 | |||
49 | cd ../local |
|
49 | cd ../local | |
50 | echo '[hooks]' >> .hg/hgrc |
|
50 | echo '[hooks]' >> .hg/hgrc | |
51 | echo 'changegroup = python ../printenv.py changegroup' >> .hg/hgrc |
|
51 | echo 'changegroup = python ../printenv.py changegroup' >> .hg/hgrc | |
52 | hg pull | sed -e "s,:$HGPORT/,:\$HGPORT/," |
|
52 | hg pull | sed -e "s,:$HGPORT/,:\$HGPORT/," | |
53 |
|
53 | |||
54 | echo '% trying to push' |
|
54 | echo '% trying to push' | |
55 | hg update |
|
55 | hg update | |
56 | echo more foo >> bar |
|
56 | echo more foo >> bar | |
57 |
hg commit -m"test" |
|
57 | hg commit -m"test" | |
58 | hg push | sed -e "s,:$HGPORT/,:\$HGPORT/," |
|
58 | hg push | sed -e "s,:$HGPORT/,:\$HGPORT/," | |
59 |
|
59 | |||
60 | echo '% trying clone -r' |
|
60 | echo '% trying clone -r' | |
61 | cd .. |
|
61 | cd .. | |
62 | hg clone -r donotexist static-http://localhost:$HGPORT/remote local0 | sed -e "s,:$HGPORT/,:\$HGPORT/," |
|
62 | hg clone -r donotexist static-http://localhost:$HGPORT/remote local0 | sed -e "s,:$HGPORT/,:\$HGPORT/," | |
63 | hg clone -r 0 static-http://localhost:$HGPORT/remote local0 | sed -e "s,:$HGPORT/,:\$HGPORT/," |
|
63 | hg clone -r 0 static-http://localhost:$HGPORT/remote local0 | sed -e "s,:$HGPORT/,:\$HGPORT/," | |
64 |
|
64 | |||
65 | echo '% test with "/" URI (issue 747)' |
|
65 | echo '% test with "/" URI (issue 747)' | |
66 | hg init |
|
66 | hg init | |
67 | echo a > a |
|
67 | echo a > a | |
68 | hg add a |
|
68 | hg add a | |
69 | hg ci -ma |
|
69 | hg ci -ma | |
70 |
|
70 | |||
71 | hg clone static-http://localhost:$HGPORT/ local2 | sed -e "s,:$HGPORT/,:\$HGPORT/," |
|
71 | hg clone static-http://localhost:$HGPORT/ local2 | sed -e "s,:$HGPORT/,:\$HGPORT/," | |
72 |
|
72 | |||
73 | cd local2 |
|
73 | cd local2 | |
74 | hg verify |
|
74 | hg verify | |
75 | cat a |
|
75 | cat a | |
76 | hg paths | sed -e "s,:$HGPORT/,:\$HGPORT/," |
|
76 | hg paths | sed -e "s,:$HGPORT/,:\$HGPORT/," | |
77 |
|
77 | |||
78 | echo '% test with empty repo (issue965)' |
|
78 | echo '% test with empty repo (issue965)' | |
79 | cd .. |
|
79 | cd .. | |
80 | hg init remotempty |
|
80 | hg init remotempty | |
81 |
|
81 | |||
82 | hg clone static-http://localhost:$HGPORT/remotempty local3 | sed -e "s,:$HGPORT/,:\$HGPORT/," |
|
82 | hg clone static-http://localhost:$HGPORT/remotempty local3 | sed -e "s,:$HGPORT/,:\$HGPORT/," | |
83 |
|
83 | |||
84 | cd local3 |
|
84 | cd local3 | |
85 | hg verify |
|
85 | hg verify | |
86 | hg paths | sed -e "s,:$HGPORT/,:\$HGPORT/," |
|
86 | hg paths | sed -e "s,:$HGPORT/,:\$HGPORT/," | |
87 |
|
87 | |||
88 | echo '% test with non-repo' |
|
88 | echo '% test with non-repo' | |
89 | cd .. |
|
89 | cd .. | |
90 | mkdir notarepo |
|
90 | mkdir notarepo | |
91 | hg clone static-http://localhost:$HGPORT/notarepo local3 2>&1 | sed -e "s,:$HGPORT/,:\$HGPORT/," |
|
91 | hg clone static-http://localhost:$HGPORT/notarepo local3 2>&1 | sed -e "s,:$HGPORT/,:\$HGPORT/," | |
92 |
|
92 | |||
93 | kill $! |
|
93 | kill $! |
@@ -1,71 +1,71 b'' | |||||
1 | abort: error: Connection refused |
|
1 | abort: error: Connection refused | |
2 | 255 |
|
2 | 255 | |
3 | copy: No such file or directory |
|
3 | copy: No such file or directory | |
4 |
changeset: 0: |
|
4 | changeset: 0:61c9426e69fe | |
5 | tag: tip |
|
5 | tag: tip | |
6 | user: test |
|
6 | user: test | |
7 |
date: |
|
7 | date: Thu Jan 01 00:00:00 1970 +0000 | |
8 | summary: test |
|
8 | summary: test | |
9 |
|
9 | |||
10 | requesting all changes |
|
10 | requesting all changes | |
11 | adding changesets |
|
11 | adding changesets | |
12 | adding manifests |
|
12 | adding manifests | |
13 | adding file changes |
|
13 | adding file changes | |
14 | added 1 changesets with 1 changes to 1 files |
|
14 | added 1 changesets with 1 changes to 1 files | |
15 | updating to branch default |
|
15 | updating to branch default | |
16 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
16 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
17 | checking changesets |
|
17 | checking changesets | |
18 | checking manifests |
|
18 | checking manifests | |
19 | crosschecking files in changesets and manifests |
|
19 | crosschecking files in changesets and manifests | |
20 | checking files |
|
20 | checking files | |
21 | 1 files, 1 changesets, 1 total revisions |
|
21 | 1 files, 1 changesets, 1 total revisions | |
22 | foo |
|
22 | foo | |
23 | adding quux |
|
23 | adding quux | |
24 |
changegroup hook: HG_NODE= |
|
24 | changegroup hook: HG_NODE=822d6e31f08b9d6e3b898ce5e52efc0a4bf4905a HG_SOURCE=pull HG_URL=http://localhost:$HGPORT/remote | |
25 | pulling from static-http://localhost:$HGPORT/remote |
|
25 | pulling from static-http://localhost:$HGPORT/remote | |
26 | searching for changes |
|
26 | searching for changes | |
27 | adding changesets |
|
27 | adding changesets | |
28 | adding manifests |
|
28 | adding manifests | |
29 | adding file changes |
|
29 | adding file changes | |
30 | added 1 changesets with 1 changes to 1 files |
|
30 | added 1 changesets with 1 changes to 1 files | |
31 | (run 'hg update' to get a working copy) |
|
31 | (run 'hg update' to get a working copy) | |
32 | % trying to push |
|
32 | % trying to push | |
33 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
33 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
34 | abort: cannot lock static-http repository |
|
34 | abort: cannot lock static-http repository | |
35 | pushing to static-http://localhost:$HGPORT/remote |
|
35 | pushing to static-http://localhost:$HGPORT/remote | |
36 | % trying clone -r |
|
36 | % trying clone -r | |
37 | abort: unknown revision 'donotexist'! |
|
37 | abort: unknown revision 'donotexist'! | |
38 | requesting all changes |
|
38 | requesting all changes | |
39 | adding changesets |
|
39 | adding changesets | |
40 | adding manifests |
|
40 | adding manifests | |
41 | adding file changes |
|
41 | adding file changes | |
42 | added 1 changesets with 1 changes to 1 files |
|
42 | added 1 changesets with 1 changes to 1 files | |
43 | updating to branch default |
|
43 | updating to branch default | |
44 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
44 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
45 | % test with "/" URI (issue 747) |
|
45 | % test with "/" URI (issue 747) | |
46 | requesting all changes |
|
46 | requesting all changes | |
47 | adding changesets |
|
47 | adding changesets | |
48 | adding manifests |
|
48 | adding manifests | |
49 | adding file changes |
|
49 | adding file changes | |
50 | added 1 changesets with 1 changes to 1 files |
|
50 | added 1 changesets with 1 changes to 1 files | |
51 | updating to branch default |
|
51 | updating to branch default | |
52 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
52 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
53 | checking changesets |
|
53 | checking changesets | |
54 | checking manifests |
|
54 | checking manifests | |
55 | crosschecking files in changesets and manifests |
|
55 | crosschecking files in changesets and manifests | |
56 | checking files |
|
56 | checking files | |
57 | 1 files, 1 changesets, 1 total revisions |
|
57 | 1 files, 1 changesets, 1 total revisions | |
58 | a |
|
58 | a | |
59 | default = static-http://localhost:$HGPORT/ |
|
59 | default = static-http://localhost:$HGPORT/ | |
60 | % test with empty repo (issue965) |
|
60 | % test with empty repo (issue965) | |
61 | no changes found |
|
61 | no changes found | |
62 | updating to branch default |
|
62 | updating to branch default | |
63 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
63 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
64 | checking changesets |
|
64 | checking changesets | |
65 | checking manifests |
|
65 | checking manifests | |
66 | crosschecking files in changesets and manifests |
|
66 | crosschecking files in changesets and manifests | |
67 | checking files |
|
67 | checking files | |
68 | 0 files, 0 changesets, 0 total revisions |
|
68 | 0 files, 0 changesets, 0 total revisions | |
69 | default = static-http://localhost:$HGPORT/remotempty |
|
69 | default = static-http://localhost:$HGPORT/remotempty | |
70 | % test with non-repo |
|
70 | % test with non-repo | |
71 | abort: 'http://localhost:$HGPORT/notarepo' does not appear to be an hg repository! |
|
71 | abort: 'http://localhost:$HGPORT/notarepo' does not appear to be an hg repository! |
@@ -1,277 +1,277 b'' | |||||
1 | $ echo "[extensions]" >> $HGRCPATH |
|
1 | $ echo "[extensions]" >> $HGRCPATH | |
2 | $ echo "color=" >> $HGRCPATH |
|
2 | $ echo "color=" >> $HGRCPATH | |
3 | $ echo "[color]" >> $HGRCPATH |
|
3 | $ echo "[color]" >> $HGRCPATH | |
4 | $ echo "mode=ansi" >> $HGRCPATH |
|
4 | $ echo "mode=ansi" >> $HGRCPATH | |
5 |
|
5 | |||
6 | $ hg init repo1 |
|
6 | $ hg init repo1 | |
7 | $ cd repo1 |
|
7 | $ cd repo1 | |
8 | $ mkdir a b a/1 b/1 b/2 |
|
8 | $ 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 |
|
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 | |
10 |
|
10 | |||
11 | hg status in repo root: |
|
11 | hg status in repo root: | |
12 |
|
12 | |||
13 | $ hg status --color=always |
|
13 | $ hg status --color=always | |
14 | [0;35;1;4m? a/1/in_a_1[0m |
|
14 | [0;35;1;4m? a/1/in_a_1[0m | |
15 | [0;35;1;4m? a/in_a[0m |
|
15 | [0;35;1;4m? a/in_a[0m | |
16 | [0;35;1;4m? b/1/in_b_1[0m |
|
16 | [0;35;1;4m? b/1/in_b_1[0m | |
17 | [0;35;1;4m? b/2/in_b_2[0m |
|
17 | [0;35;1;4m? b/2/in_b_2[0m | |
18 | [0;35;1;4m? b/in_b[0m |
|
18 | [0;35;1;4m? b/in_b[0m | |
19 | [0;35;1;4m? in_root[0m |
|
19 | [0;35;1;4m? in_root[0m | |
20 |
|
20 | |||
21 | hg status . in repo root: |
|
21 | hg status . in repo root: | |
22 |
|
22 | |||
23 | $ hg status --color=always . |
|
23 | $ hg status --color=always . | |
24 | [0;35;1;4m? a/1/in_a_1[0m |
|
24 | [0;35;1;4m? a/1/in_a_1[0m | |
25 | [0;35;1;4m? a/in_a[0m |
|
25 | [0;35;1;4m? a/in_a[0m | |
26 | [0;35;1;4m? b/1/in_b_1[0m |
|
26 | [0;35;1;4m? b/1/in_b_1[0m | |
27 | [0;35;1;4m? b/2/in_b_2[0m |
|
27 | [0;35;1;4m? b/2/in_b_2[0m | |
28 | [0;35;1;4m? b/in_b[0m |
|
28 | [0;35;1;4m? b/in_b[0m | |
29 | [0;35;1;4m? in_root[0m |
|
29 | [0;35;1;4m? in_root[0m | |
30 |
|
30 | |||
31 | $ hg status --color=always --cwd a |
|
31 | $ hg status --color=always --cwd a | |
32 | [0;35;1;4m? a/1/in_a_1[0m |
|
32 | [0;35;1;4m? a/1/in_a_1[0m | |
33 | [0;35;1;4m? a/in_a[0m |
|
33 | [0;35;1;4m? a/in_a[0m | |
34 | [0;35;1;4m? b/1/in_b_1[0m |
|
34 | [0;35;1;4m? b/1/in_b_1[0m | |
35 | [0;35;1;4m? b/2/in_b_2[0m |
|
35 | [0;35;1;4m? b/2/in_b_2[0m | |
36 | [0;35;1;4m? b/in_b[0m |
|
36 | [0;35;1;4m? b/in_b[0m | |
37 | [0;35;1;4m? in_root[0m |
|
37 | [0;35;1;4m? in_root[0m | |
38 | $ hg status --color=always --cwd a . |
|
38 | $ hg status --color=always --cwd a . | |
39 | [0;35;1;4m? 1/in_a_1[0m |
|
39 | [0;35;1;4m? 1/in_a_1[0m | |
40 | [0;35;1;4m? in_a[0m |
|
40 | [0;35;1;4m? in_a[0m | |
41 | $ hg status --color=always --cwd a .. |
|
41 | $ hg status --color=always --cwd a .. | |
42 | [0;35;1;4m? 1/in_a_1[0m |
|
42 | [0;35;1;4m? 1/in_a_1[0m | |
43 | [0;35;1;4m? in_a[0m |
|
43 | [0;35;1;4m? in_a[0m | |
44 | [0;35;1;4m? ../b/1/in_b_1[0m |
|
44 | [0;35;1;4m? ../b/1/in_b_1[0m | |
45 | [0;35;1;4m? ../b/2/in_b_2[0m |
|
45 | [0;35;1;4m? ../b/2/in_b_2[0m | |
46 | [0;35;1;4m? ../b/in_b[0m |
|
46 | [0;35;1;4m? ../b/in_b[0m | |
47 | [0;35;1;4m? ../in_root[0m |
|
47 | [0;35;1;4m? ../in_root[0m | |
48 |
|
48 | |||
49 | $ hg status --color=always --cwd b |
|
49 | $ hg status --color=always --cwd b | |
50 | [0;35;1;4m? a/1/in_a_1[0m |
|
50 | [0;35;1;4m? a/1/in_a_1[0m | |
51 | [0;35;1;4m? a/in_a[0m |
|
51 | [0;35;1;4m? a/in_a[0m | |
52 | [0;35;1;4m? b/1/in_b_1[0m |
|
52 | [0;35;1;4m? b/1/in_b_1[0m | |
53 | [0;35;1;4m? b/2/in_b_2[0m |
|
53 | [0;35;1;4m? b/2/in_b_2[0m | |
54 | [0;35;1;4m? b/in_b[0m |
|
54 | [0;35;1;4m? b/in_b[0m | |
55 | [0;35;1;4m? in_root[0m |
|
55 | [0;35;1;4m? in_root[0m | |
56 | $ hg status --color=always --cwd b . |
|
56 | $ hg status --color=always --cwd b . | |
57 | [0;35;1;4m? 1/in_b_1[0m |
|
57 | [0;35;1;4m? 1/in_b_1[0m | |
58 | [0;35;1;4m? 2/in_b_2[0m |
|
58 | [0;35;1;4m? 2/in_b_2[0m | |
59 | [0;35;1;4m? in_b[0m |
|
59 | [0;35;1;4m? in_b[0m | |
60 | $ hg status --color=always --cwd b .. |
|
60 | $ hg status --color=always --cwd b .. | |
61 | [0;35;1;4m? ../a/1/in_a_1[0m |
|
61 | [0;35;1;4m? ../a/1/in_a_1[0m | |
62 | [0;35;1;4m? ../a/in_a[0m |
|
62 | [0;35;1;4m? ../a/in_a[0m | |
63 | [0;35;1;4m? 1/in_b_1[0m |
|
63 | [0;35;1;4m? 1/in_b_1[0m | |
64 | [0;35;1;4m? 2/in_b_2[0m |
|
64 | [0;35;1;4m? 2/in_b_2[0m | |
65 | [0;35;1;4m? in_b[0m |
|
65 | [0;35;1;4m? in_b[0m | |
66 | [0;35;1;4m? ../in_root[0m |
|
66 | [0;35;1;4m? ../in_root[0m | |
67 |
|
67 | |||
68 | $ hg status --color=always --cwd a/1 |
|
68 | $ hg status --color=always --cwd a/1 | |
69 | [0;35;1;4m? a/1/in_a_1[0m |
|
69 | [0;35;1;4m? a/1/in_a_1[0m | |
70 | [0;35;1;4m? a/in_a[0m |
|
70 | [0;35;1;4m? a/in_a[0m | |
71 | [0;35;1;4m? b/1/in_b_1[0m |
|
71 | [0;35;1;4m? b/1/in_b_1[0m | |
72 | [0;35;1;4m? b/2/in_b_2[0m |
|
72 | [0;35;1;4m? b/2/in_b_2[0m | |
73 | [0;35;1;4m? b/in_b[0m |
|
73 | [0;35;1;4m? b/in_b[0m | |
74 | [0;35;1;4m? in_root[0m |
|
74 | [0;35;1;4m? in_root[0m | |
75 | $ hg status --color=always --cwd a/1 . |
|
75 | $ hg status --color=always --cwd a/1 . | |
76 | [0;35;1;4m? in_a_1[0m |
|
76 | [0;35;1;4m? in_a_1[0m | |
77 | $ hg status --color=always --cwd a/1 .. |
|
77 | $ hg status --color=always --cwd a/1 .. | |
78 | [0;35;1;4m? in_a_1[0m |
|
78 | [0;35;1;4m? in_a_1[0m | |
79 | [0;35;1;4m? ../in_a[0m |
|
79 | [0;35;1;4m? ../in_a[0m | |
80 |
|
80 | |||
81 | $ hg status --color=always --cwd b/1 |
|
81 | $ hg status --color=always --cwd b/1 | |
82 | [0;35;1;4m? a/1/in_a_1[0m |
|
82 | [0;35;1;4m? a/1/in_a_1[0m | |
83 | [0;35;1;4m? a/in_a[0m |
|
83 | [0;35;1;4m? a/in_a[0m | |
84 | [0;35;1;4m? b/1/in_b_1[0m |
|
84 | [0;35;1;4m? b/1/in_b_1[0m | |
85 | [0;35;1;4m? b/2/in_b_2[0m |
|
85 | [0;35;1;4m? b/2/in_b_2[0m | |
86 | [0;35;1;4m? b/in_b[0m |
|
86 | [0;35;1;4m? b/in_b[0m | |
87 | [0;35;1;4m? in_root[0m |
|
87 | [0;35;1;4m? in_root[0m | |
88 | $ hg status --color=always --cwd b/1 . |
|
88 | $ hg status --color=always --cwd b/1 . | |
89 | [0;35;1;4m? in_b_1[0m |
|
89 | [0;35;1;4m? in_b_1[0m | |
90 | $ hg status --color=always --cwd b/1 .. |
|
90 | $ hg status --color=always --cwd b/1 .. | |
91 | [0;35;1;4m? in_b_1[0m |
|
91 | [0;35;1;4m? in_b_1[0m | |
92 | [0;35;1;4m? ../2/in_b_2[0m |
|
92 | [0;35;1;4m? ../2/in_b_2[0m | |
93 | [0;35;1;4m? ../in_b[0m |
|
93 | [0;35;1;4m? ../in_b[0m | |
94 |
|
94 | |||
95 | $ hg status --color=always --cwd b/2 |
|
95 | $ hg status --color=always --cwd b/2 | |
96 | [0;35;1;4m? a/1/in_a_1[0m |
|
96 | [0;35;1;4m? a/1/in_a_1[0m | |
97 | [0;35;1;4m? a/in_a[0m |
|
97 | [0;35;1;4m? a/in_a[0m | |
98 | [0;35;1;4m? b/1/in_b_1[0m |
|
98 | [0;35;1;4m? b/1/in_b_1[0m | |
99 | [0;35;1;4m? b/2/in_b_2[0m |
|
99 | [0;35;1;4m? b/2/in_b_2[0m | |
100 | [0;35;1;4m? b/in_b[0m |
|
100 | [0;35;1;4m? b/in_b[0m | |
101 | [0;35;1;4m? in_root[0m |
|
101 | [0;35;1;4m? in_root[0m | |
102 | $ hg status --color=always --cwd b/2 . |
|
102 | $ hg status --color=always --cwd b/2 . | |
103 | [0;35;1;4m? in_b_2[0m |
|
103 | [0;35;1;4m? in_b_2[0m | |
104 | $ hg status --color=always --cwd b/2 .. |
|
104 | $ hg status --color=always --cwd b/2 .. | |
105 | [0;35;1;4m? ../1/in_b_1[0m |
|
105 | [0;35;1;4m? ../1/in_b_1[0m | |
106 | [0;35;1;4m? in_b_2[0m |
|
106 | [0;35;1;4m? in_b_2[0m | |
107 | [0;35;1;4m? ../in_b[0m |
|
107 | [0;35;1;4m? ../in_b[0m | |
108 | $ cd .. |
|
108 | $ cd .. | |
109 |
|
109 | |||
110 | $ hg init repo2 |
|
110 | $ hg init repo2 | |
111 | $ cd repo2 |
|
111 | $ cd repo2 | |
112 | $ touch modified removed deleted ignored |
|
112 | $ touch modified removed deleted ignored | |
113 | $ echo "^ignored$" > .hgignore |
|
113 | $ echo "^ignored$" > .hgignore | |
114 |
$ hg ci -A -m 'initial checkin' |
|
114 | $ hg ci -A -m 'initial checkin' | |
115 | adding .hgignore |
|
115 | adding .hgignore | |
116 | adding deleted |
|
116 | adding deleted | |
117 | adding modified |
|
117 | adding modified | |
118 | adding removed |
|
118 | adding removed | |
119 | $ touch modified added unknown ignored |
|
119 | $ touch modified added unknown ignored | |
120 | $ hg add added |
|
120 | $ hg add added | |
121 | $ hg remove removed |
|
121 | $ hg remove removed | |
122 | $ rm deleted |
|
122 | $ rm deleted | |
123 |
|
123 | |||
124 | hg status: |
|
124 | hg status: | |
125 |
|
125 | |||
126 | $ hg status --color=always |
|
126 | $ hg status --color=always | |
127 | [0;32;1mA added[0m |
|
127 | [0;32;1mA added[0m | |
128 | [0;31;1mR removed[0m |
|
128 | [0;31;1mR removed[0m | |
129 | [0;36;1;4m! deleted[0m |
|
129 | [0;36;1;4m! deleted[0m | |
130 | [0;35;1;4m? unknown[0m |
|
130 | [0;35;1;4m? unknown[0m | |
131 |
|
131 | |||
132 | hg status modified added removed deleted unknown never-existed ignored: |
|
132 | hg status modified added removed deleted unknown never-existed ignored: | |
133 |
|
133 | |||
134 | $ hg status --color=always modified added removed deleted unknown never-existed ignored |
|
134 | $ hg status --color=always modified added removed deleted unknown never-existed ignored | |
135 | never-existed: No such file or directory |
|
135 | never-existed: No such file or directory | |
136 | [0;32;1mA added[0m |
|
136 | [0;32;1mA added[0m | |
137 | [0;31;1mR removed[0m |
|
137 | [0;31;1mR removed[0m | |
138 | [0;36;1;4m! deleted[0m |
|
138 | [0;36;1;4m! deleted[0m | |
139 | [0;35;1;4m? unknown[0m |
|
139 | [0;35;1;4m? unknown[0m | |
140 |
|
140 | |||
141 | $ hg copy modified copied |
|
141 | $ hg copy modified copied | |
142 |
|
142 | |||
143 | hg status -C: |
|
143 | hg status -C: | |
144 |
|
144 | |||
145 | $ hg status --color=always -C |
|
145 | $ hg status --color=always -C | |
146 | [0;32;1mA added[0m |
|
146 | [0;32;1mA added[0m | |
147 | [0;32;1mA copied[0m |
|
147 | [0;32;1mA copied[0m | |
148 | [0;0m modified[0m |
|
148 | [0;0m modified[0m | |
149 | [0;31;1mR removed[0m |
|
149 | [0;31;1mR removed[0m | |
150 | [0;36;1;4m! deleted[0m |
|
150 | [0;36;1;4m! deleted[0m | |
151 | [0;35;1;4m? unknown[0m |
|
151 | [0;35;1;4m? unknown[0m | |
152 |
|
152 | |||
153 | hg status -A: |
|
153 | hg status -A: | |
154 |
|
154 | |||
155 | $ hg status --color=always -A |
|
155 | $ hg status --color=always -A | |
156 | [0;32;1mA added[0m |
|
156 | [0;32;1mA added[0m | |
157 | [0;32;1mA copied[0m |
|
157 | [0;32;1mA copied[0m | |
158 | [0;0m modified[0m |
|
158 | [0;0m modified[0m | |
159 | [0;31;1mR removed[0m |
|
159 | [0;31;1mR removed[0m | |
160 | [0;36;1;4m! deleted[0m |
|
160 | [0;36;1;4m! deleted[0m | |
161 | [0;35;1;4m? unknown[0m |
|
161 | [0;35;1;4m? unknown[0m | |
162 | [0;30;1mI ignored[0m |
|
162 | [0;30;1mI ignored[0m | |
163 | [0;0mC .hgignore[0m |
|
163 | [0;0mC .hgignore[0m | |
164 | [0;0mC modified[0m |
|
164 | [0;0mC modified[0m | |
165 |
|
165 | |||
166 |
|
166 | |||
167 | $ echo "^ignoreddir$" > .hgignore |
|
167 | $ echo "^ignoreddir$" > .hgignore | |
168 | $ mkdir ignoreddir |
|
168 | $ mkdir ignoreddir | |
169 | $ touch ignoreddir/file |
|
169 | $ touch ignoreddir/file | |
170 |
|
170 | |||
171 | hg status ignoreddir/file: |
|
171 | hg status ignoreddir/file: | |
172 |
|
172 | |||
173 | $ hg status --color=always ignoreddir/file |
|
173 | $ hg status --color=always ignoreddir/file | |
174 |
|
174 | |||
175 | hg status -i ignoreddir/file: |
|
175 | hg status -i ignoreddir/file: | |
176 |
|
176 | |||
177 | $ hg status --color=always -i ignoreddir/file |
|
177 | $ hg status --color=always -i ignoreddir/file | |
178 | [0;30;1mI ignoreddir/file[0m |
|
178 | [0;30;1mI ignoreddir/file[0m | |
179 | $ cd .. |
|
179 | $ cd .. | |
180 |
|
180 | |||
181 | # check 'status -q' and some combinations |
|
181 | # check 'status -q' and some combinations | |
182 |
|
182 | |||
183 | $ hg init repo3 |
|
183 | $ hg init repo3 | |
184 | $ cd repo3 |
|
184 | $ cd repo3 | |
185 | $ touch modified removed deleted ignored |
|
185 | $ touch modified removed deleted ignored | |
186 | $ echo "^ignored$" > .hgignore |
|
186 | $ echo "^ignored$" > .hgignore | |
187 | $ hg commit -A -m 'initial checkin' |
|
187 | $ hg commit -A -m 'initial checkin' | |
188 | adding .hgignore |
|
188 | adding .hgignore | |
189 | adding deleted |
|
189 | adding deleted | |
190 | adding modified |
|
190 | adding modified | |
191 | adding removed |
|
191 | adding removed | |
192 | $ touch added unknown ignored |
|
192 | $ touch added unknown ignored | |
193 | $ hg add added |
|
193 | $ hg add added | |
194 | $ echo "test" >> modified |
|
194 | $ echo "test" >> modified | |
195 | $ hg remove removed |
|
195 | $ hg remove removed | |
196 | $ rm deleted |
|
196 | $ rm deleted | |
197 | $ hg copy modified copied |
|
197 | $ hg copy modified copied | |
198 |
|
198 | |||
199 | test unknown color |
|
199 | test unknown color | |
200 |
|
200 | |||
201 | $ hg --config color.status.modified=periwinkle status --color=always |
|
201 | $ hg --config color.status.modified=periwinkle status --color=always | |
202 | ignoring unknown color/effect 'periwinkle' (configured in color.status.modified) |
|
202 | ignoring unknown color/effect 'periwinkle' (configured in color.status.modified) | |
203 | M modified |
|
203 | M modified | |
204 | [0;32;1mA added[0m |
|
204 | [0;32;1mA added[0m | |
205 | [0;32;1mA copied[0m |
|
205 | [0;32;1mA copied[0m | |
206 | [0;31;1mR removed[0m |
|
206 | [0;31;1mR removed[0m | |
207 | [0;36;1;4m! deleted[0m |
|
207 | [0;36;1;4m! deleted[0m | |
208 | [0;35;1;4m? unknown[0m |
|
208 | [0;35;1;4m? unknown[0m | |
209 |
|
209 | |||
210 | # Run status with 2 different flags. |
|
210 | # Run status with 2 different flags. | |
211 | # Check if result is the same or different. |
|
211 | # Check if result is the same or different. | |
212 | # If result is not as expected, raise error |
|
212 | # If result is not as expected, raise error | |
213 | $ assert() { |
|
213 | $ assert() { | |
214 | > hg status --color=always $1 > ../a |
|
214 | > hg status --color=always $1 > ../a | |
215 | > hg status --color=always $2 > ../b |
|
215 | > hg status --color=always $2 > ../b | |
216 | > out=`diff ../a ../b` |
|
216 | > out=`diff ../a ../b` | |
217 | > if [ $? -ne 0 ]; then |
|
217 | > if [ $? -ne 0 ]; then | |
218 | > out=1 |
|
218 | > out=1 | |
219 | > else |
|
219 | > else | |
220 | > out=0 |
|
220 | > out=0 | |
221 | > fi |
|
221 | > fi | |
222 | > if [ $3 -eq 0 ]; then |
|
222 | > if [ $3 -eq 0 ]; then | |
223 | > df="same" |
|
223 | > df="same" | |
224 | > else |
|
224 | > else | |
225 | > df="different" |
|
225 | > df="different" | |
226 | > fi |
|
226 | > fi | |
227 | > if [ $out -ne $3 ]; then |
|
227 | > if [ $out -ne $3 ]; then | |
228 | > echo "Error on $1 and $2, should be $df." |
|
228 | > echo "Error on $1 and $2, should be $df." | |
229 | > fi |
|
229 | > fi | |
230 | > } |
|
230 | > } | |
231 |
|
231 | |||
232 | # assert flag1 flag2 [0-same | 1-different] |
|
232 | # assert flag1 flag2 [0-same | 1-different] | |
233 |
|
233 | |||
234 | $ assert "-q" "-mard" 0 |
|
234 | $ assert "-q" "-mard" 0 | |
235 | $ assert "-A" "-marduicC" 0 |
|
235 | $ assert "-A" "-marduicC" 0 | |
236 | $ assert "-qA" "-mardcC" 0 |
|
236 | $ assert "-qA" "-mardcC" 0 | |
237 | $ assert "-qAui" "-A" 0 |
|
237 | $ assert "-qAui" "-A" 0 | |
238 | $ assert "-qAu" "-marducC" 0 |
|
238 | $ assert "-qAu" "-marducC" 0 | |
239 | $ assert "-qAi" "-mardicC" 0 |
|
239 | $ assert "-qAi" "-mardicC" 0 | |
240 | $ assert "-qu" "-u" 0 |
|
240 | $ assert "-qu" "-u" 0 | |
241 | $ assert "-q" "-u" 1 |
|
241 | $ assert "-q" "-u" 1 | |
242 | $ assert "-m" "-a" 1 |
|
242 | $ assert "-m" "-a" 1 | |
243 | $ assert "-r" "-d" 1 |
|
243 | $ assert "-r" "-d" 1 | |
244 | $ cd .. |
|
244 | $ cd .. | |
245 |
|
245 | |||
246 | # test 'resolve -l' |
|
246 | # test 'resolve -l' | |
247 | $ hg init repo4 |
|
247 | $ hg init repo4 | |
248 | $ cd repo4 |
|
248 | $ cd repo4 | |
249 | $ echo "file a" > a |
|
249 | $ echo "file a" > a | |
250 | $ echo "file b" > b |
|
250 | $ echo "file b" > b | |
251 | $ hg add a b |
|
251 | $ hg add a b | |
252 | $ hg commit -m "initial" |
|
252 | $ hg commit -m "initial" | |
253 | $ echo "file a change 1" > a |
|
253 | $ echo "file a change 1" > a | |
254 | $ echo "file b change 1" > b |
|
254 | $ echo "file b change 1" > b | |
255 | $ hg commit -m "head 1" |
|
255 | $ hg commit -m "head 1" | |
256 | $ hg update 0 |
|
256 | $ hg update 0 | |
257 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
257 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
258 | $ echo "file a change 2" > a |
|
258 | $ echo "file a change 2" > a | |
259 | $ echo "file b change 2" > b |
|
259 | $ echo "file b change 2" > b | |
260 | $ hg commit -m "head 2" |
|
260 | $ hg commit -m "head 2" | |
261 | created new head |
|
261 | created new head | |
262 | $ hg merge |
|
262 | $ hg merge | |
263 | merging a |
|
263 | merging a | |
264 | warning: conflicts during merge. |
|
264 | warning: conflicts during merge. | |
265 | merging a failed! |
|
265 | merging a failed! | |
266 | merging b |
|
266 | merging b | |
267 | warning: conflicts during merge. |
|
267 | warning: conflicts during merge. | |
268 | merging b failed! |
|
268 | merging b failed! | |
269 | 0 files updated, 0 files merged, 0 files removed, 2 files unresolved |
|
269 | 0 files updated, 0 files merged, 0 files removed, 2 files unresolved | |
270 | use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon |
|
270 | use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon | |
271 | $ hg resolve -m b |
|
271 | $ hg resolve -m b | |
272 |
|
272 | |||
273 | hg resolve with one unresolved, one resolved: |
|
273 | hg resolve with one unresolved, one resolved: | |
274 |
|
274 | |||
275 | $ hg resolve --color=always -l |
|
275 | $ hg resolve --color=always -l | |
276 | [0;31;1mU a[0m |
|
276 | [0;31;1mU a[0m | |
277 | [0;32;1mR b[0m |
|
277 | [0;32;1mR b[0m |
@@ -1,275 +1,275 b'' | |||||
1 | $ hg init repo1 |
|
1 | $ hg init repo1 | |
2 | $ cd repo1 |
|
2 | $ cd repo1 | |
3 | $ mkdir a b a/1 b/1 b/2 |
|
3 | $ mkdir a b a/1 b/1 b/2 | |
4 | $ touch in_root a/in_a b/in_b a/1/in_a_1 b/1/in_b_1 b/2/in_b_2 |
|
4 | $ touch in_root a/in_a b/in_b a/1/in_a_1 b/1/in_b_1 b/2/in_b_2 | |
5 |
|
5 | |||
6 | hg status in repo root: |
|
6 | hg status in repo root: | |
7 |
|
7 | |||
8 | $ hg status |
|
8 | $ hg status | |
9 | ? a/1/in_a_1 |
|
9 | ? a/1/in_a_1 | |
10 | ? a/in_a |
|
10 | ? a/in_a | |
11 | ? b/1/in_b_1 |
|
11 | ? b/1/in_b_1 | |
12 | ? b/2/in_b_2 |
|
12 | ? b/2/in_b_2 | |
13 | ? b/in_b |
|
13 | ? b/in_b | |
14 | ? in_root |
|
14 | ? in_root | |
15 |
|
15 | |||
16 | hg status . in repo root: |
|
16 | hg status . in repo root: | |
17 |
|
17 | |||
18 | $ hg status . |
|
18 | $ hg status . | |
19 | ? a/1/in_a_1 |
|
19 | ? a/1/in_a_1 | |
20 | ? a/in_a |
|
20 | ? a/in_a | |
21 | ? b/1/in_b_1 |
|
21 | ? b/1/in_b_1 | |
22 | ? b/2/in_b_2 |
|
22 | ? b/2/in_b_2 | |
23 | ? b/in_b |
|
23 | ? b/in_b | |
24 | ? in_root |
|
24 | ? in_root | |
25 |
|
25 | |||
26 | $ hg status --cwd a |
|
26 | $ hg status --cwd a | |
27 | ? a/1/in_a_1 |
|
27 | ? a/1/in_a_1 | |
28 | ? a/in_a |
|
28 | ? a/in_a | |
29 | ? b/1/in_b_1 |
|
29 | ? b/1/in_b_1 | |
30 | ? b/2/in_b_2 |
|
30 | ? b/2/in_b_2 | |
31 | ? b/in_b |
|
31 | ? b/in_b | |
32 | ? in_root |
|
32 | ? in_root | |
33 | $ hg status --cwd a . |
|
33 | $ hg status --cwd a . | |
34 | ? 1/in_a_1 |
|
34 | ? 1/in_a_1 | |
35 | ? in_a |
|
35 | ? in_a | |
36 | $ hg status --cwd a .. |
|
36 | $ hg status --cwd a .. | |
37 | ? 1/in_a_1 |
|
37 | ? 1/in_a_1 | |
38 | ? in_a |
|
38 | ? in_a | |
39 | ? ../b/1/in_b_1 |
|
39 | ? ../b/1/in_b_1 | |
40 | ? ../b/2/in_b_2 |
|
40 | ? ../b/2/in_b_2 | |
41 | ? ../b/in_b |
|
41 | ? ../b/in_b | |
42 | ? ../in_root |
|
42 | ? ../in_root | |
43 |
|
43 | |||
44 | $ hg status --cwd b |
|
44 | $ hg status --cwd b | |
45 | ? a/1/in_a_1 |
|
45 | ? a/1/in_a_1 | |
46 | ? a/in_a |
|
46 | ? a/in_a | |
47 | ? b/1/in_b_1 |
|
47 | ? b/1/in_b_1 | |
48 | ? b/2/in_b_2 |
|
48 | ? b/2/in_b_2 | |
49 | ? b/in_b |
|
49 | ? b/in_b | |
50 | ? in_root |
|
50 | ? in_root | |
51 | $ hg status --cwd b . |
|
51 | $ hg status --cwd b . | |
52 | ? 1/in_b_1 |
|
52 | ? 1/in_b_1 | |
53 | ? 2/in_b_2 |
|
53 | ? 2/in_b_2 | |
54 | ? in_b |
|
54 | ? in_b | |
55 | $ hg status --cwd b .. |
|
55 | $ hg status --cwd b .. | |
56 | ? ../a/1/in_a_1 |
|
56 | ? ../a/1/in_a_1 | |
57 | ? ../a/in_a |
|
57 | ? ../a/in_a | |
58 | ? 1/in_b_1 |
|
58 | ? 1/in_b_1 | |
59 | ? 2/in_b_2 |
|
59 | ? 2/in_b_2 | |
60 | ? in_b |
|
60 | ? in_b | |
61 | ? ../in_root |
|
61 | ? ../in_root | |
62 |
|
62 | |||
63 | $ hg status --cwd a/1 |
|
63 | $ hg status --cwd a/1 | |
64 | ? a/1/in_a_1 |
|
64 | ? a/1/in_a_1 | |
65 | ? a/in_a |
|
65 | ? a/in_a | |
66 | ? b/1/in_b_1 |
|
66 | ? b/1/in_b_1 | |
67 | ? b/2/in_b_2 |
|
67 | ? b/2/in_b_2 | |
68 | ? b/in_b |
|
68 | ? b/in_b | |
69 | ? in_root |
|
69 | ? in_root | |
70 | $ hg status --cwd a/1 . |
|
70 | $ hg status --cwd a/1 . | |
71 | ? in_a_1 |
|
71 | ? in_a_1 | |
72 | $ hg status --cwd a/1 .. |
|
72 | $ hg status --cwd a/1 .. | |
73 | ? in_a_1 |
|
73 | ? in_a_1 | |
74 | ? ../in_a |
|
74 | ? ../in_a | |
75 |
|
75 | |||
76 | $ hg status --cwd b/1 |
|
76 | $ hg status --cwd b/1 | |
77 | ? a/1/in_a_1 |
|
77 | ? a/1/in_a_1 | |
78 | ? a/in_a |
|
78 | ? a/in_a | |
79 | ? b/1/in_b_1 |
|
79 | ? b/1/in_b_1 | |
80 | ? b/2/in_b_2 |
|
80 | ? b/2/in_b_2 | |
81 | ? b/in_b |
|
81 | ? b/in_b | |
82 | ? in_root |
|
82 | ? in_root | |
83 | $ hg status --cwd b/1 . |
|
83 | $ hg status --cwd b/1 . | |
84 | ? in_b_1 |
|
84 | ? in_b_1 | |
85 | $ hg status --cwd b/1 .. |
|
85 | $ hg status --cwd b/1 .. | |
86 | ? in_b_1 |
|
86 | ? in_b_1 | |
87 | ? ../2/in_b_2 |
|
87 | ? ../2/in_b_2 | |
88 | ? ../in_b |
|
88 | ? ../in_b | |
89 |
|
89 | |||
90 | $ hg status --cwd b/2 |
|
90 | $ hg status --cwd b/2 | |
91 | ? a/1/in_a_1 |
|
91 | ? a/1/in_a_1 | |
92 | ? a/in_a |
|
92 | ? a/in_a | |
93 | ? b/1/in_b_1 |
|
93 | ? b/1/in_b_1 | |
94 | ? b/2/in_b_2 |
|
94 | ? b/2/in_b_2 | |
95 | ? b/in_b |
|
95 | ? b/in_b | |
96 | ? in_root |
|
96 | ? in_root | |
97 | $ hg status --cwd b/2 . |
|
97 | $ hg status --cwd b/2 . | |
98 | ? in_b_2 |
|
98 | ? in_b_2 | |
99 | $ hg status --cwd b/2 .. |
|
99 | $ hg status --cwd b/2 .. | |
100 | ? ../1/in_b_1 |
|
100 | ? ../1/in_b_1 | |
101 | ? in_b_2 |
|
101 | ? in_b_2 | |
102 | ? ../in_b |
|
102 | ? ../in_b | |
103 | $ cd .. |
|
103 | $ cd .. | |
104 |
|
104 | |||
105 | $ hg init repo2 |
|
105 | $ hg init repo2 | |
106 | $ cd repo2 |
|
106 | $ cd repo2 | |
107 | $ touch modified removed deleted ignored |
|
107 | $ touch modified removed deleted ignored | |
108 | $ echo "^ignored$" > .hgignore |
|
108 | $ echo "^ignored$" > .hgignore | |
109 |
$ hg ci -A -m 'initial checkin' |
|
109 | $ hg ci -A -m 'initial checkin' | |
110 | adding .hgignore |
|
110 | adding .hgignore | |
111 | adding deleted |
|
111 | adding deleted | |
112 | adding modified |
|
112 | adding modified | |
113 | adding removed |
|
113 | adding removed | |
114 | $ touch modified added unknown ignored |
|
114 | $ touch modified added unknown ignored | |
115 | $ hg add added |
|
115 | $ hg add added | |
116 | $ hg remove removed |
|
116 | $ hg remove removed | |
117 | $ rm deleted |
|
117 | $ rm deleted | |
118 |
|
118 | |||
119 | hg status: |
|
119 | hg status: | |
120 |
|
120 | |||
121 | $ hg status |
|
121 | $ hg status | |
122 | A added |
|
122 | A added | |
123 | R removed |
|
123 | R removed | |
124 | ! deleted |
|
124 | ! deleted | |
125 | ? unknown |
|
125 | ? unknown | |
126 |
|
126 | |||
127 | hg status modified added removed deleted unknown never-existed ignored: |
|
127 | hg status modified added removed deleted unknown never-existed ignored: | |
128 |
|
128 | |||
129 | $ hg status modified added removed deleted unknown never-existed ignored |
|
129 | $ hg status modified added removed deleted unknown never-existed ignored | |
130 | never-existed: No such file or directory |
|
130 | never-existed: No such file or directory | |
131 | A added |
|
131 | A added | |
132 | R removed |
|
132 | R removed | |
133 | ! deleted |
|
133 | ! deleted | |
134 | ? unknown |
|
134 | ? unknown | |
135 |
|
135 | |||
136 | $ hg copy modified copied |
|
136 | $ hg copy modified copied | |
137 |
|
137 | |||
138 | hg status -C: |
|
138 | hg status -C: | |
139 |
|
139 | |||
140 | $ hg status -C |
|
140 | $ hg status -C | |
141 | A added |
|
141 | A added | |
142 | A copied |
|
142 | A copied | |
143 | modified |
|
143 | modified | |
144 | R removed |
|
144 | R removed | |
145 | ! deleted |
|
145 | ! deleted | |
146 | ? unknown |
|
146 | ? unknown | |
147 |
|
147 | |||
148 | hg status -A: |
|
148 | hg status -A: | |
149 |
|
149 | |||
150 | $ hg status -A |
|
150 | $ hg status -A | |
151 | A added |
|
151 | A added | |
152 | A copied |
|
152 | A copied | |
153 | modified |
|
153 | modified | |
154 | R removed |
|
154 | R removed | |
155 | ! deleted |
|
155 | ! deleted | |
156 | ? unknown |
|
156 | ? unknown | |
157 | I ignored |
|
157 | I ignored | |
158 | C .hgignore |
|
158 | C .hgignore | |
159 | C modified |
|
159 | C modified | |
160 |
|
160 | |||
161 |
|
161 | |||
162 | $ echo "^ignoreddir$" > .hgignore |
|
162 | $ echo "^ignoreddir$" > .hgignore | |
163 | $ mkdir ignoreddir |
|
163 | $ mkdir ignoreddir | |
164 | $ touch ignoreddir/file |
|
164 | $ touch ignoreddir/file | |
165 |
|
165 | |||
166 | hg status ignoreddir/file: |
|
166 | hg status ignoreddir/file: | |
167 |
|
167 | |||
168 | $ hg status ignoreddir/file |
|
168 | $ hg status ignoreddir/file | |
169 |
|
169 | |||
170 | hg status -i ignoreddir/file: |
|
170 | hg status -i ignoreddir/file: | |
171 |
|
171 | |||
172 | $ hg status -i ignoreddir/file |
|
172 | $ hg status -i ignoreddir/file | |
173 | I ignoreddir/file |
|
173 | I ignoreddir/file | |
174 | $ cd .. |
|
174 | $ cd .. | |
175 |
|
175 | |||
176 | # check 'status -q' and some combinations |
|
176 | # check 'status -q' and some combinations | |
177 |
|
177 | |||
178 | $ hg init repo3 |
|
178 | $ hg init repo3 | |
179 | $ cd repo3 |
|
179 | $ cd repo3 | |
180 | $ touch modified removed deleted ignored |
|
180 | $ touch modified removed deleted ignored | |
181 | $ echo "^ignored$" > .hgignore |
|
181 | $ echo "^ignored$" > .hgignore | |
182 | $ hg commit -A -m 'initial checkin' |
|
182 | $ hg commit -A -m 'initial checkin' | |
183 | adding .hgignore |
|
183 | adding .hgignore | |
184 | adding deleted |
|
184 | adding deleted | |
185 | adding modified |
|
185 | adding modified | |
186 | adding removed |
|
186 | adding removed | |
187 | $ touch added unknown ignored |
|
187 | $ touch added unknown ignored | |
188 | $ hg add added |
|
188 | $ hg add added | |
189 | $ echo "test" >> modified |
|
189 | $ echo "test" >> modified | |
190 | $ hg remove removed |
|
190 | $ hg remove removed | |
191 | $ rm deleted |
|
191 | $ rm deleted | |
192 | $ hg copy modified copied |
|
192 | $ hg copy modified copied | |
193 |
|
193 | |||
194 | # Run status with 2 different flags. |
|
194 | # Run status with 2 different flags. | |
195 | # Check if result is the same or different. |
|
195 | # Check if result is the same or different. | |
196 | # If result is not as expected, raise error |
|
196 | # If result is not as expected, raise error | |
197 |
|
197 | |||
198 | $ assert() { |
|
198 | $ assert() { | |
199 | > hg status $1 > ../a |
|
199 | > hg status $1 > ../a | |
200 | > hg status $2 > ../b |
|
200 | > hg status $2 > ../b | |
201 | > out=`diff ../a ../b` |
|
201 | > out=`diff ../a ../b` | |
202 | > if [ $? -ne 0 ]; then |
|
202 | > if [ $? -ne 0 ]; then | |
203 | > out=1 |
|
203 | > out=1 | |
204 | > else |
|
204 | > else | |
205 | > out=0 |
|
205 | > out=0 | |
206 | > fi |
|
206 | > fi | |
207 | > if [ $3 -eq 0 ]; then |
|
207 | > if [ $3 -eq 0 ]; then | |
208 | > df="same" |
|
208 | > df="same" | |
209 | > else |
|
209 | > else | |
210 | > df="different" |
|
210 | > df="different" | |
211 | > fi |
|
211 | > fi | |
212 | > if [ $out -ne $3 ]; then |
|
212 | > if [ $out -ne $3 ]; then | |
213 | > echo "Error on $1 and $2, should be $df." |
|
213 | > echo "Error on $1 and $2, should be $df." | |
214 | > fi |
|
214 | > fi | |
215 | > } |
|
215 | > } | |
216 |
|
216 | |||
217 | # assert flag1 flag2 [0-same | 1-different] |
|
217 | # assert flag1 flag2 [0-same | 1-different] | |
218 |
|
218 | |||
219 | $ assert "-q" "-mard" 0 |
|
219 | $ assert "-q" "-mard" 0 | |
220 | $ assert "-A" "-marduicC" 0 |
|
220 | $ assert "-A" "-marduicC" 0 | |
221 | $ assert "-qA" "-mardcC" 0 |
|
221 | $ assert "-qA" "-mardcC" 0 | |
222 | $ assert "-qAui" "-A" 0 |
|
222 | $ assert "-qAui" "-A" 0 | |
223 | $ assert "-qAu" "-marducC" 0 |
|
223 | $ assert "-qAu" "-marducC" 0 | |
224 | $ assert "-qAi" "-mardicC" 0 |
|
224 | $ assert "-qAi" "-mardicC" 0 | |
225 | $ assert "-qu" "-u" 0 |
|
225 | $ assert "-qu" "-u" 0 | |
226 | $ assert "-q" "-u" 1 |
|
226 | $ assert "-q" "-u" 1 | |
227 | $ assert "-m" "-a" 1 |
|
227 | $ assert "-m" "-a" 1 | |
228 | $ assert "-r" "-d" 1 |
|
228 | $ assert "-r" "-d" 1 | |
229 | $ cd .. |
|
229 | $ cd .. | |
230 |
|
230 | |||
231 | $ hg init repo4 |
|
231 | $ hg init repo4 | |
232 | $ cd repo4 |
|
232 | $ cd repo4 | |
233 | $ touch modified removed deleted |
|
233 | $ touch modified removed deleted | |
234 |
$ hg ci -q -A -m 'initial checkin' |
|
234 | $ hg ci -q -A -m 'initial checkin' | |
235 | $ touch added unknown |
|
235 | $ touch added unknown | |
236 | $ hg add added |
|
236 | $ hg add added | |
237 | $ hg remove removed |
|
237 | $ hg remove removed | |
238 | $ rm deleted |
|
238 | $ rm deleted | |
239 | $ echo x > modified |
|
239 | $ echo x > modified | |
240 | $ hg copy modified copied |
|
240 | $ hg copy modified copied | |
241 | $ hg ci -m 'test checkin' -d "1000001 0" |
|
241 | $ hg ci -m 'test checkin' -d "1000001 0" | |
242 | $ rm * |
|
242 | $ rm * | |
243 | $ touch unrelated |
|
243 | $ touch unrelated | |
244 | $ hg ci -q -A -m 'unrelated checkin' -d "1000002 0" |
|
244 | $ hg ci -q -A -m 'unrelated checkin' -d "1000002 0" | |
245 |
|
245 | |||
246 | hg status --change 1: |
|
246 | hg status --change 1: | |
247 |
|
247 | |||
248 | $ hg status --change 1 |
|
248 | $ hg status --change 1 | |
249 | M modified |
|
249 | M modified | |
250 | A added |
|
250 | A added | |
251 | A copied |
|
251 | A copied | |
252 | R removed |
|
252 | R removed | |
253 |
|
253 | |||
254 | hg status --change 1 unrelated: |
|
254 | hg status --change 1 unrelated: | |
255 |
|
255 | |||
256 | $ hg status --change 1 unrelated |
|
256 | $ hg status --change 1 unrelated | |
257 |
|
257 | |||
258 | hg status -C --change 1 added modified copied removed deleted: |
|
258 | hg status -C --change 1 added modified copied removed deleted: | |
259 |
|
259 | |||
260 | $ hg status -C --change 1 added modified copied removed deleted |
|
260 | $ hg status -C --change 1 added modified copied removed deleted | |
261 | M modified |
|
261 | M modified | |
262 | A added |
|
262 | A added | |
263 | A copied |
|
263 | A copied | |
264 | modified |
|
264 | modified | |
265 | R removed |
|
265 | R removed | |
266 |
|
266 | |||
267 | hg status -A --change 1: |
|
267 | hg status -A --change 1: | |
268 |
|
268 | |||
269 | $ hg status -A --change 1 |
|
269 | $ hg status -A --change 1 | |
270 | M modified |
|
270 | M modified | |
271 | A added |
|
271 | A added | |
272 | A copied |
|
272 | A copied | |
273 | modified |
|
273 | modified | |
274 | R removed |
|
274 | R removed | |
275 | C deleted |
|
275 | C deleted |
@@ -1,194 +1,194 b'' | |||||
1 | $ hg init test |
|
1 | $ hg init test | |
2 | $ cd test |
|
2 | $ cd test | |
3 |
|
3 | |||
4 | $ echo a > a |
|
4 | $ echo a > a | |
5 | $ hg add a |
|
5 | $ hg add a | |
6 |
$ hg commit -m "test" |
|
6 | $ hg commit -m "test" | |
7 | $ hg history |
|
7 | $ hg history | |
8 |
changeset: 0: |
|
8 | changeset: 0:acb14030fe0a | |
9 | tag: tip |
|
9 | tag: tip | |
10 | user: test |
|
10 | user: test | |
11 |
date: |
|
11 | date: Thu Jan 01 00:00:00 1970 +0000 | |
12 | summary: test |
|
12 | summary: test | |
13 |
|
13 | |||
14 |
|
14 | |||
15 | $ hg tag ' ' |
|
15 | $ hg tag ' ' | |
16 | abort: tag names cannot consist entirely of whitespace |
|
16 | abort: tag names cannot consist entirely of whitespace | |
17 |
|
17 | |||
18 |
$ hg tag |
|
18 | $ hg tag "bleah" | |
19 | $ hg history |
|
19 | $ hg history | |
20 |
changeset: 1: |
|
20 | changeset: 1:d4f0d2909abc | |
21 | tag: tip |
|
21 | tag: tip | |
22 | user: test |
|
22 | user: test | |
23 |
date: |
|
23 | date: Thu Jan 01 00:00:00 1970 +0000 | |
24 |
summary: Added tag bleah for changeset |
|
24 | summary: Added tag bleah for changeset acb14030fe0a | |
25 |
|
25 | |||
26 |
changeset: 0: |
|
26 | changeset: 0:acb14030fe0a | |
27 | tag: bleah |
|
27 | tag: bleah | |
28 | user: test |
|
28 | user: test | |
29 |
date: |
|
29 | date: Thu Jan 01 00:00:00 1970 +0000 | |
30 | summary: test |
|
30 | summary: test | |
31 |
|
31 | |||
32 |
|
32 | |||
33 | $ echo foo >> .hgtags |
|
33 | $ echo foo >> .hgtags | |
34 |
$ hg tag |
|
34 | $ hg tag "bleah2" || echo "failed" | |
35 | abort: working copy of .hgtags is changed (please commit .hgtags manually) |
|
35 | abort: working copy of .hgtags is changed (please commit .hgtags manually) | |
36 | failed |
|
36 | failed | |
37 |
|
37 | |||
38 | $ hg revert .hgtags |
|
38 | $ hg revert .hgtags | |
39 |
$ hg tag |
|
39 | $ hg tag -r 0 x y z y y z || echo "failed" | |
40 | abort: tag names must be unique |
|
40 | abort: tag names must be unique | |
41 | failed |
|
41 | failed | |
42 |
$ hg tag |
|
42 | $ hg tag tap nada dot tip null . || echo "failed" | |
43 | abort: the name 'tip' is reserved |
|
43 | abort: the name 'tip' is reserved | |
44 | failed |
|
44 | failed | |
45 |
$ hg tag |
|
45 | $ hg tag "bleah" || echo "failed" | |
46 | abort: tag 'bleah' already exists (use -f to force) |
|
46 | abort: tag 'bleah' already exists (use -f to force) | |
47 | failed |
|
47 | failed | |
48 |
$ hg tag |
|
48 | $ hg tag "blecch" "bleah" || echo "failed" | |
49 | abort: tag 'bleah' already exists (use -f to force) |
|
49 | abort: tag 'bleah' already exists (use -f to force) | |
50 | failed |
|
50 | failed | |
51 |
|
51 | |||
52 |
$ hg tag |
|
52 | $ hg tag --remove "blecch" || echo "failed" | |
53 | abort: tag 'blecch' does not exist |
|
53 | abort: tag 'blecch' does not exist | |
54 | failed |
|
54 | failed | |
55 |
$ hg tag |
|
55 | $ hg tag --remove "bleah" "blecch" "blough" || echo "failed" | |
56 | abort: tag 'blecch' does not exist |
|
56 | abort: tag 'blecch' does not exist | |
57 | failed |
|
57 | failed | |
58 |
|
58 | |||
59 |
$ hg tag |
|
59 | $ hg tag -r 0 "bleah0" | |
60 |
$ hg tag -l - |
|
60 | $ hg tag -l -r 1 "bleah1" | |
61 |
$ hg tag |
|
61 | $ hg tag gack gawk gorp | |
62 |
$ hg tag - |
|
62 | $ hg tag -f gack | |
63 |
$ hg tag |
|
63 | $ hg tag --remove gack gorp | |
64 |
|
64 | |||
65 | $ cat .hgtags |
|
65 | $ cat .hgtags | |
66 | 0acdaf8983679e0aac16e811534eb49d7ee1f2b4 bleah |
|
66 | acb14030fe0a21b60322c440ad2d20cf7685a376 bleah | |
67 | 0acdaf8983679e0aac16e811534eb49d7ee1f2b4 bleah0 |
|
67 | acb14030fe0a21b60322c440ad2d20cf7685a376 bleah0 | |
68 | 868cc8fbb43b754ad09fa109885d243fc49adae7 gack |
|
68 | 336fccc858a4eb69609a291105009e484a6b6b8d gack | |
69 | 868cc8fbb43b754ad09fa109885d243fc49adae7 gawk |
|
69 | 336fccc858a4eb69609a291105009e484a6b6b8d gawk | |
70 | 868cc8fbb43b754ad09fa109885d243fc49adae7 gorp |
|
70 | 336fccc858a4eb69609a291105009e484a6b6b8d gorp | |
71 | 868cc8fbb43b754ad09fa109885d243fc49adae7 gack |
|
71 | 336fccc858a4eb69609a291105009e484a6b6b8d gack | |
72 | 3807bcf62c5614cb6c16436b514d7764ca5f1631 gack |
|
72 | 799667b6f2d9b957f73fa644a918c2df22bab58f gack | |
73 | 3807bcf62c5614cb6c16436b514d7764ca5f1631 gack |
|
73 | 799667b6f2d9b957f73fa644a918c2df22bab58f gack | |
74 | 0000000000000000000000000000000000000000 gack |
|
74 | 0000000000000000000000000000000000000000 gack | |
75 | 868cc8fbb43b754ad09fa109885d243fc49adae7 gorp |
|
75 | 336fccc858a4eb69609a291105009e484a6b6b8d gorp | |
76 | 0000000000000000000000000000000000000000 gorp |
|
76 | 0000000000000000000000000000000000000000 gorp | |
77 | $ cat .hg/localtags |
|
77 | $ cat .hg/localtags | |
78 | 3ecf002a1c572a2f3bb4e665417e60fca65bbd42 bleah1 |
|
78 | d4f0d2909abc9290e2773c08837d70c1794e3f5a bleah1 | |
79 |
|
79 | |||
80 | $ hg update 0 |
|
80 | $ hg update 0 | |
81 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
81 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
82 |
$ hg tag |
|
82 | $ hg tag "foobar" | |
83 | $ cat .hgtags |
|
83 | $ cat .hgtags | |
84 | 0acdaf8983679e0aac16e811534eb49d7ee1f2b4 foobar |
|
84 | acb14030fe0a21b60322c440ad2d20cf7685a376 foobar | |
85 | $ cat .hg/localtags |
|
85 | $ cat .hg/localtags | |
86 | 3ecf002a1c572a2f3bb4e665417e60fca65bbd42 bleah1 |
|
86 | d4f0d2909abc9290e2773c08837d70c1794e3f5a bleah1 | |
87 |
|
87 | |||
88 | $ hg tag -l 'xx |
|
88 | $ hg tag -l 'xx | |
89 | > newline' |
|
89 | > newline' | |
90 | abort: '\n' cannot be used in a tag name |
|
90 | abort: '\n' cannot be used in a tag name | |
91 | $ hg tag -l 'xx:xx' |
|
91 | $ hg tag -l 'xx:xx' | |
92 | abort: ':' cannot be used in a tag name |
|
92 | abort: ':' cannot be used in a tag name | |
93 |
|
93 | |||
94 | cloning local tags |
|
94 | cloning local tags | |
95 |
|
95 | |||
96 | $ cd .. |
|
96 | $ cd .. | |
97 | $ hg -R test log -r0:5 |
|
97 | $ hg -R test log -r0:5 | |
98 |
changeset: 0: |
|
98 | changeset: 0:acb14030fe0a | |
99 | tag: bleah |
|
99 | tag: bleah | |
100 | tag: bleah0 |
|
100 | tag: bleah0 | |
101 | tag: foobar |
|
101 | tag: foobar | |
102 | user: test |
|
102 | user: test | |
103 |
date: |
|
103 | date: Thu Jan 01 00:00:00 1970 +0000 | |
104 | summary: test |
|
104 | summary: test | |
105 |
|
105 | |||
106 |
changeset: 1: |
|
106 | changeset: 1:d4f0d2909abc | |
107 | tag: bleah1 |
|
107 | tag: bleah1 | |
108 | user: test |
|
108 | user: test | |
109 |
date: |
|
109 | date: Thu Jan 01 00:00:00 1970 +0000 | |
110 |
summary: Added tag bleah for changeset |
|
110 | summary: Added tag bleah for changeset acb14030fe0a | |
111 |
|
111 | |||
112 |
changeset: 2: |
|
112 | changeset: 2:336fccc858a4 | |
113 | tag: gawk |
|
113 | tag: gawk | |
114 | user: test |
|
114 | user: test | |
115 |
date: |
|
115 | date: Thu Jan 01 00:00:00 1970 +0000 | |
116 |
summary: Added tag bleah0 for changeset |
|
116 | summary: Added tag bleah0 for changeset acb14030fe0a | |
117 |
|
117 | |||
118 |
changeset: 3: |
|
118 | changeset: 3:799667b6f2d9 | |
119 | user: test |
|
119 | user: test | |
120 |
date: |
|
120 | date: Thu Jan 01 00:00:00 1970 +0000 | |
121 |
summary: Added tag gack, gawk, gorp for changeset |
|
121 | summary: Added tag gack, gawk, gorp for changeset 336fccc858a4 | |
122 |
|
122 | |||
123 |
changeset: 4:1 |
|
123 | changeset: 4:154eeb7c0138 | |
124 | user: test |
|
124 | user: test | |
125 |
date: |
|
125 | date: Thu Jan 01 00:00:00 1970 +0000 | |
126 |
summary: Added tag gack for changeset |
|
126 | summary: Added tag gack for changeset 799667b6f2d9 | |
127 |
|
127 | |||
128 |
changeset: 5: |
|
128 | changeset: 5:b4bb47aaff09 | |
129 | user: test |
|
129 | user: test | |
130 |
date: |
|
130 | date: Thu Jan 01 00:00:00 1970 +0000 | |
131 | summary: Removed tag gack, gorp |
|
131 | summary: Removed tag gack, gorp | |
132 |
|
132 | |||
133 | $ hg clone -q -rbleah1 test test1 |
|
133 | $ hg clone -q -rbleah1 test test1 | |
134 | $ hg -R test1 parents --style=compact |
|
134 | $ hg -R test1 parents --style=compact | |
135 |
1[tip] |
|
135 | 1[tip] d4f0d2909abc 1970-01-01 00:00 +0000 test | |
136 |
Added tag bleah for changeset |
|
136 | Added tag bleah for changeset acb14030fe0a | |
137 |
|
137 | |||
138 | $ hg clone -q -r5 test#bleah1 test2 |
|
138 | $ hg clone -q -r5 test#bleah1 test2 | |
139 | $ hg -R test2 parents --style=compact |
|
139 | $ hg -R test2 parents --style=compact | |
140 |
5[tip] |
|
140 | 5[tip] b4bb47aaff09 1970-01-01 00:00 +0000 test | |
141 | Removed tag gack, gorp |
|
141 | Removed tag gack, gorp | |
142 |
|
142 | |||
143 | $ hg clone -q -U test#bleah1 test3 |
|
143 | $ hg clone -q -U test#bleah1 test3 | |
144 | $ hg -R test3 parents --style=compact |
|
144 | $ hg -R test3 parents --style=compact | |
145 |
|
145 | |||
146 | $ cd test |
|
146 | $ cd test | |
147 |
|
147 | |||
148 | issue 601 |
|
148 | issue 601 | |
149 |
|
149 | |||
150 | $ python << EOF |
|
150 | $ python << EOF | |
151 | > f = file('.hg/localtags'); last = f.readlines()[-1][:-1]; f.close() |
|
151 | > f = file('.hg/localtags'); last = f.readlines()[-1][:-1]; f.close() | |
152 | > f = file('.hg/localtags', 'w'); f.write(last); f.close() |
|
152 | > f = file('.hg/localtags', 'w'); f.write(last); f.close() | |
153 | > EOF |
|
153 | > EOF | |
154 | $ cat .hg/localtags; echo |
|
154 | $ cat .hg/localtags; echo | |
155 | 3ecf002a1c572a2f3bb4e665417e60fca65bbd42 bleah1 |
|
155 | d4f0d2909abc9290e2773c08837d70c1794e3f5a bleah1 | |
156 | $ hg tag -l localnewline |
|
156 | $ hg tag -l localnewline | |
157 | $ cat .hg/localtags; echo |
|
157 | $ cat .hg/localtags; echo | |
158 | 3ecf002a1c572a2f3bb4e665417e60fca65bbd42 bleah1 |
|
158 | d4f0d2909abc9290e2773c08837d70c1794e3f5a bleah1 | |
159 | f68b039e72eacbb2e68b0543e1f6e50990aa2bb5 localnewline |
|
159 | c2899151f4e76890c602a2597a650a72666681bf localnewline | |
160 |
|
160 | |||
161 |
|
161 | |||
162 | $ python << EOF |
|
162 | $ python << EOF | |
163 | > f = file('.hgtags'); last = f.readlines()[-1][:-1]; f.close() |
|
163 | > f = file('.hgtags'); last = f.readlines()[-1][:-1]; f.close() | |
164 | > f = file('.hgtags', 'w'); f.write(last); f.close() |
|
164 | > f = file('.hgtags', 'w'); f.write(last); f.close() | |
165 | > EOF |
|
165 | > EOF | |
166 |
$ hg ci - |
|
166 | $ hg ci -m'broken manual edit of .hgtags' | |
167 | $ cat .hgtags; echo |
|
167 | $ cat .hgtags; echo | |
168 | 0acdaf8983679e0aac16e811534eb49d7ee1f2b4 foobar |
|
168 | acb14030fe0a21b60322c440ad2d20cf7685a376 foobar | |
169 |
$ hg tag |
|
169 | $ hg tag newline | |
170 | $ cat .hgtags; echo |
|
170 | $ cat .hgtags; echo | |
171 | 0acdaf8983679e0aac16e811534eb49d7ee1f2b4 foobar |
|
171 | acb14030fe0a21b60322c440ad2d20cf7685a376 foobar | |
172 | 6ae703d793c8b1f097116869275ecd97b2977a2b newline |
|
172 | a0eea09de1eeec777b46f2085260a373b2fbc293 newline | |
173 |
|
173 | |||
174 |
|
174 | |||
175 | tag and branch using same name |
|
175 | tag and branch using same name | |
176 |
|
176 | |||
177 | $ hg branch tag-and-branch-same-name |
|
177 | $ hg branch tag-and-branch-same-name | |
178 | marked working directory as branch tag-and-branch-same-name |
|
178 | marked working directory as branch tag-and-branch-same-name | |
179 | $ hg ci -m"discouraged" |
|
179 | $ hg ci -m"discouraged" | |
180 | $ hg tag tag-and-branch-same-name |
|
180 | $ hg tag tag-and-branch-same-name | |
181 | warning: tag tag-and-branch-same-name conflicts with existing branch name |
|
181 | warning: tag tag-and-branch-same-name conflicts with existing branch name | |
182 |
|
182 | |||
183 | test custom commit messages |
|
183 | test custom commit messages | |
184 |
|
184 | |||
185 | $ cat > $HGTMP/editor <<'__EOF__' |
|
185 | $ cat > $HGTMP/editor <<'__EOF__' | |
186 | > #!/bin/sh |
|
186 | > #!/bin/sh | |
187 | > echo "custom tag message" > "$1" |
|
187 | > echo "custom tag message" > "$1" | |
188 | > echo "second line" >> "$1" |
|
188 | > echo "second line" >> "$1" | |
189 | > __EOF__ |
|
189 | > __EOF__ | |
190 | $ chmod +x "$HGTMP"/editor |
|
190 | $ chmod +x "$HGTMP"/editor | |
191 | $ HGEDITOR="'$HGTMP'"/editor hg tag custom-tag -e |
|
191 | $ HGEDITOR="'$HGTMP'"/editor hg tag custom-tag -e | |
192 | $ hg log -l1 --template "{desc}\n" |
|
192 | $ hg log -l1 --template "{desc}\n" | |
193 | custom tag message |
|
193 | custom tag message | |
194 | second line |
|
194 | second line |
@@ -1,353 +1,353 b'' | |||||
1 | $ cat <<EOF >> $HGRCPATH |
|
1 | $ cat <<EOF >> $HGRCPATH | |
2 | > [extensions] |
|
2 | > [extensions] | |
3 | > transplant= |
|
3 | > transplant= | |
4 | > EOF |
|
4 | > EOF | |
5 |
|
5 | |||
6 | $ hg init t |
|
6 | $ hg init t | |
7 | $ cd t |
|
7 | $ cd t | |
8 | $ echo r1 > r1 |
|
8 | $ echo r1 > r1 | |
9 | $ hg ci -Amr1 -d'0 0' |
|
9 | $ hg ci -Amr1 -d'0 0' | |
10 | adding r1 |
|
10 | adding r1 | |
11 | $ echo r2 > r2 |
|
11 | $ echo r2 > r2 | |
12 | $ hg ci -Amr2 -d'1 0' |
|
12 | $ hg ci -Amr2 -d'1 0' | |
13 | adding r2 |
|
13 | adding r2 | |
14 | $ hg up 0 |
|
14 | $ hg up 0 | |
15 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
15 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
16 |
|
16 | |||
17 | $ echo b1 > b1 |
|
17 | $ echo b1 > b1 | |
18 | $ hg ci -Amb1 -d '0 0' |
|
18 | $ hg ci -Amb1 -d '0 0' | |
19 | adding b1 |
|
19 | adding b1 | |
20 | created new head |
|
20 | created new head | |
21 | $ echo b2 > b2 |
|
21 | $ echo b2 > b2 | |
22 | $ hg ci -Amb2 -d '1 0' |
|
22 | $ hg ci -Amb2 -d '1 0' | |
23 | adding b2 |
|
23 | adding b2 | |
24 | $ echo b3 > b3 |
|
24 | $ echo b3 > b3 | |
25 | $ hg ci -Amb3 -d '2 0' |
|
25 | $ hg ci -Amb3 -d '2 0' | |
26 | adding b3 |
|
26 | adding b3 | |
27 |
|
27 | |||
28 | $ hg log --template '{rev} {parents} {desc}\n' |
|
28 | $ hg log --template '{rev} {parents} {desc}\n' | |
29 | 4 b3 |
|
29 | 4 b3 | |
30 | 3 b2 |
|
30 | 3 b2 | |
31 | 2 0:17ab29e464c6 b1 |
|
31 | 2 0:17ab29e464c6 b1 | |
32 | 1 r2 |
|
32 | 1 r2 | |
33 | 0 r1 |
|
33 | 0 r1 | |
34 |
|
34 | |||
35 | $ hg clone . ../rebase |
|
35 | $ hg clone . ../rebase | |
36 | updating to branch default |
|
36 | updating to branch default | |
37 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
37 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
38 | $ cd ../rebase |
|
38 | $ cd ../rebase | |
39 |
|
39 | |||
40 | $ hg up -C 1 |
|
40 | $ hg up -C 1 | |
41 | 1 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
41 | 1 files updated, 0 files merged, 3 files removed, 0 files unresolved | |
42 |
|
42 | |||
43 | rebase b onto r1 |
|
43 | rebase b onto r1 | |
44 |
|
44 | |||
45 | $ hg transplant -a -b tip |
|
45 | $ hg transplant -a -b tip | |
46 | applying 37a1297eb21b |
|
46 | applying 37a1297eb21b | |
47 | 37a1297eb21b transplanted to e234d668f844 |
|
47 | 37a1297eb21b transplanted to e234d668f844 | |
48 | applying 722f4667af76 |
|
48 | applying 722f4667af76 | |
49 | 722f4667af76 transplanted to 539f377d78df |
|
49 | 722f4667af76 transplanted to 539f377d78df | |
50 | applying a53251cdf717 |
|
50 | applying a53251cdf717 | |
51 | a53251cdf717 transplanted to ffd6818a3975 |
|
51 | a53251cdf717 transplanted to ffd6818a3975 | |
52 | $ hg log --template '{rev} {parents} {desc}\n' |
|
52 | $ hg log --template '{rev} {parents} {desc}\n' | |
53 | 7 b3 |
|
53 | 7 b3 | |
54 | 6 b2 |
|
54 | 6 b2 | |
55 | 5 1:d11e3596cc1a b1 |
|
55 | 5 1:d11e3596cc1a b1 | |
56 | 4 b3 |
|
56 | 4 b3 | |
57 | 3 b2 |
|
57 | 3 b2 | |
58 | 2 0:17ab29e464c6 b1 |
|
58 | 2 0:17ab29e464c6 b1 | |
59 | 1 r2 |
|
59 | 1 r2 | |
60 | 0 r1 |
|
60 | 0 r1 | |
61 |
|
61 | |||
62 | $ hg clone ../t ../prune |
|
62 | $ hg clone ../t ../prune | |
63 | updating to branch default |
|
63 | updating to branch default | |
64 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
64 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
65 | $ cd ../prune |
|
65 | $ cd ../prune | |
66 |
|
66 | |||
67 | $ hg up -C 1 |
|
67 | $ hg up -C 1 | |
68 | 1 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
68 | 1 files updated, 0 files merged, 3 files removed, 0 files unresolved | |
69 |
|
69 | |||
70 | rebase b onto r1, skipping b2 |
|
70 | rebase b onto r1, skipping b2 | |
71 |
|
71 | |||
72 | $ hg transplant -a -b tip -p 3 |
|
72 | $ hg transplant -a -b tip -p 3 | |
73 | applying 37a1297eb21b |
|
73 | applying 37a1297eb21b | |
74 | 37a1297eb21b transplanted to e234d668f844 |
|
74 | 37a1297eb21b transplanted to e234d668f844 | |
75 | applying a53251cdf717 |
|
75 | applying a53251cdf717 | |
76 | a53251cdf717 transplanted to 7275fda4d04f |
|
76 | a53251cdf717 transplanted to 7275fda4d04f | |
77 | $ hg log --template '{rev} {parents} {desc}\n' |
|
77 | $ hg log --template '{rev} {parents} {desc}\n' | |
78 | 6 b3 |
|
78 | 6 b3 | |
79 | 5 1:d11e3596cc1a b1 |
|
79 | 5 1:d11e3596cc1a b1 | |
80 | 4 b3 |
|
80 | 4 b3 | |
81 | 3 b2 |
|
81 | 3 b2 | |
82 | 2 0:17ab29e464c6 b1 |
|
82 | 2 0:17ab29e464c6 b1 | |
83 | 1 r2 |
|
83 | 1 r2 | |
84 | 0 r1 |
|
84 | 0 r1 | |
85 |
|
85 | |||
86 |
|
86 | |||
87 | remote transplant |
|
87 | remote transplant | |
88 |
|
88 | |||
89 | $ hg clone -r 1 ../t ../remote |
|
89 | $ hg clone -r 1 ../t ../remote | |
90 | requesting all changes |
|
90 | requesting all changes | |
91 | adding changesets |
|
91 | adding changesets | |
92 | adding manifests |
|
92 | adding manifests | |
93 | adding file changes |
|
93 | adding file changes | |
94 | added 2 changesets with 2 changes to 2 files |
|
94 | added 2 changesets with 2 changes to 2 files | |
95 | updating to branch default |
|
95 | updating to branch default | |
96 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
96 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
97 | $ cd ../remote |
|
97 | $ cd ../remote | |
98 | $ hg transplant --log -s ../t 2 4 |
|
98 | $ hg transplant --log -s ../t 2 4 | |
99 | searching for changes |
|
99 | searching for changes | |
100 | applying 37a1297eb21b |
|
100 | applying 37a1297eb21b | |
101 | 37a1297eb21b transplanted to c19cf0ccb069 |
|
101 | 37a1297eb21b transplanted to c19cf0ccb069 | |
102 | applying a53251cdf717 |
|
102 | applying a53251cdf717 | |
103 | a53251cdf717 transplanted to f7fe5bf98525 |
|
103 | a53251cdf717 transplanted to f7fe5bf98525 | |
104 | $ hg log --template '{rev} {parents} {desc}\n' |
|
104 | $ hg log --template '{rev} {parents} {desc}\n' | |
105 | 3 b3 |
|
105 | 3 b3 | |
106 | (transplanted from a53251cdf717679d1907b289f991534be05c997a) |
|
106 | (transplanted from a53251cdf717679d1907b289f991534be05c997a) | |
107 | 2 b1 |
|
107 | 2 b1 | |
108 | (transplanted from 37a1297eb21b3ef5c5d2ffac22121a0988ed9f21) |
|
108 | (transplanted from 37a1297eb21b3ef5c5d2ffac22121a0988ed9f21) | |
109 | 1 r2 |
|
109 | 1 r2 | |
110 | 0 r1 |
|
110 | 0 r1 | |
111 |
|
111 | |||
112 | skip previous transplants |
|
112 | skip previous transplants | |
113 |
|
113 | |||
114 | $ hg transplant -s ../t -a -b 4 |
|
114 | $ hg transplant -s ../t -a -b 4 | |
115 | searching for changes |
|
115 | searching for changes | |
116 | applying 722f4667af76 |
|
116 | applying 722f4667af76 | |
117 | 722f4667af76 transplanted to 47156cd86c0b |
|
117 | 722f4667af76 transplanted to 47156cd86c0b | |
118 | $ hg log --template '{rev} {parents} {desc}\n' |
|
118 | $ hg log --template '{rev} {parents} {desc}\n' | |
119 | 4 b2 |
|
119 | 4 b2 | |
120 | 3 b3 |
|
120 | 3 b3 | |
121 | (transplanted from a53251cdf717679d1907b289f991534be05c997a) |
|
121 | (transplanted from a53251cdf717679d1907b289f991534be05c997a) | |
122 | 2 b1 |
|
122 | 2 b1 | |
123 | (transplanted from 37a1297eb21b3ef5c5d2ffac22121a0988ed9f21) |
|
123 | (transplanted from 37a1297eb21b3ef5c5d2ffac22121a0988ed9f21) | |
124 | 1 r2 |
|
124 | 1 r2 | |
125 | 0 r1 |
|
125 | 0 r1 | |
126 |
|
126 | |||
127 | skip local changes transplanted to the source |
|
127 | skip local changes transplanted to the source | |
128 |
|
128 | |||
129 | $ echo b4 > b4 |
|
129 | $ echo b4 > b4 | |
130 | $ hg ci -Amb4 -d '3 0' |
|
130 | $ hg ci -Amb4 -d '3 0' | |
131 | adding b4 |
|
131 | adding b4 | |
132 | $ hg clone ../t ../pullback |
|
132 | $ hg clone ../t ../pullback | |
133 | updating to branch default |
|
133 | updating to branch default | |
134 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
134 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
135 | $ cd ../pullback |
|
135 | $ cd ../pullback | |
136 | $ hg transplant -s ../remote -a -b tip |
|
136 | $ hg transplant -s ../remote -a -b tip | |
137 | searching for changes |
|
137 | searching for changes | |
138 | applying 4333daefcb15 |
|
138 | applying 4333daefcb15 | |
139 | 4333daefcb15 transplanted to 5f42c04e07cc |
|
139 | 4333daefcb15 transplanted to 5f42c04e07cc | |
140 |
|
140 | |||
141 |
|
141 | |||
142 | remote transplant with pull |
|
142 | remote transplant with pull | |
143 |
|
143 | |||
144 | $ hg -R ../t serve -p $HGPORT -d --pid-file=../t.pid |
|
144 | $ hg -R ../t serve -p $HGPORT -d --pid-file=../t.pid | |
145 | $ cat ../t.pid >> $DAEMON_PIDS |
|
145 | $ cat ../t.pid >> $DAEMON_PIDS | |
146 |
|
146 | |||
147 | $ hg clone -r 0 ../t ../rp |
|
147 | $ hg clone -r 0 ../t ../rp | |
148 | requesting all changes |
|
148 | requesting all changes | |
149 | adding changesets |
|
149 | adding changesets | |
150 | adding manifests |
|
150 | adding manifests | |
151 | adding file changes |
|
151 | adding file changes | |
152 | added 1 changesets with 1 changes to 1 files |
|
152 | added 1 changesets with 1 changes to 1 files | |
153 | updating to branch default |
|
153 | updating to branch default | |
154 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
154 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
155 | $ cd ../rp |
|
155 | $ cd ../rp | |
156 | $ hg transplant -s http://localhost:$HGPORT/ 2 4 |
|
156 | $ hg transplant -s http://localhost:$HGPORT/ 2 4 | |
157 | searching for changes |
|
157 | searching for changes | |
158 | searching for changes |
|
158 | searching for changes | |
159 | adding changesets |
|
159 | adding changesets | |
160 | adding manifests |
|
160 | adding manifests | |
161 | adding file changes |
|
161 | adding file changes | |
162 | added 1 changesets with 1 changes to 1 files |
|
162 | added 1 changesets with 1 changes to 1 files | |
163 | applying a53251cdf717 |
|
163 | applying a53251cdf717 | |
164 | a53251cdf717 transplanted to 8d9279348abb |
|
164 | a53251cdf717 transplanted to 8d9279348abb | |
165 | $ hg log --template '{rev} {parents} {desc}\n' |
|
165 | $ hg log --template '{rev} {parents} {desc}\n' | |
166 | 2 b3 |
|
166 | 2 b3 | |
167 | 1 b1 |
|
167 | 1 b1 | |
168 | 0 r1 |
|
168 | 0 r1 | |
169 |
|
169 | |||
170 | transplant --continue |
|
170 | transplant --continue | |
171 |
|
171 | |||
172 | $ hg init ../tc |
|
172 | $ hg init ../tc | |
173 | $ cd ../tc |
|
173 | $ cd ../tc | |
174 | $ cat <<EOF > foo |
|
174 | $ cat <<EOF > foo | |
175 | > foo |
|
175 | > foo | |
176 | > bar |
|
176 | > bar | |
177 | > baz |
|
177 | > baz | |
178 | > EOF |
|
178 | > EOF | |
179 | $ echo toremove > toremove |
|
179 | $ echo toremove > toremove | |
180 | $ hg ci -Amfoo |
|
180 | $ hg ci -Amfoo | |
181 | adding foo |
|
181 | adding foo | |
182 | adding toremove |
|
182 | adding toremove | |
183 | $ cat <<EOF > foo |
|
183 | $ cat <<EOF > foo | |
184 | > foo2 |
|
184 | > foo2 | |
185 | > bar2 |
|
185 | > bar2 | |
186 | > baz2 |
|
186 | > baz2 | |
187 | > EOF |
|
187 | > EOF | |
188 | $ rm toremove |
|
188 | $ rm toremove | |
189 | $ echo added > added |
|
189 | $ echo added > added | |
190 | $ hg ci -Amfoo2 |
|
190 | $ hg ci -Amfoo2 | |
191 | adding added |
|
191 | adding added | |
192 | removing toremove |
|
192 | removing toremove | |
193 | $ echo bar > bar |
|
193 | $ echo bar > bar | |
194 | $ hg ci -Ambar |
|
194 | $ hg ci -Ambar | |
195 | adding bar |
|
195 | adding bar | |
196 | $ echo bar2 >> bar |
|
196 | $ echo bar2 >> bar | |
197 | $ hg ci -mbar2 |
|
197 | $ hg ci -mbar2 | |
198 | $ hg up 0 |
|
198 | $ hg up 0 | |
199 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
199 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
200 | $ echo foobar > foo |
|
200 | $ echo foobar > foo | |
201 | $ hg ci -mfoobar |
|
201 | $ hg ci -mfoobar | |
202 | created new head |
|
202 | created new head | |
203 | $ hg transplant 1:3 |
|
203 | $ hg transplant 1:3 | |
204 | applying a1e30dd1b8e7 |
|
204 | applying a1e30dd1b8e7 | |
205 | patching file foo |
|
205 | patching file foo | |
206 | Hunk #1 FAILED at 0 |
|
206 | Hunk #1 FAILED at 0 | |
207 | 1 out of 1 hunks FAILED -- saving rejects to file foo.rej |
|
207 | 1 out of 1 hunks FAILED -- saving rejects to file foo.rej | |
208 | patch failed to apply |
|
208 | patch failed to apply | |
209 | abort: fix up the merge and run hg transplant --continue |
|
209 | abort: fix up the merge and run hg transplant --continue | |
210 |
|
210 | |||
211 | transplant -c shouldn't use an old changeset |
|
211 | transplant -c shouldn't use an old changeset | |
212 |
|
212 | |||
213 | $ hg up -C |
|
213 | $ hg up -C | |
214 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
214 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
215 | $ rm added |
|
215 | $ rm added | |
216 | $ hg transplant 1 |
|
216 | $ hg transplant 1 | |
217 | applying a1e30dd1b8e7 |
|
217 | applying a1e30dd1b8e7 | |
218 | patching file foo |
|
218 | patching file foo | |
219 | Hunk #1 FAILED at 0 |
|
219 | Hunk #1 FAILED at 0 | |
220 | 1 out of 1 hunks FAILED -- saving rejects to file foo.rej |
|
220 | 1 out of 1 hunks FAILED -- saving rejects to file foo.rej | |
221 | patch failed to apply |
|
221 | patch failed to apply | |
222 | abort: fix up the merge and run hg transplant --continue |
|
222 | abort: fix up the merge and run hg transplant --continue | |
223 | $ hg transplant --continue |
|
223 | $ hg transplant --continue | |
224 | a1e30dd1b8e7 transplanted as f1563cf27039 |
|
224 | a1e30dd1b8e7 transplanted as f1563cf27039 | |
225 | $ hg transplant 1:3 |
|
225 | $ hg transplant 1:3 | |
226 | skipping already applied revision 1:a1e30dd1b8e7 |
|
226 | skipping already applied revision 1:a1e30dd1b8e7 | |
227 | applying 1739ac5f6139 |
|
227 | applying 1739ac5f6139 | |
228 | 1739ac5f6139 transplanted to d649c221319f |
|
228 | 1739ac5f6139 transplanted to d649c221319f | |
229 | applying 0282d5fbbe02 |
|
229 | applying 0282d5fbbe02 | |
230 | 0282d5fbbe02 transplanted to 77418277ccb3 |
|
230 | 0282d5fbbe02 transplanted to 77418277ccb3 | |
231 | $ hg locate |
|
231 | $ hg locate | |
232 | added |
|
232 | added | |
233 | bar |
|
233 | bar | |
234 | foo |
|
234 | foo | |
235 | $ cd .. |
|
235 | $ cd .. | |
236 |
|
236 | |||
237 | Test transplant --merge (issue 1111) |
|
237 | Test transplant --merge (issue 1111) | |
238 | test transplant merge |
|
238 | test transplant merge | |
239 |
|
239 | |||
240 | $ hg init t1111 |
|
240 | $ hg init t1111 | |
241 | $ cd t1111 |
|
241 | $ cd t1111 | |
242 | $ echo a > a |
|
242 | $ echo a > a | |
243 | $ hg ci -Am adda |
|
243 | $ hg ci -Am adda | |
244 | adding a |
|
244 | adding a | |
245 | $ echo b >> a |
|
245 | $ echo b >> a | |
246 | $ hg ci -m appendb |
|
246 | $ hg ci -m appendb | |
247 | $ echo c >> a |
|
247 | $ echo c >> a | |
248 | $ hg ci -m appendc |
|
248 | $ hg ci -m appendc | |
249 | $ hg up -C 0 |
|
249 | $ hg up -C 0 | |
250 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
250 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
251 | $ echo d >> a |
|
251 | $ echo d >> a | |
252 | $ hg ci -m appendd |
|
252 | $ hg ci -m appendd | |
253 | created new head |
|
253 | created new head | |
254 |
|
254 | |||
255 | tranplant |
|
255 | tranplant | |
256 |
|
256 | |||
257 | $ hg transplant -m 1 |
|
257 | $ hg transplant -m 1 | |
258 | applying 42dc4432fd35 |
|
258 | applying 42dc4432fd35 | |
259 | 1:42dc4432fd35 merged at a9f4acbac129 |
|
259 | 1:42dc4432fd35 merged at a9f4acbac129 | |
260 | $ cd .. |
|
260 | $ cd .. | |
261 |
|
261 | |||
262 | test transplant into empty repository |
|
262 | test transplant into empty repository | |
263 |
|
263 | |||
264 | $ hg init empty |
|
264 | $ hg init empty | |
265 | $ cd empty |
|
265 | $ cd empty | |
266 | $ hg transplant -s ../t -b tip -a |
|
266 | $ hg transplant -s ../t -b tip -a | |
267 | requesting all changes |
|
267 | requesting all changes | |
268 | adding changesets |
|
268 | adding changesets | |
269 | adding manifests |
|
269 | adding manifests | |
270 | adding file changes |
|
270 | adding file changes | |
271 | added 4 changesets with 4 changes to 4 files |
|
271 | added 4 changesets with 4 changes to 4 files | |
272 | $ cd .. |
|
272 | $ cd .. | |
273 |
|
273 | |||
274 |
|
274 | |||
275 | test filter |
|
275 | test filter | |
276 |
|
276 | |||
277 | $ hg init filter |
|
277 | $ hg init filter | |
278 | $ cd filter |
|
278 | $ cd filter | |
279 | $ cat <<'EOF' >test-filter |
|
279 | $ cat <<'EOF' >test-filter | |
280 | > #!/bin/sh |
|
280 | > #!/bin/sh | |
281 | > sed 's/r1/r2/' $1 > $1.new |
|
281 | > sed 's/r1/r2/' $1 > $1.new | |
282 | > mv $1.new $1 |
|
282 | > mv $1.new $1 | |
283 | > EOF |
|
283 | > EOF | |
284 | $ chmod +x test-filter |
|
284 | $ chmod +x test-filter | |
285 | $ hg transplant -s ../t -b tip -a --filter ./test-filter |
|
285 | $ hg transplant -s ../t -b tip -a --filter ./test-filter | |
286 | filtering .* |
|
286 | filtering .* | |
287 | applying 17ab29e464c6 |
|
287 | applying 17ab29e464c6 | |
288 | 17ab29e464c6 transplanted to e9ffc54ea104 |
|
288 | 17ab29e464c6 transplanted to e9ffc54ea104 | |
289 | filtering .* |
|
289 | filtering .* | |
290 | applying 37a1297eb21b |
|
290 | applying 37a1297eb21b | |
291 | 37a1297eb21b transplanted to 348b36d0b6a5 |
|
291 | 37a1297eb21b transplanted to 348b36d0b6a5 | |
292 | filtering .* |
|
292 | filtering .* | |
293 | applying 722f4667af76 |
|
293 | applying 722f4667af76 | |
294 | 722f4667af76 transplanted to 0aa6979afb95 |
|
294 | 722f4667af76 transplanted to 0aa6979afb95 | |
295 | filtering .* |
|
295 | filtering .* | |
296 | applying a53251cdf717 |
|
296 | applying a53251cdf717 | |
297 | a53251cdf717 transplanted to 14f8512272b5 |
|
297 | a53251cdf717 transplanted to 14f8512272b5 | |
298 | $ hg log --template '{rev} {parents} {desc}\n' |
|
298 | $ hg log --template '{rev} {parents} {desc}\n' | |
299 | 3 b3 |
|
299 | 3 b3 | |
300 | 2 b2 |
|
300 | 2 b2 | |
301 | 1 b1 |
|
301 | 1 b1 | |
302 | 0 r2 |
|
302 | 0 r2 | |
303 | $ cd .. |
|
303 | $ cd .. | |
304 |
|
304 | |||
305 |
|
305 | |||
306 | test filter with failed patch |
|
306 | test filter with failed patch | |
307 |
|
307 | |||
308 | $ cd filter |
|
308 | $ cd filter | |
309 | $ hg up 0 |
|
309 | $ hg up 0 | |
310 | 0 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
310 | 0 files updated, 0 files merged, 3 files removed, 0 files unresolved | |
311 | $ echo foo > b1 |
|
311 | $ echo foo > b1 | |
312 |
$ hg ci - |
|
312 | $ hg ci -Am foo | |
313 | adding b1 |
|
313 | adding b1 | |
314 | adding test-filter |
|
314 | adding test-filter | |
315 | created new head |
|
315 | created new head | |
316 | $ hg transplant 1 --filter ./test-filter |
|
316 | $ hg transplant 1 --filter ./test-filter | |
317 | filtering .* |
|
317 | filtering .* | |
318 | applying 348b36d0b6a5 |
|
318 | applying 348b36d0b6a5 | |
319 | file b1 already exists |
|
319 | file b1 already exists | |
320 | 1 out of 1 hunks FAILED -- saving rejects to file b1.rej |
|
320 | 1 out of 1 hunks FAILED -- saving rejects to file b1.rej | |
321 | patch failed to apply |
|
321 | patch failed to apply | |
322 | abort: fix up the merge and run hg transplant --continue |
|
322 | abort: fix up the merge and run hg transplant --continue | |
323 | $ cd .. |
|
323 | $ cd .. | |
324 |
|
324 | |||
325 |
|
325 | |||
326 | test with a win32ext like setup (differing EOLs) |
|
326 | test with a win32ext like setup (differing EOLs) | |
327 |
|
327 | |||
328 | $ hg init twin1 |
|
328 | $ hg init twin1 | |
329 | $ cd twin1 |
|
329 | $ cd twin1 | |
330 | $ echo a > a |
|
330 | $ echo a > a | |
331 | $ echo b > b |
|
331 | $ echo b > b | |
332 | $ echo b >> b |
|
332 | $ echo b >> b | |
333 | $ hg ci -Am t |
|
333 | $ hg ci -Am t | |
334 | adding a |
|
334 | adding a | |
335 | adding b |
|
335 | adding b | |
336 | $ echo a > b |
|
336 | $ echo a > b | |
337 | $ echo b >> b |
|
337 | $ echo b >> b | |
338 | $ hg ci -m changeb |
|
338 | $ hg ci -m changeb | |
339 | $ cd .. |
|
339 | $ cd .. | |
340 |
|
340 | |||
341 | $ hg init twin2 |
|
341 | $ hg init twin2 | |
342 | $ cd twin2 |
|
342 | $ cd twin2 | |
343 | $ echo '[patch]' >> .hg/hgrc |
|
343 | $ echo '[patch]' >> .hg/hgrc | |
344 | $ echo 'eol = crlf' >> .hg/hgrc |
|
344 | $ echo 'eol = crlf' >> .hg/hgrc | |
345 | $ python -c "file('b', 'wb').write('b\r\nb\r\n')" |
|
345 | $ python -c "file('b', 'wb').write('b\r\nb\r\n')" | |
346 | $ hg ci -m addb |
|
346 | $ hg ci -m addb | |
347 | nothing changed |
|
347 | nothing changed | |
348 | $ hg transplant -s ../twin1 tip |
|
348 | $ hg transplant -s ../twin1 tip | |
349 | applying 2e849d776c17 |
|
349 | applying 2e849d776c17 | |
350 | 2e849d776c17 transplanted to 589cea8ba85b |
|
350 | 2e849d776c17 transplanted to 589cea8ba85b | |
351 | $ python -c "print repr(file('b', 'rb').read())" |
|
351 | $ python -c "print repr(file('b', 'rb').read())" | |
352 | 'a\r\nb\r\n' |
|
352 | 'a\r\nb\r\n' | |
353 | $ cd .. |
|
353 | $ cd .. |
@@ -1,20 +1,20 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | mkdir a |
|
3 | mkdir a | |
4 | cd a |
|
4 | cd a | |
5 | hg init |
|
5 | hg init | |
6 | echo 123 > a |
|
6 | echo 123 > a | |
7 | hg add a |
|
7 | hg add a | |
8 |
hg commit -m "a" -u a |
|
8 | hg commit -m "a" -u a | |
9 |
|
9 | |||
10 | cd .. |
|
10 | cd .. | |
11 | mkdir b |
|
11 | mkdir b | |
12 | cd b |
|
12 | cd b | |
13 | hg init |
|
13 | hg init | |
14 | echo 321 > b |
|
14 | echo 321 > b | |
15 | hg add b |
|
15 | hg add b | |
16 |
hg commit -m "b" -u b |
|
16 | hg commit -m "b" -u b | |
17 |
|
17 | |||
18 | hg pull ../a |
|
18 | hg pull ../a | |
19 | hg pull -f ../a |
|
19 | hg pull -f ../a | |
20 | hg heads |
|
20 | hg heads |
@@ -1,23 +1,23 b'' | |||||
1 | pulling from ../a |
|
1 | pulling from ../a | |
2 | searching for changes |
|
2 | searching for changes | |
3 | abort: repository is unrelated |
|
3 | abort: repository is unrelated | |
4 | pulling from ../a |
|
4 | pulling from ../a | |
5 | searching for changes |
|
5 | searching for changes | |
6 | warning: repository is unrelated |
|
6 | warning: repository is unrelated | |
7 | adding changesets |
|
7 | adding changesets | |
8 | adding manifests |
|
8 | adding manifests | |
9 | adding file changes |
|
9 | adding file changes | |
10 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
10 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
11 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
11 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
12 | changeset: 1:bdcee5d51fa6 |
|
12 | changeset: 1:9a79c33a9db3 | |
13 | tag: tip |
|
13 | tag: tip | |
14 | parent: -1:000000000000 |
|
14 | parent: -1:000000000000 | |
15 | user: a |
|
15 | user: a | |
16 |
date: |
|
16 | date: Thu Jan 01 00:00:00 1970 +0000 | |
17 | summary: a |
|
17 | summary: a | |
18 |
|
18 | |||
19 |
changeset: 0: |
|
19 | changeset: 0:01f8062b2de5 | |
20 | user: b |
|
20 | user: b | |
21 |
date: |
|
21 | date: Thu Jan 01 00:00:00 1970 +0000 | |
22 | summary: b |
|
22 | summary: b | |
23 |
|
23 |
@@ -1,235 +1,235 b'' | |||||
1 | $ HGMERGE=true; export HGMERGE |
|
1 | $ HGMERGE=true; export HGMERGE | |
2 |
|
2 | |||
3 | $ mkdir r1 |
|
3 | $ mkdir r1 | |
4 | $ cd r1 |
|
4 | $ cd r1 | |
5 | $ hg init |
|
5 | $ hg init | |
6 | $ echo a > a |
|
6 | $ echo a > a | |
7 | $ hg addremove |
|
7 | $ hg addremove | |
8 | adding a |
|
8 | adding a | |
9 |
$ hg commit -m "1" |
|
9 | $ hg commit -m "1" | |
10 |
|
10 | |||
11 | $ hg clone . ../r2 |
|
11 | $ hg clone . ../r2 | |
12 | updating to branch default |
|
12 | updating to branch default | |
13 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
13 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
14 | $ cd ../r2 |
|
14 | $ cd ../r2 | |
15 | $ hg up |
|
15 | $ hg up | |
16 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
16 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
17 | $ echo abc > a |
|
17 | $ echo abc > a | |
18 | $ hg diff --nodates |
|
18 | $ hg diff --nodates | |
19 | diff -r 33aaa84a386b a |
|
19 | diff -r c19d34741b0a a | |
20 | --- a/a |
|
20 | --- a/a | |
21 | +++ b/a |
|
21 | +++ b/a | |
22 | @@ -1,1 +1,1 @@ |
|
22 | @@ -1,1 +1,1 @@ | |
23 | -a |
|
23 | -a | |
24 | +abc |
|
24 | +abc | |
25 |
|
25 | |||
26 | $ cd ../r1 |
|
26 | $ cd ../r1 | |
27 | $ echo b > b |
|
27 | $ echo b > b | |
28 | $ echo a2 > a |
|
28 | $ echo a2 > a | |
29 | $ hg addremove |
|
29 | $ hg addremove | |
30 | adding b |
|
30 | adding b | |
31 |
$ hg commit -m "2" |
|
31 | $ hg commit -m "2" | |
32 |
|
32 | |||
33 | $ cd ../r2 |
|
33 | $ cd ../r2 | |
34 | $ hg -q pull ../r1 |
|
34 | $ hg -q pull ../r1 | |
35 | $ hg status |
|
35 | $ hg status | |
36 | M a |
|
36 | M a | |
37 | $ hg parents |
|
37 | $ hg parents | |
38 |
changeset: 0: |
|
38 | changeset: 0:c19d34741b0a | |
39 | user: test |
|
39 | user: test | |
40 |
date: |
|
40 | date: Thu Jan 01 00:00:00 1970 +0000 | |
41 | summary: 1 |
|
41 | summary: 1 | |
42 |
|
42 | |||
43 | $ hg --debug up |
|
43 | $ hg --debug up | |
44 | searching for copies back to rev 1 |
|
44 | searching for copies back to rev 1 | |
45 | unmatched files in other: |
|
45 | unmatched files in other: | |
46 | b |
|
46 | b | |
47 | resolving manifests |
|
47 | resolving manifests | |
48 | overwrite False partial False |
|
48 | overwrite False partial False | |
49 | ancestor 33aaa84a386b local 33aaa84a386b+ remote 802f095af299 |
|
49 | ancestor c19d34741b0a local c19d34741b0a+ remote 1e71731e6fbb | |
50 | a: versions differ -> m |
|
50 | a: versions differ -> m | |
51 | b: remote created -> g |
|
51 | b: remote created -> g | |
52 | preserving a for resolve of a |
|
52 | preserving a for resolve of a | |
53 | updating: a 1/2 files (50.00%) |
|
53 | updating: a 1/2 files (50.00%) | |
54 | picked tool 'true' for a (binary False symlink False) |
|
54 | picked tool 'true' for a (binary False symlink False) | |
55 | merging a |
|
55 | merging a | |
56 | my a@33aaa84a386b+ other a@802f095af299 ancestor a@33aaa84a386b |
|
56 | my a@c19d34741b0a+ other a@1e71731e6fbb ancestor a@c19d34741b0a | |
57 | updating: b 2/2 files (100.00%) |
|
57 | updating: b 2/2 files (100.00%) | |
58 | getting b |
|
58 | getting b | |
59 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
59 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
60 | $ hg parents |
|
60 | $ hg parents | |
61 |
changeset: 1: |
|
61 | changeset: 1:1e71731e6fbb | |
62 | tag: tip |
|
62 | tag: tip | |
63 | user: test |
|
63 | user: test | |
64 |
date: |
|
64 | date: Thu Jan 01 00:00:00 1970 +0000 | |
65 | summary: 2 |
|
65 | summary: 2 | |
66 |
|
66 | |||
67 | $ hg --debug up 0 |
|
67 | $ hg --debug up 0 | |
68 | resolving manifests |
|
68 | resolving manifests | |
69 | overwrite False partial False |
|
69 | overwrite False partial False | |
70 | ancestor 802f095af299 local 802f095af299+ remote 33aaa84a386b |
|
70 | ancestor 1e71731e6fbb local 1e71731e6fbb+ remote c19d34741b0a | |
71 | a: versions differ -> m |
|
71 | a: versions differ -> m | |
72 | b: other deleted -> r |
|
72 | b: other deleted -> r | |
73 | preserving a for resolve of a |
|
73 | preserving a for resolve of a | |
74 | updating: b 1/2 files (50.00%) |
|
74 | updating: b 1/2 files (50.00%) | |
75 | removing b |
|
75 | removing b | |
76 | updating: a 2/2 files (100.00%) |
|
76 | updating: a 2/2 files (100.00%) | |
77 | picked tool 'true' for a (binary False symlink False) |
|
77 | picked tool 'true' for a (binary False symlink False) | |
78 | merging a |
|
78 | merging a | |
79 | my a@802f095af299+ other a@33aaa84a386b ancestor a@802f095af299 |
|
79 | my a@1e71731e6fbb+ other a@c19d34741b0a ancestor a@1e71731e6fbb | |
80 | 0 files updated, 1 files merged, 1 files removed, 0 files unresolved |
|
80 | 0 files updated, 1 files merged, 1 files removed, 0 files unresolved | |
81 | $ hg parents |
|
81 | $ hg parents | |
82 |
changeset: 0: |
|
82 | changeset: 0:c19d34741b0a | |
83 | user: test |
|
83 | user: test | |
84 |
date: |
|
84 | date: Thu Jan 01 00:00:00 1970 +0000 | |
85 | summary: 1 |
|
85 | summary: 1 | |
86 |
|
86 | |||
87 | $ hg --debug merge || echo failed |
|
87 | $ hg --debug merge || echo failed | |
88 | abort: there is nothing to merge - use "hg update" instead |
|
88 | abort: there is nothing to merge - use "hg update" instead | |
89 | failed |
|
89 | failed | |
90 | $ hg parents |
|
90 | $ hg parents | |
91 |
changeset: 0: |
|
91 | changeset: 0:c19d34741b0a | |
92 | user: test |
|
92 | user: test | |
93 |
date: |
|
93 | date: Thu Jan 01 00:00:00 1970 +0000 | |
94 | summary: 1 |
|
94 | summary: 1 | |
95 |
|
95 | |||
96 | $ hg --debug up |
|
96 | $ hg --debug up | |
97 | searching for copies back to rev 1 |
|
97 | searching for copies back to rev 1 | |
98 | unmatched files in other: |
|
98 | unmatched files in other: | |
99 | b |
|
99 | b | |
100 | resolving manifests |
|
100 | resolving manifests | |
101 | overwrite False partial False |
|
101 | overwrite False partial False | |
102 | ancestor 33aaa84a386b local 33aaa84a386b+ remote 802f095af299 |
|
102 | ancestor c19d34741b0a local c19d34741b0a+ remote 1e71731e6fbb | |
103 | a: versions differ -> m |
|
103 | a: versions differ -> m | |
104 | b: remote created -> g |
|
104 | b: remote created -> g | |
105 | preserving a for resolve of a |
|
105 | preserving a for resolve of a | |
106 | updating: a 1/2 files (50.00%) |
|
106 | updating: a 1/2 files (50.00%) | |
107 | picked tool 'true' for a (binary False symlink False) |
|
107 | picked tool 'true' for a (binary False symlink False) | |
108 | merging a |
|
108 | merging a | |
109 | my a@33aaa84a386b+ other a@802f095af299 ancestor a@33aaa84a386b |
|
109 | my a@c19d34741b0a+ other a@1e71731e6fbb ancestor a@c19d34741b0a | |
110 | updating: b 2/2 files (100.00%) |
|
110 | updating: b 2/2 files (100.00%) | |
111 | getting b |
|
111 | getting b | |
112 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
112 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
113 | $ hg parents |
|
113 | $ hg parents | |
114 |
changeset: 1: |
|
114 | changeset: 1:1e71731e6fbb | |
115 | tag: tip |
|
115 | tag: tip | |
116 | user: test |
|
116 | user: test | |
117 |
date: |
|
117 | date: Thu Jan 01 00:00:00 1970 +0000 | |
118 | summary: 2 |
|
118 | summary: 2 | |
119 |
|
119 | |||
120 | $ hg -v history |
|
120 | $ hg -v history | |
121 |
changeset: 1: |
|
121 | changeset: 1:1e71731e6fbb | |
122 | tag: tip |
|
122 | tag: tip | |
123 | user: test |
|
123 | user: test | |
124 |
date: |
|
124 | date: Thu Jan 01 00:00:00 1970 +0000 | |
125 | files: a b |
|
125 | files: a b | |
126 | description: |
|
126 | description: | |
127 | 2 |
|
127 | 2 | |
128 |
|
128 | |||
129 |
|
129 | |||
130 |
changeset: 0: |
|
130 | changeset: 0:c19d34741b0a | |
131 | user: test |
|
131 | user: test | |
132 |
date: |
|
132 | date: Thu Jan 01 00:00:00 1970 +0000 | |
133 | files: a |
|
133 | files: a | |
134 | description: |
|
134 | description: | |
135 | 1 |
|
135 | 1 | |
136 |
|
136 | |||
137 |
|
137 | |||
138 | $ hg diff --nodates |
|
138 | $ hg diff --nodates | |
139 | diff -r 802f095af299 a |
|
139 | diff -r 1e71731e6fbb a | |
140 | --- a/a |
|
140 | --- a/a | |
141 | +++ b/a |
|
141 | +++ b/a | |
142 | @@ -1,1 +1,1 @@ |
|
142 | @@ -1,1 +1,1 @@ | |
143 | -a2 |
|
143 | -a2 | |
144 | +abc |
|
144 | +abc | |
145 |
|
145 | |||
146 |
|
146 | |||
147 | create a second head |
|
147 | create a second head | |
148 |
|
148 | |||
149 | $ cd ../r1 |
|
149 | $ cd ../r1 | |
150 | $ hg up 0 |
|
150 | $ hg up 0 | |
151 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
151 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
152 | $ echo b2 > b |
|
152 | $ echo b2 > b | |
153 | $ echo a3 > a |
|
153 | $ echo a3 > a | |
154 | $ hg addremove |
|
154 | $ hg addremove | |
155 | adding b |
|
155 | adding b | |
156 |
$ hg commit -m "3" |
|
156 | $ hg commit -m "3" | |
157 | created new head |
|
157 | created new head | |
158 |
|
158 | |||
159 | $ cd ../r2 |
|
159 | $ cd ../r2 | |
160 | $ hg -q pull ../r1 |
|
160 | $ hg -q pull ../r1 | |
161 | $ hg status |
|
161 | $ hg status | |
162 | M a |
|
162 | M a | |
163 | $ hg parents |
|
163 | $ hg parents | |
164 |
changeset: 1: |
|
164 | changeset: 1:1e71731e6fbb | |
165 | user: test |
|
165 | user: test | |
166 |
date: |
|
166 | date: Thu Jan 01 00:00:00 1970 +0000 | |
167 | summary: 2 |
|
167 | summary: 2 | |
168 |
|
168 | |||
169 | $ hg --debug up || echo failed |
|
169 | $ hg --debug up || echo failed | |
170 | abort: crosses branches (use 'hg merge' to merge or use 'hg update -C' to discard changes) |
|
170 | abort: crosses branches (use 'hg merge' to merge or use 'hg update -C' to discard changes) | |
171 | failed |
|
171 | failed | |
172 | $ hg --debug merge || echo failed |
|
172 | $ hg --debug merge || echo failed | |
173 | abort: outstanding uncommitted changes (use 'hg status' to list changes) |
|
173 | abort: outstanding uncommitted changes (use 'hg status' to list changes) | |
174 | failed |
|
174 | failed | |
175 | $ hg --debug merge -f |
|
175 | $ hg --debug merge -f | |
176 | searching for copies back to rev 1 |
|
176 | searching for copies back to rev 1 | |
177 | resolving manifests |
|
177 | resolving manifests | |
178 | overwrite False partial False |
|
178 | overwrite False partial False | |
179 | ancestor 33aaa84a386b local 802f095af299+ remote 030602aee63d |
|
179 | ancestor c19d34741b0a local 1e71731e6fbb+ remote 83c51d0caff4 | |
180 | a: versions differ -> m |
|
180 | a: versions differ -> m | |
181 | b: versions differ -> m |
|
181 | b: versions differ -> m | |
182 | preserving a for resolve of a |
|
182 | preserving a for resolve of a | |
183 | preserving b for resolve of b |
|
183 | preserving b for resolve of b | |
184 | updating: a 1/2 files (50.00%) |
|
184 | updating: a 1/2 files (50.00%) | |
185 | picked tool 'true' for a (binary False symlink False) |
|
185 | picked tool 'true' for a (binary False symlink False) | |
186 | merging a |
|
186 | merging a | |
187 | my a@802f095af299+ other a@030602aee63d ancestor a@33aaa84a386b |
|
187 | my a@1e71731e6fbb+ other a@83c51d0caff4 ancestor a@c19d34741b0a | |
188 | updating: b 2/2 files (100.00%) |
|
188 | updating: b 2/2 files (100.00%) | |
189 | picked tool 'true' for b (binary False symlink False) |
|
189 | picked tool 'true' for b (binary False symlink False) | |
190 | merging b |
|
190 | merging b | |
191 |
my b@ |
|
191 | my b@1e71731e6fbb+ other b@83c51d0caff4 ancestor b@000000000000 | |
192 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
192 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
193 | (branch merge, don't forget to commit) |
|
193 | (branch merge, don't forget to commit) | |
194 | $ hg parents |
|
194 | $ hg parents | |
195 |
changeset: 1: |
|
195 | changeset: 1:1e71731e6fbb | |
196 | user: test |
|
196 | user: test | |
197 |
date: |
|
197 | date: Thu Jan 01 00:00:00 1970 +0000 | |
198 | summary: 2 |
|
198 | summary: 2 | |
199 |
|
199 | |||
200 |
changeset: 2: |
|
200 | changeset: 2:83c51d0caff4 | |
201 | tag: tip |
|
201 | tag: tip | |
202 |
parent: 0: |
|
202 | parent: 0:c19d34741b0a | |
203 | user: test |
|
203 | user: test | |
204 |
date: |
|
204 | date: Thu Jan 01 00:00:00 1970 +0000 | |
205 | summary: 3 |
|
205 | summary: 3 | |
206 |
|
206 | |||
207 | $ hg diff --nodates |
|
207 | $ hg diff --nodates | |
208 | diff -r 802f095af299 a |
|
208 | diff -r 1e71731e6fbb a | |
209 | --- a/a |
|
209 | --- a/a | |
210 | +++ b/a |
|
210 | +++ b/a | |
211 | @@ -1,1 +1,1 @@ |
|
211 | @@ -1,1 +1,1 @@ | |
212 | -a2 |
|
212 | -a2 | |
213 | +abc |
|
213 | +abc | |
214 |
|
214 | |||
215 |
|
215 | |||
216 | test a local add |
|
216 | test a local add | |
217 |
|
217 | |||
218 | $ cd .. |
|
218 | $ cd .. | |
219 | $ hg init a |
|
219 | $ hg init a | |
220 | $ hg init b |
|
220 | $ hg init b | |
221 | $ echo a > a/a |
|
221 | $ echo a > a/a | |
222 | $ echo a > b/a |
|
222 | $ echo a > b/a | |
223 | $ hg --cwd a commit -A -m a |
|
223 | $ hg --cwd a commit -A -m a | |
224 | adding a |
|
224 | adding a | |
225 | $ cd b |
|
225 | $ cd b | |
226 | $ hg add a |
|
226 | $ hg add a | |
227 | $ hg pull -u ../a |
|
227 | $ hg pull -u ../a | |
228 | pulling from ../a |
|
228 | pulling from ../a | |
229 | requesting all changes |
|
229 | requesting all changes | |
230 | adding changesets |
|
230 | adding changesets | |
231 | adding manifests |
|
231 | adding manifests | |
232 | adding file changes |
|
232 | adding file changes | |
233 | added 1 changesets with 1 changes to 1 files |
|
233 | added 1 changesets with 1 changes to 1 files | |
234 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
234 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
235 | $ hg st |
|
235 | $ hg st |
@@ -1,34 +1,34 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | hg init |
|
3 | hg init | |
4 | touch a |
|
4 | touch a | |
5 | hg add a |
|
5 | hg add a | |
6 |
hg commit -m "Added a" |
|
6 | hg commit -m "Added a" | |
7 |
|
7 | |||
8 | touch main |
|
8 | touch main | |
9 | hg add main |
|
9 | hg add main | |
10 |
hg commit -m "Added main" |
|
10 | hg commit -m "Added main" | |
11 | hg checkout 0 |
|
11 | hg checkout 0 | |
12 |
|
12 | |||
13 | echo Main should be gone |
|
13 | echo Main should be gone | |
14 | ls |
|
14 | ls | |
15 |
|
15 | |||
16 | touch side1 |
|
16 | touch side1 | |
17 | hg add side1 |
|
17 | hg add side1 | |
18 |
hg commit -m "Added side1" |
|
18 | hg commit -m "Added side1" | |
19 | touch side2 |
|
19 | touch side2 | |
20 | hg add side2 |
|
20 | hg add side2 | |
21 |
hg commit -m "Added side2" |
|
21 | hg commit -m "Added side2" | |
22 |
|
22 | |||
23 | hg log |
|
23 | hg log | |
24 |
|
24 | |||
25 | echo Should have two heads, side2 and main |
|
25 | echo Should have two heads, side2 and main | |
26 | hg heads |
|
26 | hg heads | |
27 |
|
27 | |||
28 | echo Should show "a side1 side2" |
|
28 | echo Should show "a side1 side2" | |
29 | ls |
|
29 | ls | |
30 |
|
30 | |||
31 | hg update --debug -C 1 |
|
31 | hg update --debug -C 1 | |
32 | echo Should only show "a main" |
|
32 | echo Should only show "a main" | |
33 | ls |
|
33 | ls | |
34 |
|
34 |
@@ -1,58 +1,58 b'' | |||||
1 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
2 | Main should be gone |
|
2 | Main should be gone | |
3 | a |
|
3 | a | |
4 | created new head |
|
4 | created new head | |
5 |
changeset: 3: |
|
5 | changeset: 3:91ebc10ed028 | |
6 | tag: tip |
|
6 | tag: tip | |
7 | user: test |
|
7 | user: test | |
8 |
date: |
|
8 | date: Thu Jan 01 00:00:00 1970 +0000 | |
9 | summary: Added side2 |
|
9 | summary: Added side2 | |
10 |
|
10 | |||
11 |
changeset: 2: |
|
11 | changeset: 2:b932d7dbb1e1 | |
12 |
parent: 0: |
|
12 | parent: 0:c2eda428b523 | |
13 | user: test |
|
13 | user: test | |
14 |
date: |
|
14 | date: Thu Jan 01 00:00:00 1970 +0000 | |
15 | summary: Added side1 |
|
15 | summary: Added side1 | |
16 |
|
16 | |||
17 |
changeset: 1: |
|
17 | changeset: 1:71a760306caf | |
18 | user: test |
|
18 | user: test | |
19 |
date: |
|
19 | date: Thu Jan 01 00:00:00 1970 +0000 | |
20 | summary: Added main |
|
20 | summary: Added main | |
21 |
|
21 | |||
22 |
changeset: 0: |
|
22 | changeset: 0:c2eda428b523 | |
23 | user: test |
|
23 | user: test | |
24 |
date: |
|
24 | date: Thu Jan 01 00:00:00 1970 +0000 | |
25 | summary: Added a |
|
25 | summary: Added a | |
26 |
|
26 | |||
27 | Should have two heads, side2 and main |
|
27 | Should have two heads, side2 and main | |
28 |
changeset: 3: |
|
28 | changeset: 3:91ebc10ed028 | |
29 | tag: tip |
|
29 | tag: tip | |
30 | user: test |
|
30 | user: test | |
31 |
date: |
|
31 | date: Thu Jan 01 00:00:00 1970 +0000 | |
32 | summary: Added side2 |
|
32 | summary: Added side2 | |
33 |
|
33 | |||
34 |
changeset: 1: |
|
34 | changeset: 1:71a760306caf | |
35 | user: test |
|
35 | user: test | |
36 |
date: |
|
36 | date: Thu Jan 01 00:00:00 1970 +0000 | |
37 | summary: Added main |
|
37 | summary: Added main | |
38 |
|
38 | |||
39 | Should show a side1 side2 |
|
39 | Should show a side1 side2 | |
40 | a |
|
40 | a | |
41 | side1 |
|
41 | side1 | |
42 | side2 |
|
42 | side2 | |
43 | resolving manifests |
|
43 | resolving manifests | |
44 | overwrite True partial False |
|
44 | overwrite True partial False | |
45 | ancestor ded32b0db104+ local ded32b0db104+ remote 221226fb2bd8 |
|
45 | ancestor 91ebc10ed028+ local 91ebc10ed028+ remote 71a760306caf | |
46 | side2: other deleted -> r |
|
46 | side2: other deleted -> r | |
47 | side1: other deleted -> r |
|
47 | side1: other deleted -> r | |
48 | main: remote created -> g |
|
48 | main: remote created -> g | |
49 | updating: side1 1/3 files (33.33%) |
|
49 | updating: side1 1/3 files (33.33%) | |
50 | removing side1 |
|
50 | removing side1 | |
51 | updating: side2 2/3 files (66.67%) |
|
51 | updating: side2 2/3 files (66.67%) | |
52 | removing side2 |
|
52 | removing side2 | |
53 | updating: main 3/3 files (100.00%) |
|
53 | updating: main 3/3 files (100.00%) | |
54 | getting main |
|
54 | getting main | |
55 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
55 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
56 | Should only show a main |
|
56 | Should only show a main | |
57 | a |
|
57 | a | |
58 | main |
|
58 | main |
@@ -1,297 +1,297 b'' | |||||
1 | $ mkdir t |
|
1 | $ mkdir t | |
2 | $ cd t |
|
2 | $ cd t | |
3 | $ hg init |
|
3 | $ hg init | |
4 | $ mkdir -p beans |
|
4 | $ mkdir -p beans | |
5 | $ for b in kidney navy turtle borlotti black pinto; do |
|
5 | $ for b in kidney navy turtle borlotti black pinto; do | |
6 | > echo $b > beans/$b |
|
6 | > echo $b > beans/$b | |
7 | $ done |
|
7 | $ done | |
8 | $ mkdir -p mammals/Procyonidae |
|
8 | $ mkdir -p mammals/Procyonidae | |
9 | $ for m in cacomistle coatimundi raccoon; do |
|
9 | $ for m in cacomistle coatimundi raccoon; do | |
10 | > echo $m > mammals/Procyonidae/$m |
|
10 | > echo $m > mammals/Procyonidae/$m | |
11 | $ done |
|
11 | $ done | |
12 | $ echo skunk > mammals/skunk |
|
12 | $ echo skunk > mammals/skunk | |
13 | $ echo fennel > fennel |
|
13 | $ echo fennel > fennel | |
14 | $ echo fenugreek > fenugreek |
|
14 | $ echo fenugreek > fenugreek | |
15 | $ echo fiddlehead > fiddlehead |
|
15 | $ echo fiddlehead > fiddlehead | |
16 | $ echo glob:glob > glob:glob |
|
16 | $ echo glob:glob > glob:glob | |
17 | $ hg addremove |
|
17 | $ hg addremove | |
18 | adding beans/black |
|
18 | adding beans/black | |
19 | adding beans/borlotti |
|
19 | adding beans/borlotti | |
20 | adding beans/kidney |
|
20 | adding beans/kidney | |
21 | adding beans/navy |
|
21 | adding beans/navy | |
22 | adding beans/pinto |
|
22 | adding beans/pinto | |
23 | adding beans/turtle |
|
23 | adding beans/turtle | |
24 | adding fennel |
|
24 | adding fennel | |
25 | adding fenugreek |
|
25 | adding fenugreek | |
26 | adding fiddlehead |
|
26 | adding fiddlehead | |
27 | adding glob:glob |
|
27 | adding glob:glob | |
28 | adding mammals/Procyonidae/cacomistle |
|
28 | adding mammals/Procyonidae/cacomistle | |
29 | adding mammals/Procyonidae/coatimundi |
|
29 | adding mammals/Procyonidae/coatimundi | |
30 | adding mammals/Procyonidae/raccoon |
|
30 | adding mammals/Procyonidae/raccoon | |
31 | adding mammals/skunk |
|
31 | adding mammals/skunk | |
32 |
$ hg commit -m "commit #0" |
|
32 | $ hg commit -m "commit #0" | |
33 |
|
33 | |||
34 | $ hg debugwalk |
|
34 | $ hg debugwalk | |
35 | f beans/black beans/black |
|
35 | f beans/black beans/black | |
36 | f beans/borlotti beans/borlotti |
|
36 | f beans/borlotti beans/borlotti | |
37 | f beans/kidney beans/kidney |
|
37 | f beans/kidney beans/kidney | |
38 | f beans/navy beans/navy |
|
38 | f beans/navy beans/navy | |
39 | f beans/pinto beans/pinto |
|
39 | f beans/pinto beans/pinto | |
40 | f beans/turtle beans/turtle |
|
40 | f beans/turtle beans/turtle | |
41 | f fennel fennel |
|
41 | f fennel fennel | |
42 | f fenugreek fenugreek |
|
42 | f fenugreek fenugreek | |
43 | f fiddlehead fiddlehead |
|
43 | f fiddlehead fiddlehead | |
44 | f glob:glob glob:glob |
|
44 | f glob:glob glob:glob | |
45 | f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle |
|
45 | f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle | |
46 | f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi |
|
46 | f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi | |
47 | f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon |
|
47 | f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon | |
48 | f mammals/skunk mammals/skunk |
|
48 | f mammals/skunk mammals/skunk | |
49 | $ hg debugwalk -I. |
|
49 | $ hg debugwalk -I. | |
50 | f beans/black beans/black |
|
50 | f beans/black beans/black | |
51 | f beans/borlotti beans/borlotti |
|
51 | f beans/borlotti beans/borlotti | |
52 | f beans/kidney beans/kidney |
|
52 | f beans/kidney beans/kidney | |
53 | f beans/navy beans/navy |
|
53 | f beans/navy beans/navy | |
54 | f beans/pinto beans/pinto |
|
54 | f beans/pinto beans/pinto | |
55 | f beans/turtle beans/turtle |
|
55 | f beans/turtle beans/turtle | |
56 | f fennel fennel |
|
56 | f fennel fennel | |
57 | f fenugreek fenugreek |
|
57 | f fenugreek fenugreek | |
58 | f fiddlehead fiddlehead |
|
58 | f fiddlehead fiddlehead | |
59 | f glob:glob glob:glob |
|
59 | f glob:glob glob:glob | |
60 | f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle |
|
60 | f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle | |
61 | f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi |
|
61 | f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi | |
62 | f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon |
|
62 | f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon | |
63 | f mammals/skunk mammals/skunk |
|
63 | f mammals/skunk mammals/skunk | |
64 |
|
64 | |||
65 | $ cd mammals |
|
65 | $ cd mammals | |
66 | $ hg debugwalk |
|
66 | $ hg debugwalk | |
67 | f beans/black ../beans/black |
|
67 | f beans/black ../beans/black | |
68 | f beans/borlotti ../beans/borlotti |
|
68 | f beans/borlotti ../beans/borlotti | |
69 | f beans/kidney ../beans/kidney |
|
69 | f beans/kidney ../beans/kidney | |
70 | f beans/navy ../beans/navy |
|
70 | f beans/navy ../beans/navy | |
71 | f beans/pinto ../beans/pinto |
|
71 | f beans/pinto ../beans/pinto | |
72 | f beans/turtle ../beans/turtle |
|
72 | f beans/turtle ../beans/turtle | |
73 | f fennel ../fennel |
|
73 | f fennel ../fennel | |
74 | f fenugreek ../fenugreek |
|
74 | f fenugreek ../fenugreek | |
75 | f fiddlehead ../fiddlehead |
|
75 | f fiddlehead ../fiddlehead | |
76 | f glob:glob ../glob:glob |
|
76 | f glob:glob ../glob:glob | |
77 | f mammals/Procyonidae/cacomistle Procyonidae/cacomistle |
|
77 | f mammals/Procyonidae/cacomistle Procyonidae/cacomistle | |
78 | f mammals/Procyonidae/coatimundi Procyonidae/coatimundi |
|
78 | f mammals/Procyonidae/coatimundi Procyonidae/coatimundi | |
79 | f mammals/Procyonidae/raccoon Procyonidae/raccoon |
|
79 | f mammals/Procyonidae/raccoon Procyonidae/raccoon | |
80 | f mammals/skunk skunk |
|
80 | f mammals/skunk skunk | |
81 | $ hg debugwalk -X ../beans |
|
81 | $ hg debugwalk -X ../beans | |
82 | f fennel ../fennel |
|
82 | f fennel ../fennel | |
83 | f fenugreek ../fenugreek |
|
83 | f fenugreek ../fenugreek | |
84 | f fiddlehead ../fiddlehead |
|
84 | f fiddlehead ../fiddlehead | |
85 | f glob:glob ../glob:glob |
|
85 | f glob:glob ../glob:glob | |
86 | f mammals/Procyonidae/cacomistle Procyonidae/cacomistle |
|
86 | f mammals/Procyonidae/cacomistle Procyonidae/cacomistle | |
87 | f mammals/Procyonidae/coatimundi Procyonidae/coatimundi |
|
87 | f mammals/Procyonidae/coatimundi Procyonidae/coatimundi | |
88 | f mammals/Procyonidae/raccoon Procyonidae/raccoon |
|
88 | f mammals/Procyonidae/raccoon Procyonidae/raccoon | |
89 | f mammals/skunk skunk |
|
89 | f mammals/skunk skunk | |
90 | $ hg debugwalk -I '*k' |
|
90 | $ hg debugwalk -I '*k' | |
91 | f mammals/skunk skunk |
|
91 | f mammals/skunk skunk | |
92 | $ hg debugwalk -I 'glob:*k' |
|
92 | $ hg debugwalk -I 'glob:*k' | |
93 | f mammals/skunk skunk |
|
93 | f mammals/skunk skunk | |
94 | $ hg debugwalk -I 'relglob:*k' |
|
94 | $ hg debugwalk -I 'relglob:*k' | |
95 | f beans/black ../beans/black |
|
95 | f beans/black ../beans/black | |
96 | f fenugreek ../fenugreek |
|
96 | f fenugreek ../fenugreek | |
97 | f mammals/skunk skunk |
|
97 | f mammals/skunk skunk | |
98 | $ hg debugwalk -I 'relglob:*k' . |
|
98 | $ hg debugwalk -I 'relglob:*k' . | |
99 | f mammals/skunk skunk |
|
99 | f mammals/skunk skunk | |
100 | $ hg debugwalk -I 're:.*k$' |
|
100 | $ hg debugwalk -I 're:.*k$' | |
101 | f beans/black ../beans/black |
|
101 | f beans/black ../beans/black | |
102 | f fenugreek ../fenugreek |
|
102 | f fenugreek ../fenugreek | |
103 | f mammals/skunk skunk |
|
103 | f mammals/skunk skunk | |
104 | $ hg debugwalk -I 'relre:.*k$' |
|
104 | $ hg debugwalk -I 'relre:.*k$' | |
105 | f beans/black ../beans/black |
|
105 | f beans/black ../beans/black | |
106 | f fenugreek ../fenugreek |
|
106 | f fenugreek ../fenugreek | |
107 | f mammals/skunk skunk |
|
107 | f mammals/skunk skunk | |
108 | $ hg debugwalk -I 'path:beans' |
|
108 | $ hg debugwalk -I 'path:beans' | |
109 | f beans/black ../beans/black |
|
109 | f beans/black ../beans/black | |
110 | f beans/borlotti ../beans/borlotti |
|
110 | f beans/borlotti ../beans/borlotti | |
111 | f beans/kidney ../beans/kidney |
|
111 | f beans/kidney ../beans/kidney | |
112 | f beans/navy ../beans/navy |
|
112 | f beans/navy ../beans/navy | |
113 | f beans/pinto ../beans/pinto |
|
113 | f beans/pinto ../beans/pinto | |
114 | f beans/turtle ../beans/turtle |
|
114 | f beans/turtle ../beans/turtle | |
115 | $ hg debugwalk -I 'relpath:../beans' |
|
115 | $ hg debugwalk -I 'relpath:../beans' | |
116 | f beans/black ../beans/black |
|
116 | f beans/black ../beans/black | |
117 | f beans/borlotti ../beans/borlotti |
|
117 | f beans/borlotti ../beans/borlotti | |
118 | f beans/kidney ../beans/kidney |
|
118 | f beans/kidney ../beans/kidney | |
119 | f beans/navy ../beans/navy |
|
119 | f beans/navy ../beans/navy | |
120 | f beans/pinto ../beans/pinto |
|
120 | f beans/pinto ../beans/pinto | |
121 | f beans/turtle ../beans/turtle |
|
121 | f beans/turtle ../beans/turtle | |
122 | $ hg debugwalk . |
|
122 | $ hg debugwalk . | |
123 | f mammals/Procyonidae/cacomistle Procyonidae/cacomistle |
|
123 | f mammals/Procyonidae/cacomistle Procyonidae/cacomistle | |
124 | f mammals/Procyonidae/coatimundi Procyonidae/coatimundi |
|
124 | f mammals/Procyonidae/coatimundi Procyonidae/coatimundi | |
125 | f mammals/Procyonidae/raccoon Procyonidae/raccoon |
|
125 | f mammals/Procyonidae/raccoon Procyonidae/raccoon | |
126 | f mammals/skunk skunk |
|
126 | f mammals/skunk skunk | |
127 | $ hg debugwalk -I. |
|
127 | $ hg debugwalk -I. | |
128 | f mammals/Procyonidae/cacomistle Procyonidae/cacomistle |
|
128 | f mammals/Procyonidae/cacomistle Procyonidae/cacomistle | |
129 | f mammals/Procyonidae/coatimundi Procyonidae/coatimundi |
|
129 | f mammals/Procyonidae/coatimundi Procyonidae/coatimundi | |
130 | f mammals/Procyonidae/raccoon Procyonidae/raccoon |
|
130 | f mammals/Procyonidae/raccoon Procyonidae/raccoon | |
131 | f mammals/skunk skunk |
|
131 | f mammals/skunk skunk | |
132 | $ hg debugwalk Procyonidae |
|
132 | $ hg debugwalk Procyonidae | |
133 | f mammals/Procyonidae/cacomistle Procyonidae/cacomistle |
|
133 | f mammals/Procyonidae/cacomistle Procyonidae/cacomistle | |
134 | f mammals/Procyonidae/coatimundi Procyonidae/coatimundi |
|
134 | f mammals/Procyonidae/coatimundi Procyonidae/coatimundi | |
135 | f mammals/Procyonidae/raccoon Procyonidae/raccoon |
|
135 | f mammals/Procyonidae/raccoon Procyonidae/raccoon | |
136 |
|
136 | |||
137 | $ cd Procyonidae |
|
137 | $ cd Procyonidae | |
138 | $ hg debugwalk . |
|
138 | $ hg debugwalk . | |
139 | f mammals/Procyonidae/cacomistle cacomistle |
|
139 | f mammals/Procyonidae/cacomistle cacomistle | |
140 | f mammals/Procyonidae/coatimundi coatimundi |
|
140 | f mammals/Procyonidae/coatimundi coatimundi | |
141 | f mammals/Procyonidae/raccoon raccoon |
|
141 | f mammals/Procyonidae/raccoon raccoon | |
142 | $ hg debugwalk .. |
|
142 | $ hg debugwalk .. | |
143 | f mammals/Procyonidae/cacomistle cacomistle |
|
143 | f mammals/Procyonidae/cacomistle cacomistle | |
144 | f mammals/Procyonidae/coatimundi coatimundi |
|
144 | f mammals/Procyonidae/coatimundi coatimundi | |
145 | f mammals/Procyonidae/raccoon raccoon |
|
145 | f mammals/Procyonidae/raccoon raccoon | |
146 | f mammals/skunk ../skunk |
|
146 | f mammals/skunk ../skunk | |
147 | $ cd .. |
|
147 | $ cd .. | |
148 |
|
148 | |||
149 | $ hg debugwalk ../beans |
|
149 | $ hg debugwalk ../beans | |
150 | f beans/black ../beans/black |
|
150 | f beans/black ../beans/black | |
151 | f beans/borlotti ../beans/borlotti |
|
151 | f beans/borlotti ../beans/borlotti | |
152 | f beans/kidney ../beans/kidney |
|
152 | f beans/kidney ../beans/kidney | |
153 | f beans/navy ../beans/navy |
|
153 | f beans/navy ../beans/navy | |
154 | f beans/pinto ../beans/pinto |
|
154 | f beans/pinto ../beans/pinto | |
155 | f beans/turtle ../beans/turtle |
|
155 | f beans/turtle ../beans/turtle | |
156 | $ hg debugwalk . |
|
156 | $ hg debugwalk . | |
157 | f mammals/Procyonidae/cacomistle Procyonidae/cacomistle |
|
157 | f mammals/Procyonidae/cacomistle Procyonidae/cacomistle | |
158 | f mammals/Procyonidae/coatimundi Procyonidae/coatimundi |
|
158 | f mammals/Procyonidae/coatimundi Procyonidae/coatimundi | |
159 | f mammals/Procyonidae/raccoon Procyonidae/raccoon |
|
159 | f mammals/Procyonidae/raccoon Procyonidae/raccoon | |
160 | f mammals/skunk skunk |
|
160 | f mammals/skunk skunk | |
161 | $ hg debugwalk .hg |
|
161 | $ hg debugwalk .hg | |
162 | abort: path 'mammals/.hg' is inside repo 'mammals' |
|
162 | abort: path 'mammals/.hg' is inside repo 'mammals' | |
163 | $ hg debugwalk ../.hg |
|
163 | $ hg debugwalk ../.hg | |
164 | abort: path contains illegal component: .hg |
|
164 | abort: path contains illegal component: .hg | |
165 | $ cd .. |
|
165 | $ cd .. | |
166 |
|
166 | |||
167 | $ hg debugwalk -Ibeans |
|
167 | $ hg debugwalk -Ibeans | |
168 | f beans/black beans/black |
|
168 | f beans/black beans/black | |
169 | f beans/borlotti beans/borlotti |
|
169 | f beans/borlotti beans/borlotti | |
170 | f beans/kidney beans/kidney |
|
170 | f beans/kidney beans/kidney | |
171 | f beans/navy beans/navy |
|
171 | f beans/navy beans/navy | |
172 | f beans/pinto beans/pinto |
|
172 | f beans/pinto beans/pinto | |
173 | f beans/turtle beans/turtle |
|
173 | f beans/turtle beans/turtle | |
174 | $ hg debugwalk -I '{*,{b,m}*/*}k' |
|
174 | $ hg debugwalk -I '{*,{b,m}*/*}k' | |
175 | f beans/black beans/black |
|
175 | f beans/black beans/black | |
176 | f fenugreek fenugreek |
|
176 | f fenugreek fenugreek | |
177 | f mammals/skunk mammals/skunk |
|
177 | f mammals/skunk mammals/skunk | |
178 | $ hg debugwalk 'glob:mammals/../beans/b*' |
|
178 | $ hg debugwalk 'glob:mammals/../beans/b*' | |
179 | f beans/black beans/black |
|
179 | f beans/black beans/black | |
180 | f beans/borlotti beans/borlotti |
|
180 | f beans/borlotti beans/borlotti | |
181 | $ hg debugwalk '-X*/Procyonidae' mammals |
|
181 | $ hg debugwalk '-X*/Procyonidae' mammals | |
182 | f mammals/skunk mammals/skunk |
|
182 | f mammals/skunk mammals/skunk | |
183 | $ hg debugwalk path:mammals |
|
183 | $ hg debugwalk path:mammals | |
184 | f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle |
|
184 | f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle | |
185 | f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi |
|
185 | f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi | |
186 | f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon |
|
186 | f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon | |
187 | f mammals/skunk mammals/skunk |
|
187 | f mammals/skunk mammals/skunk | |
188 | $ hg debugwalk .. |
|
188 | $ hg debugwalk .. | |
189 | abort: .. not under root |
|
189 | abort: .. not under root | |
190 | $ hg debugwalk beans/../.. |
|
190 | $ hg debugwalk beans/../.. | |
191 | abort: beans/../.. not under root |
|
191 | abort: beans/../.. not under root | |
192 | $ hg debugwalk .hg |
|
192 | $ hg debugwalk .hg | |
193 | abort: path contains illegal component: .hg |
|
193 | abort: path contains illegal component: .hg | |
194 | $ hg debugwalk beans/../.hg |
|
194 | $ hg debugwalk beans/../.hg | |
195 | abort: path contains illegal component: .hg |
|
195 | abort: path contains illegal component: .hg | |
196 | $ hg debugwalk beans/../.hg/data |
|
196 | $ hg debugwalk beans/../.hg/data | |
197 | abort: path contains illegal component: .hg/data |
|
197 | abort: path contains illegal component: .hg/data | |
198 | $ hg debugwalk beans/.hg |
|
198 | $ hg debugwalk beans/.hg | |
199 | abort: path 'beans/.hg' is inside repo 'beans' |
|
199 | abort: path 'beans/.hg' is inside repo 'beans' | |
200 |
|
200 | |||
201 | Test absolute paths: |
|
201 | Test absolute paths: | |
202 |
|
202 | |||
203 | $ hg debugwalk `pwd`/beans |
|
203 | $ hg debugwalk `pwd`/beans | |
204 | f beans/black beans/black |
|
204 | f beans/black beans/black | |
205 | f beans/borlotti beans/borlotti |
|
205 | f beans/borlotti beans/borlotti | |
206 | f beans/kidney beans/kidney |
|
206 | f beans/kidney beans/kidney | |
207 | f beans/navy beans/navy |
|
207 | f beans/navy beans/navy | |
208 | f beans/pinto beans/pinto |
|
208 | f beans/pinto beans/pinto | |
209 | f beans/turtle beans/turtle |
|
209 | f beans/turtle beans/turtle | |
210 | $ hg debugwalk `pwd`/.. |
|
210 | $ hg debugwalk `pwd`/.. | |
211 | abort: .*/.. not under root |
|
211 | abort: .*/.. not under root | |
212 |
|
212 | |||
213 | Test patterns: |
|
213 | Test patterns: | |
214 |
|
214 | |||
215 | $ hg debugwalk glob:\* |
|
215 | $ hg debugwalk glob:\* | |
216 | f fennel fennel |
|
216 | f fennel fennel | |
217 | f fenugreek fenugreek |
|
217 | f fenugreek fenugreek | |
218 | f fiddlehead fiddlehead |
|
218 | f fiddlehead fiddlehead | |
219 | f glob:glob glob:glob |
|
219 | f glob:glob glob:glob | |
220 |
|
220 | |||
221 | $ hg debugwalk 'glob:**e' |
|
221 | $ hg debugwalk 'glob:**e' | |
222 | f beans/turtle beans/turtle |
|
222 | f beans/turtle beans/turtle | |
223 | f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle |
|
223 | f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle | |
224 |
|
224 | |||
225 | $ hg debugwalk 're:.*[kb]$' |
|
225 | $ hg debugwalk 're:.*[kb]$' | |
226 | f beans/black beans/black |
|
226 | f beans/black beans/black | |
227 | f fenugreek fenugreek |
|
227 | f fenugreek fenugreek | |
228 | f glob:glob glob:glob |
|
228 | f glob:glob glob:glob | |
229 | f mammals/skunk mammals/skunk |
|
229 | f mammals/skunk mammals/skunk | |
230 |
|
230 | |||
231 | $ hg debugwalk path:beans/black |
|
231 | $ hg debugwalk path:beans/black | |
232 | f beans/black beans/black exact |
|
232 | f beans/black beans/black exact | |
233 | $ hg debugwalk path:beans//black |
|
233 | $ hg debugwalk path:beans//black | |
234 | f beans/black beans/black exact |
|
234 | f beans/black beans/black exact | |
235 |
|
235 | |||
236 | $ hg debugwalk relglob:Procyonidae |
|
236 | $ hg debugwalk relglob:Procyonidae | |
237 | $ hg debugwalk 'relglob:Procyonidae/**' |
|
237 | $ hg debugwalk 'relglob:Procyonidae/**' | |
238 | f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle |
|
238 | f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle | |
239 | f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi |
|
239 | f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi | |
240 | f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon |
|
240 | f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon | |
241 | $ hg debugwalk 'relglob:Procyonidae/**' fennel |
|
241 | $ hg debugwalk 'relglob:Procyonidae/**' fennel | |
242 | f fennel fennel exact |
|
242 | f fennel fennel exact | |
243 | f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle |
|
243 | f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle | |
244 | f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi |
|
244 | f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi | |
245 | f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon |
|
245 | f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon | |
246 | $ hg debugwalk beans 'glob:beans/*' |
|
246 | $ hg debugwalk beans 'glob:beans/*' | |
247 | f beans/black beans/black |
|
247 | f beans/black beans/black | |
248 | f beans/borlotti beans/borlotti |
|
248 | f beans/borlotti beans/borlotti | |
249 | f beans/kidney beans/kidney |
|
249 | f beans/kidney beans/kidney | |
250 | f beans/navy beans/navy |
|
250 | f beans/navy beans/navy | |
251 | f beans/pinto beans/pinto |
|
251 | f beans/pinto beans/pinto | |
252 | f beans/turtle beans/turtle |
|
252 | f beans/turtle beans/turtle | |
253 | $ hg debugwalk 'glob:mamm**' |
|
253 | $ hg debugwalk 'glob:mamm**' | |
254 | f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle |
|
254 | f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle | |
255 | f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi |
|
255 | f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi | |
256 | f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon |
|
256 | f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon | |
257 | f mammals/skunk mammals/skunk |
|
257 | f mammals/skunk mammals/skunk | |
258 | $ hg debugwalk 'glob:mamm**' fennel |
|
258 | $ hg debugwalk 'glob:mamm**' fennel | |
259 | f fennel fennel exact |
|
259 | f fennel fennel exact | |
260 | f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle |
|
260 | f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle | |
261 | f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi |
|
261 | f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi | |
262 | f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon |
|
262 | f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon | |
263 | f mammals/skunk mammals/skunk |
|
263 | f mammals/skunk mammals/skunk | |
264 | $ hg debugwalk 'glob:j*' |
|
264 | $ hg debugwalk 'glob:j*' | |
265 | $ hg debugwalk NOEXIST |
|
265 | $ hg debugwalk NOEXIST | |
266 | NOEXIST: No such file or directory |
|
266 | NOEXIST: No such file or directory | |
267 |
|
267 | |||
268 | $ mkfifo fifo |
|
268 | $ mkfifo fifo | |
269 | $ hg debugwalk fifo |
|
269 | $ hg debugwalk fifo | |
270 | fifo: unsupported file type (type is fifo) |
|
270 | fifo: unsupported file type (type is fifo) | |
271 |
|
271 | |||
272 | $ rm fenugreek |
|
272 | $ rm fenugreek | |
273 | $ hg debugwalk fenugreek |
|
273 | $ hg debugwalk fenugreek | |
274 | f fenugreek fenugreek exact |
|
274 | f fenugreek fenugreek exact | |
275 | $ hg rm fenugreek |
|
275 | $ hg rm fenugreek | |
276 | $ hg debugwalk fenugreek |
|
276 | $ hg debugwalk fenugreek | |
277 | f fenugreek fenugreek exact |
|
277 | f fenugreek fenugreek exact | |
278 | $ touch new |
|
278 | $ touch new | |
279 | $ hg debugwalk new |
|
279 | $ hg debugwalk new | |
280 | f new new exact |
|
280 | f new new exact | |
281 |
|
281 | |||
282 | $ mkdir ignored |
|
282 | $ mkdir ignored | |
283 | $ touch ignored/file |
|
283 | $ touch ignored/file | |
284 | $ echo '^ignored$' > .hgignore |
|
284 | $ echo '^ignored$' > .hgignore | |
285 | $ hg debugwalk ignored |
|
285 | $ hg debugwalk ignored | |
286 | $ hg debugwalk ignored/file |
|
286 | $ hg debugwalk ignored/file | |
287 | f ignored/file ignored/file exact |
|
287 | f ignored/file ignored/file exact | |
288 |
|
288 | |||
289 | $ cd .. |
|
289 | $ cd .. | |
290 | $ hg debugwalk -R t t/mammals/skunk |
|
290 | $ hg debugwalk -R t t/mammals/skunk | |
291 | f mammals/skunk t/mammals/skunk exact |
|
291 | f mammals/skunk t/mammals/skunk exact | |
292 | $ mkdir t2 |
|
292 | $ mkdir t2 | |
293 | $ cd t2 |
|
293 | $ cd t2 | |
294 | $ hg debugwalk -R ../t ../t/mammals/skunk |
|
294 | $ hg debugwalk -R ../t ../t/mammals/skunk | |
295 | f mammals/skunk ../t/mammals/skunk exact |
|
295 | f mammals/skunk ../t/mammals/skunk exact | |
296 | $ hg debugwalk --cwd ../t mammals/skunk |
|
296 | $ hg debugwalk --cwd ../t mammals/skunk | |
297 | f mammals/skunk mammals/skunk exact |
|
297 | f mammals/skunk mammals/skunk exact |
General Comments 0
You need to be logged in to leave comments.
Login now