Show More
@@ -1,47 +1,47 b'' | |||
|
1 | 1 | $ hg init rep |
|
2 | 2 | $ cd rep |
|
3 | 3 | $ mkdir dir |
|
4 | 4 | $ touch foo dir/bar |
|
5 | 5 | $ hg -v addremove |
|
6 | 6 | adding dir/bar |
|
7 | 7 | adding foo |
|
8 |
$ hg -v commit -m "add 1" |
|
|
8 | $ hg -v commit -m "add 1" | |
|
9 | 9 | dir/bar |
|
10 | 10 | foo |
|
11 |
committed changeset 0: |
|
|
11 | committed changeset 0:6f7f953567a2 | |
|
12 | 12 | $ cd dir/ |
|
13 | 13 | $ touch ../foo_2 bar_2 |
|
14 | 14 | $ hg -v addremove |
|
15 | 15 | adding dir/bar_2 |
|
16 | 16 | adding foo_2 |
|
17 |
$ hg -v commit -m "add 2" |
|
|
17 | $ hg -v commit -m "add 2" | |
|
18 | 18 | dir/bar_2 |
|
19 | 19 | foo_2 |
|
20 |
committed changeset 1: |
|
|
20 | committed changeset 1:e65414bf35c5 | |
|
21 | 21 | |
|
22 | 22 | $ cd .. |
|
23 | 23 | $ hg init sim |
|
24 | 24 | $ cd sim |
|
25 | 25 | $ echo a > a |
|
26 | 26 | $ echo a >> a |
|
27 | 27 | $ echo a >> a |
|
28 | 28 | $ echo c > c |
|
29 | 29 | $ hg commit -Ama |
|
30 | 30 | adding a |
|
31 | 31 | adding c |
|
32 | 32 | $ mv a b |
|
33 | 33 | $ rm c |
|
34 | 34 | $ echo d > d |
|
35 | 35 | $ hg addremove -n -s 50 # issue 1696 |
|
36 | 36 | removing a |
|
37 | 37 | adding b |
|
38 | 38 | removing c |
|
39 | 39 | adding d |
|
40 | 40 | recording removal of a as rename to b (100% similar) |
|
41 | 41 | $ hg addremove -s 50 |
|
42 | 42 | removing a |
|
43 | 43 | adding b |
|
44 | 44 | removing c |
|
45 | 45 | adding d |
|
46 | 46 | recording removal of a as rename to b (100% similar) |
|
47 | 47 | $ hg commit -mb |
@@ -1,16 +1,16 b'' | |||
|
1 | 1 | $ hg init |
|
2 | 2 | $ echo This is file a1 > a |
|
3 | 3 | $ hg add a |
|
4 |
$ hg commit -m "commit #0" |
|
|
4 | $ hg commit -m "commit #0" | |
|
5 | 5 | $ ls |
|
6 | 6 | a |
|
7 | 7 | $ echo This is file b1 > b |
|
8 | 8 | $ hg add b |
|
9 |
$ hg commit -m "commit #1" |
|
|
9 | $ hg commit -m "commit #1" | |
|
10 | 10 | $ hg co 0 |
|
11 | 11 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
12 | 12 | |
|
13 | 13 | B should disappear |
|
14 | 14 | |
|
15 | 15 | $ ls |
|
16 | 16 | a |
@@ -1,40 +1,40 b'' | |||
|
1 | 1 | Create a repository: |
|
2 | 2 | |
|
3 | 3 | $ mkdir t |
|
4 | 4 | $ cd t |
|
5 | 5 | $ hg init |
|
6 | 6 | |
|
7 | 7 | Make a changeset: |
|
8 | 8 | |
|
9 | 9 | $ echo a > a |
|
10 | 10 | $ hg add a |
|
11 |
$ hg commit -m test |
|
|
11 | $ hg commit -m test | |
|
12 | 12 | |
|
13 | 13 | This command is ancient: |
|
14 | 14 | |
|
15 | 15 | $ hg history |
|
16 |
changeset: 0: |
|
|
16 | changeset: 0:acb14030fe0a | |
|
17 | 17 | tag: tip |
|
18 | 18 | user: test |
|
19 |
date: |
|
|
19 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
20 | 20 | summary: test |
|
21 | 21 | |
|
22 | 22 | |
|
23 | 23 | Poke around at hashes: |
|
24 | 24 | |
|
25 | 25 | $ hg manifest --debug |
|
26 | 26 | b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 644 a |
|
27 | 27 | |
|
28 | 28 | $ hg cat a |
|
29 | 29 | a |
|
30 | 30 | |
|
31 | 31 | Verify should succeed: |
|
32 | 32 | |
|
33 | 33 | $ hg verify |
|
34 | 34 | checking changesets |
|
35 | 35 | checking manifests |
|
36 | 36 | crosschecking files in changesets and manifests |
|
37 | 37 | checking files |
|
38 | 38 | 1 files, 1 changesets, 1 total revisions |
|
39 | 39 | |
|
40 | 40 | At the end... |
@@ -1,60 +1,60 b'' | |||
|
1 | 1 | $ echo "[extensions]" >> $HGRCPATH |
|
2 | 2 | $ echo "bookmarks=" >> $HGRCPATH |
|
3 | 3 | $ echo "mq=" >> $HGRCPATH |
|
4 | 4 | |
|
5 | 5 | $ hg init |
|
6 | 6 | |
|
7 | 7 | $ echo qqq>qqq.txt |
|
8 | 8 | |
|
9 | 9 | add file |
|
10 | 10 | |
|
11 | 11 | $ hg add |
|
12 | 12 | adding qqq.txt |
|
13 | 13 | |
|
14 | 14 | commit first revision |
|
15 | 15 | |
|
16 |
$ hg ci -m 1 |
|
|
16 | $ hg ci -m 1 | |
|
17 | 17 | |
|
18 | 18 | set bookmark |
|
19 | 19 | |
|
20 | 20 | $ hg book test |
|
21 | 21 | |
|
22 | 22 | $ echo www>>qqq.txt |
|
23 | 23 | |
|
24 | 24 | commit second revision |
|
25 | 25 | |
|
26 |
$ hg ci -m 2 |
|
|
26 | $ hg ci -m 2 | |
|
27 | 27 | |
|
28 | 28 | set bookmark |
|
29 | 29 | |
|
30 | 30 | $ hg book test2 |
|
31 | 31 | |
|
32 | 32 | update to -2 |
|
33 | 33 | |
|
34 | 34 | $ hg update -r -2 |
|
35 | 35 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
36 | 36 | |
|
37 | 37 | $ echo eee>>qqq.txt |
|
38 | 38 | |
|
39 | 39 | commit new head |
|
40 | 40 | |
|
41 |
$ hg ci -m 3 |
|
|
41 | $ hg ci -m 3 | |
|
42 | 42 | created new head |
|
43 | 43 | |
|
44 | 44 | bookmarks updated? |
|
45 | 45 | |
|
46 | 46 | $ hg book |
|
47 |
test 1: |
|
|
48 |
test2 1: |
|
|
47 | test 1:25e1ee7a0081 | |
|
48 | test2 1:25e1ee7a0081 | |
|
49 | 49 | |
|
50 | 50 | strip to revision 1 |
|
51 | 51 | |
|
52 | 52 | $ hg strip 1 |
|
53 | 53 | saved backup bundle to .* |
|
54 | 54 | |
|
55 | 55 | list bookmarks |
|
56 | 56 | |
|
57 | 57 | $ hg book |
|
58 |
* test 1: |
|
|
59 |
* test2 1: |
|
|
58 | * test 1:8cf31af87a2b | |
|
59 | * test2 1:8cf31af87a2b | |
|
60 | 60 |
@@ -1,367 +1,367 b'' | |||
|
1 | 1 | $ hg init test |
|
2 | 2 | $ cd test |
|
3 | 3 | $ echo "0" >> afile |
|
4 | 4 | $ hg add afile |
|
5 |
$ hg commit -m "0.0" |
|
|
5 | $ hg commit -m "0.0" | |
|
6 | 6 | $ echo "1" >> afile |
|
7 |
$ hg commit -m "0.1" |
|
|
7 | $ hg commit -m "0.1" | |
|
8 | 8 | $ echo "2" >> afile |
|
9 |
$ hg commit -m "0.2" |
|
|
9 | $ hg commit -m "0.2" | |
|
10 | 10 | $ echo "3" >> afile |
|
11 |
$ hg commit -m "0.3" |
|
|
11 | $ hg commit -m "0.3" | |
|
12 | 12 | $ hg update -C 0 |
|
13 | 13 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
14 | 14 | $ echo "1" >> afile |
|
15 |
$ hg commit -m "1.1" |
|
|
15 | $ hg commit -m "1.1" | |
|
16 | 16 | created new head |
|
17 | 17 | $ echo "2" >> afile |
|
18 |
$ hg commit -m "1.2" |
|
|
18 | $ hg commit -m "1.2" | |
|
19 | 19 | $ echo "a line" > fred |
|
20 | 20 | $ echo "3" >> afile |
|
21 | 21 | $ hg add fred |
|
22 |
$ hg commit -m "1.3" |
|
|
22 | $ hg commit -m "1.3" | |
|
23 | 23 | $ hg mv afile adifferentfile |
|
24 |
$ hg commit -m "1.3m" |
|
|
24 | $ hg commit -m "1.3m" | |
|
25 | 25 | $ hg update -C 3 |
|
26 | 26 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
27 | 27 | $ hg mv afile anotherfile |
|
28 |
$ hg commit -m "0.3m" |
|
|
28 | $ hg commit -m "0.3m" | |
|
29 | 29 | $ hg debugindex .hg/store/data/afile.i |
|
30 | 30 | rev offset length base linkrev nodeid p1 p2 |
|
31 | 31 | 0 0 3 0 0 362fef284ce2 000000000000 000000000000 |
|
32 | 32 | 1 3 5 1 1 125144f7e028 362fef284ce2 000000000000 |
|
33 | 33 | 2 8 7 2 2 4c982badb186 125144f7e028 000000000000 |
|
34 | 34 | 3 15 9 3 3 19b1fc555737 4c982badb186 000000000000 |
|
35 | 35 | $ hg debugindex .hg/store/data/adifferentfile.i |
|
36 | 36 | rev offset length base linkrev nodeid p1 p2 |
|
37 | 37 | 0 0 75 0 7 2565f3199a74 000000000000 000000000000 |
|
38 | 38 | $ hg debugindex .hg/store/data/anotherfile.i |
|
39 | 39 | rev offset length base linkrev nodeid p1 p2 |
|
40 | 40 | 0 0 75 0 8 2565f3199a74 000000000000 000000000000 |
|
41 | 41 | $ hg debugindex .hg/store/data/fred.i |
|
42 | 42 | rev offset length base linkrev nodeid p1 p2 |
|
43 | 43 | 0 0 8 0 6 12ab3bcc5ea4 000000000000 000000000000 |
|
44 | 44 | $ hg debugindex .hg/store/00manifest.i |
|
45 | 45 | rev offset length base linkrev nodeid p1 p2 |
|
46 | 46 | 0 0 48 0 0 43eadb1d2d06 000000000000 000000000000 |
|
47 | 47 | 1 48 48 1 1 8b89697eba2c 43eadb1d2d06 000000000000 |
|
48 | 48 | 2 96 48 2 2 626a32663c2f 8b89697eba2c 000000000000 |
|
49 | 49 | 3 144 48 3 3 f54c32f13478 626a32663c2f 000000000000 |
|
50 | 50 | 4 192 58 3 6 de68e904d169 626a32663c2f 000000000000 |
|
51 | 51 | 5 250 68 3 7 09bb521d218d de68e904d169 000000000000 |
|
52 | 52 | 6 318 54 6 8 1fde233dfb0f f54c32f13478 000000000000 |
|
53 | 53 | $ hg verify |
|
54 | 54 | checking changesets |
|
55 | 55 | checking manifests |
|
56 | 56 | crosschecking files in changesets and manifests |
|
57 | 57 | checking files |
|
58 | 58 | 4 files, 9 changesets, 7 total revisions |
|
59 | 59 | $ cd .. |
|
60 | 60 | $ for i in 0 1 2 3 4 5 6 7 8; do |
|
61 | 61 | > mkdir test-"$i" |
|
62 | 62 | > hg --cwd test-"$i" init |
|
63 | 63 | > hg -R test bundle -r "$i" test-"$i".hg test-"$i" |
|
64 | 64 | > cd test-"$i" |
|
65 | 65 | > hg unbundle ../test-"$i".hg |
|
66 | 66 | > hg verify |
|
67 | 67 | > hg tip -q |
|
68 | 68 | > cd .. |
|
69 | 69 | > done |
|
70 | 70 | searching for changes |
|
71 | 71 | 1 changesets found |
|
72 | 72 | adding changesets |
|
73 | 73 | adding manifests |
|
74 | 74 | adding file changes |
|
75 | 75 | added 1 changesets with 1 changes to 1 files |
|
76 | 76 | (run 'hg update' to get a working copy) |
|
77 | 77 | checking changesets |
|
78 | 78 | checking manifests |
|
79 | 79 | crosschecking files in changesets and manifests |
|
80 | 80 | checking files |
|
81 | 81 | 1 files, 1 changesets, 1 total revisions |
|
82 | 0:5649c9d34dd8 | |
|
82 | 0:f9ee2f85a263 | |
|
83 | 83 | searching for changes |
|
84 | 84 | 2 changesets found |
|
85 | 85 | adding changesets |
|
86 | 86 | adding manifests |
|
87 | 87 | adding file changes |
|
88 | 88 | added 2 changesets with 2 changes to 1 files |
|
89 | 89 | (run 'hg update' to get a working copy) |
|
90 | 90 | checking changesets |
|
91 | 91 | checking manifests |
|
92 | 92 | crosschecking files in changesets and manifests |
|
93 | 93 | checking files |
|
94 | 94 | 1 files, 2 changesets, 2 total revisions |
|
95 | 1:10b2180f755b | |
|
95 | 1:34c2bf6b0626 | |
|
96 | 96 | searching for changes |
|
97 | 97 | 3 changesets found |
|
98 | 98 | adding changesets |
|
99 | 99 | adding manifests |
|
100 | 100 | adding file changes |
|
101 | 101 | added 3 changesets with 3 changes to 1 files |
|
102 | 102 | (run 'hg update' to get a working copy) |
|
103 | 103 | checking changesets |
|
104 | 104 | checking manifests |
|
105 | 105 | crosschecking files in changesets and manifests |
|
106 | 106 | checking files |
|
107 | 107 | 1 files, 3 changesets, 3 total revisions |
|
108 | 2:d62976ca1e50 | |
|
108 | 2:e38ba6f5b7e0 | |
|
109 | 109 | searching for changes |
|
110 | 110 | 4 changesets found |
|
111 | 111 | adding changesets |
|
112 | 112 | adding manifests |
|
113 | 113 | adding file changes |
|
114 | 114 | added 4 changesets with 4 changes to 1 files |
|
115 | 115 | (run 'hg update' to get a working copy) |
|
116 | 116 | checking changesets |
|
117 | 117 | checking manifests |
|
118 | 118 | crosschecking files in changesets and manifests |
|
119 | 119 | checking files |
|
120 | 120 | 1 files, 4 changesets, 4 total revisions |
|
121 | 3:ac69c658229d | |
|
121 | 3:eebf5a27f8ca | |
|
122 | 122 | searching for changes |
|
123 | 123 | 2 changesets found |
|
124 | 124 | adding changesets |
|
125 | 125 | adding manifests |
|
126 | 126 | adding file changes |
|
127 | 127 | added 2 changesets with 2 changes to 1 files |
|
128 | 128 | (run 'hg update' to get a working copy) |
|
129 | 129 | checking changesets |
|
130 | 130 | checking manifests |
|
131 | 131 | crosschecking files in changesets and manifests |
|
132 | 132 | checking files |
|
133 | 133 | 1 files, 2 changesets, 2 total revisions |
|
134 | 1:5f4f3ceb285e | |
|
134 | 1:095197eb4973 | |
|
135 | 135 | searching for changes |
|
136 | 136 | 3 changesets found |
|
137 | 137 | adding changesets |
|
138 | 138 | adding manifests |
|
139 | 139 | adding file changes |
|
140 | 140 | added 3 changesets with 3 changes to 1 files |
|
141 | 141 | (run 'hg update' to get a working copy) |
|
142 | 142 | checking changesets |
|
143 | 143 | checking manifests |
|
144 | 144 | crosschecking files in changesets and manifests |
|
145 | 145 | checking files |
|
146 | 146 | 1 files, 3 changesets, 3 total revisions |
|
147 | 2:024e4e7df376 | |
|
147 | 2:1bb50a9436a7 | |
|
148 | 148 | searching for changes |
|
149 | 149 | 4 changesets found |
|
150 | 150 | adding changesets |
|
151 | 151 | adding manifests |
|
152 | 152 | adding file changes |
|
153 | 153 | added 4 changesets with 5 changes to 2 files |
|
154 | 154 | (run 'hg update' to get a working copy) |
|
155 | 155 | checking changesets |
|
156 | 156 | checking manifests |
|
157 | 157 | crosschecking files in changesets and manifests |
|
158 | 158 | checking files |
|
159 | 159 | 2 files, 4 changesets, 5 total revisions |
|
160 | 3:1e3f6b843bd6 | |
|
160 | 3:7373c1169842 | |
|
161 | 161 | searching for changes |
|
162 | 162 | 5 changesets found |
|
163 | 163 | adding changesets |
|
164 | 164 | adding manifests |
|
165 | 165 | adding file changes |
|
166 | 166 | added 5 changesets with 6 changes to 3 files |
|
167 | 167 | (run 'hg update' to get a working copy) |
|
168 | 168 | checking changesets |
|
169 | 169 | checking manifests |
|
170 | 170 | crosschecking files in changesets and manifests |
|
171 | 171 | checking files |
|
172 | 172 | 3 files, 5 changesets, 6 total revisions |
|
173 | 4:27f57c869697 | |
|
173 | 4:a6a34bfa0076 | |
|
174 | 174 | searching for changes |
|
175 | 175 | 5 changesets found |
|
176 | 176 | adding changesets |
|
177 | 177 | adding manifests |
|
178 | 178 | adding file changes |
|
179 | 179 | added 5 changesets with 5 changes to 2 files |
|
180 | 180 | (run 'hg update' to get a working copy) |
|
181 | 181 | checking changesets |
|
182 | 182 | checking manifests |
|
183 | 183 | crosschecking files in changesets and manifests |
|
184 | 184 | checking files |
|
185 | 185 | 2 files, 5 changesets, 5 total revisions |
|
186 | 4:088ff9d6e1e1 | |
|
186 | 4:aa35859c02ea | |
|
187 | 187 | $ cd test-8 |
|
188 | 188 | $ hg pull ../test-7 |
|
189 | 189 | pulling from ../test-7 |
|
190 | 190 | searching for changes |
|
191 | 191 | adding changesets |
|
192 | 192 | adding manifests |
|
193 | 193 | adding file changes |
|
194 | 194 | added 4 changesets with 2 changes to 3 files (+1 heads) |
|
195 | 195 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
196 | 196 | $ hg verify |
|
197 | 197 | checking changesets |
|
198 | 198 | checking manifests |
|
199 | 199 | crosschecking files in changesets and manifests |
|
200 | 200 | checking files |
|
201 | 201 | 4 files, 9 changesets, 7 total revisions |
|
202 | 202 | $ hg rollback |
|
203 | 203 | rolling back to revision 4 (undo pull) |
|
204 | 204 | $ cd .. |
|
205 | 205 | |
|
206 | 206 | should fail |
|
207 | 207 | |
|
208 | 208 | $ hg -R test bundle --base 2 -r tip test-bundle-branch1.hg test-3 |
|
209 | 209 | abort: --base is incompatible with specifying a destination |
|
210 | 210 | $ hg -R test bundle -r tip test-bundle-branch1.hg |
|
211 | 211 | abort: repository default-push not found! |
|
212 | 212 | |
|
213 | 213 | $ hg -R test bundle --base 2 -r tip test-bundle-branch1.hg |
|
214 | 214 | 2 changesets found |
|
215 | 215 | $ hg -R test bundle --base 2 -r 7 test-bundle-branch2.hg |
|
216 | 216 | 4 changesets found |
|
217 | 217 | $ hg -R test bundle --base 2 test-bundle-all.hg |
|
218 | 218 | 6 changesets found |
|
219 | 219 | $ hg -R test bundle --base 3 -r tip test-bundle-should-fail.hg |
|
220 | 220 | 1 changesets found |
|
221 | 221 | |
|
222 | 222 | empty bundle |
|
223 | 223 | |
|
224 | 224 | $ hg -R test bundle --base 7 --base 8 test-bundle-empty.hg |
|
225 | 225 | no changes found |
|
226 | 226 | |
|
227 | 227 | issue76 msg2163 |
|
228 | 228 | |
|
229 | 229 | $ hg -R test bundle --base 3 -r 3 -r 3 test-bundle-cset-3.hg |
|
230 | 230 | 1 changesets found |
|
231 | 231 | |
|
232 | 232 | issue1910 |
|
233 | 233 | |
|
234 | 234 | $ hg -R test bundle --base 7 test-bundle-cset-7.hg |
|
235 | 235 | 4 changesets found |
|
236 | 236 | |
|
237 | 237 | $ hg clone test-2 test-9 |
|
238 | 238 | updating to branch default |
|
239 | 239 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
240 | 240 | $ cd test-9 |
|
241 | 241 | |
|
242 | 242 | revision 2 |
|
243 | 243 | |
|
244 | 244 | $ hg tip -q |
|
245 | 2:d62976ca1e50 | |
|
245 | 2:e38ba6f5b7e0 | |
|
246 | 246 | $ hg unbundle ../test-bundle-should-fail.hg |
|
247 | 247 | adding changesets |
|
248 | 248 | transaction abort! |
|
249 | 249 | rollback completed |
|
250 |
abort: 00changelog.i@ |
|
|
250 | abort: 00changelog.i@eebf5a27f8ca: unknown parent! | |
|
251 | 251 | |
|
252 | 252 | revision 2 |
|
253 | 253 | |
|
254 | 254 | $ hg tip -q |
|
255 | 2:d62976ca1e50 | |
|
255 | 2:e38ba6f5b7e0 | |
|
256 | 256 | $ hg unbundle ../test-bundle-all.hg |
|
257 | 257 | adding changesets |
|
258 | 258 | adding manifests |
|
259 | 259 | adding file changes |
|
260 | 260 | added 6 changesets with 4 changes to 4 files (+1 heads) |
|
261 | 261 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
262 | 262 | |
|
263 | 263 | revision 8 |
|
264 | 264 | |
|
265 | 265 | $ hg tip -q |
|
266 | 8:088ff9d6e1e1 | |
|
266 | 8:aa35859c02ea | |
|
267 | 267 | $ hg verify |
|
268 | 268 | checking changesets |
|
269 | 269 | checking manifests |
|
270 | 270 | crosschecking files in changesets and manifests |
|
271 | 271 | checking files |
|
272 | 272 | 4 files, 9 changesets, 7 total revisions |
|
273 | 273 | $ hg rollback |
|
274 | 274 | rolling back to revision 2 (undo unbundle) |
|
275 | 275 | |
|
276 | 276 | revision 2 |
|
277 | 277 | |
|
278 | 278 | $ hg tip -q |
|
279 | 2:d62976ca1e50 | |
|
279 | 2:e38ba6f5b7e0 | |
|
280 | 280 | $ hg unbundle ../test-bundle-branch1.hg |
|
281 | 281 | adding changesets |
|
282 | 282 | adding manifests |
|
283 | 283 | adding file changes |
|
284 | 284 | added 2 changesets with 2 changes to 2 files |
|
285 | 285 | (run 'hg update' to get a working copy) |
|
286 | 286 | |
|
287 | 287 | revision 4 |
|
288 | 288 | |
|
289 | 289 | $ hg tip -q |
|
290 | 4:088ff9d6e1e1 | |
|
290 | 4:aa35859c02ea | |
|
291 | 291 | $ hg verify |
|
292 | 292 | checking changesets |
|
293 | 293 | checking manifests |
|
294 | 294 | crosschecking files in changesets and manifests |
|
295 | 295 | checking files |
|
296 | 296 | 2 files, 5 changesets, 5 total revisions |
|
297 | 297 | $ hg rollback |
|
298 | 298 | rolling back to revision 2 (undo unbundle) |
|
299 | 299 | $ hg unbundle ../test-bundle-branch2.hg |
|
300 | 300 | adding changesets |
|
301 | 301 | adding manifests |
|
302 | 302 | adding file changes |
|
303 | 303 | added 4 changesets with 3 changes to 3 files (+1 heads) |
|
304 | 304 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
305 | 305 | |
|
306 | 306 | revision 6 |
|
307 | 307 | |
|
308 | 308 | $ hg tip -q |
|
309 | 6:27f57c869697 | |
|
309 | 6:a6a34bfa0076 | |
|
310 | 310 | $ hg verify |
|
311 | 311 | checking changesets |
|
312 | 312 | checking manifests |
|
313 | 313 | crosschecking files in changesets and manifests |
|
314 | 314 | checking files |
|
315 | 315 | 3 files, 7 changesets, 6 total revisions |
|
316 | 316 | $ hg rollback |
|
317 | 317 | rolling back to revision 2 (undo unbundle) |
|
318 | 318 | $ hg unbundle ../test-bundle-cset-7.hg |
|
319 | 319 | adding changesets |
|
320 | 320 | adding manifests |
|
321 | 321 | adding file changes |
|
322 | 322 | added 2 changesets with 2 changes to 2 files |
|
323 | 323 | (run 'hg update' to get a working copy) |
|
324 | 324 | |
|
325 | 325 | revision 4 |
|
326 | 326 | |
|
327 | 327 | $ hg tip -q |
|
328 | 4:088ff9d6e1e1 | |
|
328 | 4:aa35859c02ea | |
|
329 | 329 | $ hg verify |
|
330 | 330 | checking changesets |
|
331 | 331 | checking manifests |
|
332 | 332 | crosschecking files in changesets and manifests |
|
333 | 333 | checking files |
|
334 | 334 | 2 files, 5 changesets, 5 total revisions |
|
335 | 335 | |
|
336 | 336 | $ cd ../test |
|
337 | 337 | $ hg merge 7 |
|
338 | 338 | warning: detected divergent renames of afile to: |
|
339 | 339 | anotherfile |
|
340 | 340 | adifferentfile |
|
341 | 341 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
342 | 342 | (branch merge, don't forget to commit) |
|
343 |
$ hg ci -m merge |
|
|
343 | $ hg ci -m merge | |
|
344 | 344 | $ cd .. |
|
345 | 345 | $ hg -R test bundle --base 2 test-bundle-head.hg |
|
346 | 346 | 7 changesets found |
|
347 | 347 | $ hg clone test-2 test-10 |
|
348 | 348 | updating to branch default |
|
349 | 349 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
350 | 350 | $ cd test-10 |
|
351 | 351 | $ hg unbundle ../test-bundle-head.hg |
|
352 | 352 | adding changesets |
|
353 | 353 | adding manifests |
|
354 | 354 | adding file changes |
|
355 | 355 | added 7 changesets with 4 changes to 4 files |
|
356 | 356 | (run 'hg update' to get a working copy) |
|
357 | 357 | |
|
358 | 358 | revision 9 |
|
359 | 359 | |
|
360 | 360 | $ hg tip -q |
|
361 | 9:e3061ea42e4c | |
|
361 | 9:905597b0d5d4 | |
|
362 | 362 | $ hg verify |
|
363 | 363 | checking changesets |
|
364 | 364 | checking manifests |
|
365 | 365 | crosschecking files in changesets and manifests |
|
366 | 366 | checking files |
|
367 | 367 | 4 files, 10 changesets, 7 total revisions |
@@ -1,558 +1,558 b'' | |||
|
1 | 1 | $ cp "$TESTDIR"/printenv.py . |
|
2 | 2 | |
|
3 | 3 | Setting up test |
|
4 | 4 | |
|
5 | 5 | $ hg init test |
|
6 | 6 | $ cd test |
|
7 | 7 | $ echo 0 > afile |
|
8 | 8 | $ hg add afile |
|
9 |
$ hg commit -m "0.0" |
|
|
9 | $ hg commit -m "0.0" | |
|
10 | 10 | $ echo 1 >> afile |
|
11 |
$ hg commit -m "0.1" |
|
|
11 | $ hg commit -m "0.1" | |
|
12 | 12 | $ echo 2 >> afile |
|
13 |
$ hg commit -m "0.2" |
|
|
13 | $ hg commit -m "0.2" | |
|
14 | 14 | $ echo 3 >> afile |
|
15 |
$ hg commit -m "0.3" |
|
|
15 | $ hg commit -m "0.3" | |
|
16 | 16 | $ hg update -C 0 |
|
17 | 17 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
18 | 18 | $ echo 1 >> afile |
|
19 |
$ hg commit -m "1.1" |
|
|
19 | $ hg commit -m "1.1" | |
|
20 | 20 | created new head |
|
21 | 21 | $ echo 2 >> afile |
|
22 |
$ hg commit -m "1.2" |
|
|
22 | $ hg commit -m "1.2" | |
|
23 | 23 | $ echo "a line" > fred |
|
24 | 24 | $ echo 3 >> afile |
|
25 | 25 | $ hg add fred |
|
26 |
$ hg commit -m "1.3" |
|
|
26 | $ hg commit -m "1.3" | |
|
27 | 27 | $ hg mv afile adifferentfile |
|
28 |
$ hg commit -m "1.3m" |
|
|
28 | $ hg commit -m "1.3m" | |
|
29 | 29 | $ hg update -C 3 |
|
30 | 30 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
31 | 31 | $ hg mv afile anotherfile |
|
32 |
$ hg commit -m "0.3m" |
|
|
32 | $ hg commit -m "0.3m" | |
|
33 | 33 | $ hg verify |
|
34 | 34 | checking changesets |
|
35 | 35 | checking manifests |
|
36 | 36 | crosschecking files in changesets and manifests |
|
37 | 37 | checking files |
|
38 | 38 | 4 files, 9 changesets, 7 total revisions |
|
39 | 39 | $ cd .. |
|
40 | 40 | $ hg init empty |
|
41 | 41 | |
|
42 | 42 | Bundle --all |
|
43 | 43 | |
|
44 | 44 | $ hg -R test bundle --all all.hg |
|
45 | 45 | 9 changesets found |
|
46 | 46 | |
|
47 | 47 | Bundle test to full.hg |
|
48 | 48 | |
|
49 | 49 | $ hg -R test bundle full.hg empty |
|
50 | 50 | searching for changes |
|
51 | 51 | 9 changesets found |
|
52 | 52 | |
|
53 | 53 | Unbundle full.hg in test |
|
54 | 54 | |
|
55 | 55 | $ hg -R test unbundle full.hg |
|
56 | 56 | adding changesets |
|
57 | 57 | adding manifests |
|
58 | 58 | adding file changes |
|
59 | 59 | added 0 changesets with 0 changes to 4 files |
|
60 | 60 | (run 'hg update' to get a working copy) |
|
61 | 61 | |
|
62 | 62 | Verify empty |
|
63 | 63 | |
|
64 | 64 | $ hg -R empty heads |
|
65 | 65 | $ hg -R empty verify |
|
66 | 66 | checking changesets |
|
67 | 67 | checking manifests |
|
68 | 68 | crosschecking files in changesets and manifests |
|
69 | 69 | checking files |
|
70 | 70 | 0 files, 0 changesets, 0 total revisions |
|
71 | 71 | |
|
72 | 72 | Pull full.hg into test (using --cwd) |
|
73 | 73 | |
|
74 | 74 | $ hg --cwd test pull ../full.hg |
|
75 | 75 | pulling from ../full.hg |
|
76 | 76 | searching for changes |
|
77 | 77 | no changes found |
|
78 | 78 | |
|
79 | 79 | Pull full.hg into empty (using --cwd) |
|
80 | 80 | |
|
81 | 81 | $ hg --cwd empty pull ../full.hg |
|
82 | 82 | pulling from ../full.hg |
|
83 | 83 | requesting all changes |
|
84 | 84 | adding changesets |
|
85 | 85 | adding manifests |
|
86 | 86 | adding file changes |
|
87 | 87 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
88 | 88 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
89 | 89 | |
|
90 | 90 | Rollback empty |
|
91 | 91 | |
|
92 | 92 | $ hg -R empty rollback |
|
93 | 93 | rolling back to revision -1 (undo pull) |
|
94 | 94 | |
|
95 | 95 | Pull full.hg into empty again (using --cwd) |
|
96 | 96 | |
|
97 | 97 | $ hg --cwd empty pull ../full.hg |
|
98 | 98 | pulling from ../full.hg |
|
99 | 99 | requesting all changes |
|
100 | 100 | adding changesets |
|
101 | 101 | adding manifests |
|
102 | 102 | adding file changes |
|
103 | 103 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
104 | 104 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
105 | 105 | |
|
106 | 106 | Pull full.hg into test (using -R) |
|
107 | 107 | |
|
108 | 108 | $ hg -R test pull full.hg |
|
109 | 109 | pulling from full.hg |
|
110 | 110 | searching for changes |
|
111 | 111 | no changes found |
|
112 | 112 | |
|
113 | 113 | Pull full.hg into empty (using -R) |
|
114 | 114 | |
|
115 | 115 | $ hg -R empty pull full.hg |
|
116 | 116 | pulling from full.hg |
|
117 | 117 | searching for changes |
|
118 | 118 | no changes found |
|
119 | 119 | |
|
120 | 120 | Rollback empty |
|
121 | 121 | |
|
122 | 122 | $ hg -R empty rollback |
|
123 | 123 | rolling back to revision -1 (undo pull) |
|
124 | 124 | |
|
125 | 125 | Pull full.hg into empty again (using -R) |
|
126 | 126 | |
|
127 | 127 | $ hg -R empty pull full.hg |
|
128 | 128 | pulling from full.hg |
|
129 | 129 | requesting all changes |
|
130 | 130 | adding changesets |
|
131 | 131 | adding manifests |
|
132 | 132 | adding file changes |
|
133 | 133 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
134 | 134 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
135 | 135 | |
|
136 | 136 | Log -R full.hg in fresh empty |
|
137 | 137 | |
|
138 | 138 | $ rm -r empty |
|
139 | 139 | $ hg init empty |
|
140 | 140 | $ cd empty |
|
141 | 141 | $ hg -R bundle://../full.hg log |
|
142 |
changeset: 8: |
|
|
142 | changeset: 8:aa35859c02ea | |
|
143 | 143 | tag: tip |
|
144 |
parent: 3: |
|
|
144 | parent: 3:eebf5a27f8ca | |
|
145 | 145 | user: test |
|
146 |
date: |
|
|
146 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
147 | 147 | summary: 0.3m |
|
148 | 148 | |
|
149 |
changeset: 7: |
|
|
149 | changeset: 7:a6a34bfa0076 | |
|
150 | 150 | user: test |
|
151 |
date: |
|
|
151 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
152 | 152 | summary: 1.3m |
|
153 | 153 | |
|
154 |
changeset: 6: |
|
|
154 | changeset: 6:7373c1169842 | |
|
155 | 155 | user: test |
|
156 |
date: |
|
|
156 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
157 | 157 | summary: 1.3 |
|
158 | 158 | |
|
159 |
changeset: 5: |
|
|
159 | changeset: 5:1bb50a9436a7 | |
|
160 | 160 | user: test |
|
161 |
date: |
|
|
161 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
162 | 162 | summary: 1.2 |
|
163 | 163 | |
|
164 |
changeset: 4: |
|
|
165 |
parent: 0:56 |
|
|
164 | changeset: 4:095197eb4973 | |
|
165 | parent: 0:f9ee2f85a263 | |
|
166 | 166 | user: test |
|
167 |
date: |
|
|
167 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
168 | 168 | summary: 1.1 |
|
169 | 169 | |
|
170 |
changeset: 3: |
|
|
170 | changeset: 3:eebf5a27f8ca | |
|
171 | 171 | user: test |
|
172 |
date: |
|
|
172 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
173 | 173 | summary: 0.3 |
|
174 | 174 | |
|
175 |
changeset: 2: |
|
|
175 | changeset: 2:e38ba6f5b7e0 | |
|
176 | 176 | user: test |
|
177 |
date: |
|
|
177 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
178 | 178 | summary: 0.2 |
|
179 | 179 | |
|
180 |
changeset: 1: |
|
|
180 | changeset: 1:34c2bf6b0626 | |
|
181 | 181 | user: test |
|
182 |
date: |
|
|
182 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
183 | 183 | summary: 0.1 |
|
184 | 184 | |
|
185 |
changeset: 0:56 |
|
|
185 | changeset: 0:f9ee2f85a263 | |
|
186 | 186 | user: test |
|
187 |
date: |
|
|
187 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
188 | 188 | summary: 0.0 |
|
189 | 189 | |
|
190 | 190 | |
|
191 | 191 | Pull ../full.hg into empty (with hook) |
|
192 | 192 | |
|
193 | 193 | $ echo '[hooks]' >> .hg/hgrc |
|
194 | 194 | $ echo 'changegroup = python ../printenv.py changegroup' >> .hg/hgrc |
|
195 | 195 | |
|
196 | 196 | doesn't work (yet ?) |
|
197 | 197 | |
|
198 | 198 | hg -R bundle://../full.hg verify |
|
199 | 199 | |
|
200 | 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 | 202 | pulling from bundle://../full.hg |
|
203 | 203 | requesting all changes |
|
204 | 204 | adding changesets |
|
205 | 205 | adding manifests |
|
206 | 206 | adding file changes |
|
207 | 207 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
208 | 208 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
209 | 209 | |
|
210 | 210 | Rollback empty |
|
211 | 211 | |
|
212 | 212 | $ hg rollback |
|
213 | 213 | rolling back to revision -1 (undo pull) |
|
214 | 214 | $ cd .. |
|
215 | 215 | |
|
216 | 216 | Log -R bundle:empty+full.hg |
|
217 | 217 | |
|
218 | 218 | $ hg -R bundle:empty+full.hg log --template="{rev} "; echo "" |
|
219 | 219 | 8 7 6 5 4 3 2 1 0 |
|
220 | 220 | |
|
221 | 221 | Pull full.hg into empty again (using -R; with hook) |
|
222 | 222 | |
|
223 | 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 | 225 | pulling from full.hg |
|
226 | 226 | requesting all changes |
|
227 | 227 | adding changesets |
|
228 | 228 | adding manifests |
|
229 | 229 | adding file changes |
|
230 | 230 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
231 | 231 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
232 | 232 | |
|
233 | 233 | Create partial clones |
|
234 | 234 | |
|
235 | 235 | $ rm -r empty |
|
236 | 236 | $ hg init empty |
|
237 | 237 | $ hg clone -r 3 test partial |
|
238 | 238 | requesting all changes |
|
239 | 239 | adding changesets |
|
240 | 240 | adding manifests |
|
241 | 241 | adding file changes |
|
242 | 242 | added 4 changesets with 4 changes to 1 files |
|
243 | 243 | updating to branch default |
|
244 | 244 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
245 | 245 | $ hg clone partial partial2 |
|
246 | 246 | updating to branch default |
|
247 | 247 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
248 | 248 | $ cd partial |
|
249 | 249 | |
|
250 | 250 | Log -R full.hg in partial |
|
251 | 251 | |
|
252 | 252 | $ hg -R bundle://../full.hg log |
|
253 |
changeset: 8: |
|
|
253 | changeset: 8:aa35859c02ea | |
|
254 | 254 | tag: tip |
|
255 |
parent: 3: |
|
|
255 | parent: 3:eebf5a27f8ca | |
|
256 | 256 | user: test |
|
257 |
date: |
|
|
257 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
258 | 258 | summary: 0.3m |
|
259 | 259 | |
|
260 |
changeset: 7: |
|
|
260 | changeset: 7:a6a34bfa0076 | |
|
261 | 261 | user: test |
|
262 |
date: |
|
|
262 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
263 | 263 | summary: 1.3m |
|
264 | 264 | |
|
265 |
changeset: 6: |
|
|
265 | changeset: 6:7373c1169842 | |
|
266 | 266 | user: test |
|
267 |
date: |
|
|
267 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
268 | 268 | summary: 1.3 |
|
269 | 269 | |
|
270 |
changeset: 5: |
|
|
270 | changeset: 5:1bb50a9436a7 | |
|
271 | 271 | user: test |
|
272 |
date: |
|
|
272 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
273 | 273 | summary: 1.2 |
|
274 | 274 | |
|
275 |
changeset: 4: |
|
|
276 |
parent: 0:56 |
|
|
275 | changeset: 4:095197eb4973 | |
|
276 | parent: 0:f9ee2f85a263 | |
|
277 | 277 | user: test |
|
278 |
date: |
|
|
278 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
279 | 279 | summary: 1.1 |
|
280 | 280 | |
|
281 |
changeset: 3: |
|
|
281 | changeset: 3:eebf5a27f8ca | |
|
282 | 282 | user: test |
|
283 |
date: |
|
|
283 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
284 | 284 | summary: 0.3 |
|
285 | 285 | |
|
286 |
changeset: 2: |
|
|
286 | changeset: 2:e38ba6f5b7e0 | |
|
287 | 287 | user: test |
|
288 |
date: |
|
|
288 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
289 | 289 | summary: 0.2 |
|
290 | 290 | |
|
291 |
changeset: 1: |
|
|
291 | changeset: 1:34c2bf6b0626 | |
|
292 | 292 | user: test |
|
293 |
date: |
|
|
293 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
294 | 294 | summary: 0.1 |
|
295 | 295 | |
|
296 |
changeset: 0:56 |
|
|
296 | changeset: 0:f9ee2f85a263 | |
|
297 | 297 | user: test |
|
298 |
date: |
|
|
298 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
299 | 299 | summary: 0.0 |
|
300 | 300 | |
|
301 | 301 | |
|
302 | 302 | Incoming full.hg in partial |
|
303 | 303 | |
|
304 | 304 | $ hg incoming bundle://../full.hg |
|
305 | 305 | comparing with bundle://../full.hg |
|
306 | 306 | searching for changes |
|
307 |
changeset: 4: |
|
|
308 |
parent: 0:56 |
|
|
307 | changeset: 4:095197eb4973 | |
|
308 | parent: 0:f9ee2f85a263 | |
|
309 | 309 | user: test |
|
310 |
date: |
|
|
310 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
311 | 311 | summary: 1.1 |
|
312 | 312 | |
|
313 |
changeset: 5: |
|
|
313 | changeset: 5:1bb50a9436a7 | |
|
314 | 314 | user: test |
|
315 |
date: |
|
|
315 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
316 | 316 | summary: 1.2 |
|
317 | 317 | |
|
318 |
changeset: 6: |
|
|
318 | changeset: 6:7373c1169842 | |
|
319 | 319 | user: test |
|
320 |
date: |
|
|
320 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
321 | 321 | summary: 1.3 |
|
322 | 322 | |
|
323 |
changeset: 7: |
|
|
323 | changeset: 7:a6a34bfa0076 | |
|
324 | 324 | user: test |
|
325 |
date: |
|
|
325 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
326 | 326 | summary: 1.3m |
|
327 | 327 | |
|
328 |
changeset: 8: |
|
|
328 | changeset: 8:aa35859c02ea | |
|
329 | 329 | tag: tip |
|
330 |
parent: 3: |
|
|
330 | parent: 3:eebf5a27f8ca | |
|
331 | 331 | user: test |
|
332 |
date: |
|
|
332 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
333 | 333 | summary: 0.3m |
|
334 | 334 | |
|
335 | 335 | |
|
336 | 336 | Outgoing -R full.hg vs partial2 in partial |
|
337 | 337 | |
|
338 | 338 | $ hg -R bundle://../full.hg outgoing ../partial2 |
|
339 | 339 | comparing with ../partial2 |
|
340 | 340 | searching for changes |
|
341 |
changeset: 4: |
|
|
342 |
parent: 0:56 |
|
|
341 | changeset: 4:095197eb4973 | |
|
342 | parent: 0:f9ee2f85a263 | |
|
343 | 343 | user: test |
|
344 |
date: |
|
|
344 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
345 | 345 | summary: 1.1 |
|
346 | 346 | |
|
347 |
changeset: 5: |
|
|
347 | changeset: 5:1bb50a9436a7 | |
|
348 | 348 | user: test |
|
349 |
date: |
|
|
349 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
350 | 350 | summary: 1.2 |
|
351 | 351 | |
|
352 |
changeset: 6: |
|
|
352 | changeset: 6:7373c1169842 | |
|
353 | 353 | user: test |
|
354 |
date: |
|
|
354 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
355 | 355 | summary: 1.3 |
|
356 | 356 | |
|
357 |
changeset: 7: |
|
|
357 | changeset: 7:a6a34bfa0076 | |
|
358 | 358 | user: test |
|
359 |
date: |
|
|
359 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
360 | 360 | summary: 1.3m |
|
361 | 361 | |
|
362 |
changeset: 8: |
|
|
362 | changeset: 8:aa35859c02ea | |
|
363 | 363 | tag: tip |
|
364 |
parent: 3: |
|
|
364 | parent: 3:eebf5a27f8ca | |
|
365 | 365 | user: test |
|
366 |
date: |
|
|
366 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
367 | 367 | summary: 0.3m |
|
368 | 368 | |
|
369 | 369 | |
|
370 | 370 | Outgoing -R does-not-exist.hg vs partial2 in partial |
|
371 | 371 | |
|
372 | 372 | $ hg -R bundle://../does-not-exist.hg outgoing ../partial2 |
|
373 | 373 | abort: No such file or directory: ../does-not-exist.hg |
|
374 | 374 | $ cd .. |
|
375 | 375 | |
|
376 | 376 | Direct clone from bundle (all-history) |
|
377 | 377 | |
|
378 | 378 | $ hg clone full.hg full-clone |
|
379 | 379 | requesting all changes |
|
380 | 380 | adding changesets |
|
381 | 381 | adding manifests |
|
382 | 382 | adding file changes |
|
383 | 383 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
384 | 384 | updating to branch default |
|
385 | 385 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
386 | 386 | $ hg -R full-clone heads |
|
387 |
changeset: 8: |
|
|
387 | changeset: 8:aa35859c02ea | |
|
388 | 388 | tag: tip |
|
389 |
parent: 3: |
|
|
389 | parent: 3:eebf5a27f8ca | |
|
390 | 390 | user: test |
|
391 |
date: |
|
|
391 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
392 | 392 | summary: 0.3m |
|
393 | 393 | |
|
394 |
changeset: 7: |
|
|
394 | changeset: 7:a6a34bfa0076 | |
|
395 | 395 | user: test |
|
396 |
date: |
|
|
396 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
397 | 397 | summary: 1.3m |
|
398 | 398 | |
|
399 | 399 | $ rm -r full-clone |
|
400 | 400 | |
|
401 | 401 | test for http://mercurial.selenic.com/bts/issue216 |
|
402 | 402 | |
|
403 | 403 | Unbundle incremental bundles into fresh empty in one go |
|
404 | 404 | |
|
405 | 405 | $ rm -r empty |
|
406 | 406 | $ hg init empty |
|
407 | 407 | $ hg -R test bundle --base null -r 0 ../0.hg |
|
408 | 408 | 1 changesets found |
|
409 | 409 | $ hg -R test bundle --base 0 -r 1 ../1.hg |
|
410 | 410 | 1 changesets found |
|
411 | 411 | $ hg -R empty unbundle -u ../0.hg ../1.hg |
|
412 | 412 | adding changesets |
|
413 | 413 | adding manifests |
|
414 | 414 | adding file changes |
|
415 | 415 | added 1 changesets with 1 changes to 1 files |
|
416 | 416 | adding changesets |
|
417 | 417 | adding manifests |
|
418 | 418 | adding file changes |
|
419 | 419 | added 1 changesets with 1 changes to 1 files |
|
420 | 420 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
421 | 421 | |
|
422 | 422 | test for 540d1059c802 |
|
423 | 423 | |
|
424 | 424 | test for 540d1059c802 |
|
425 | 425 | |
|
426 | 426 | $ hg init orig |
|
427 | 427 | $ cd orig |
|
428 | 428 | $ echo foo > foo |
|
429 | 429 | $ hg add foo |
|
430 | 430 | $ hg ci -m 'add foo' |
|
431 | 431 | |
|
432 | 432 | $ hg clone . ../copy |
|
433 | 433 | updating to branch default |
|
434 | 434 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
435 | 435 | $ hg tag foo |
|
436 | 436 | |
|
437 | 437 | $ cd ../copy |
|
438 | 438 | $ echo >> foo |
|
439 | 439 | $ hg ci -m 'change foo' |
|
440 | 440 | $ hg bundle ../bundle.hg ../orig |
|
441 | 441 | searching for changes |
|
442 | 442 | 1 changesets found |
|
443 | 443 | |
|
444 | 444 | $ cd ../orig |
|
445 | 445 | $ hg incoming ../bundle.hg |
|
446 | 446 | comparing with ../bundle.hg |
|
447 | 447 | searching for changes |
|
448 | 448 | changeset: 2:ed1b79f46b9a |
|
449 | 449 | tag: tip |
|
450 | 450 | parent: 0:bbd179dfa0a7 |
|
451 | 451 | user: test |
|
452 | 452 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
453 | 453 | summary: change foo |
|
454 | 454 | |
|
455 | 455 | $ cd .. |
|
456 | 456 | |
|
457 | 457 | test for http://mercurial.selenic.com/bts/issue1144 |
|
458 | 458 | |
|
459 | 459 | test that verify bundle does not traceback |
|
460 | 460 | |
|
461 | 461 | partial history bundle, fails w/ unkown parent |
|
462 | 462 | |
|
463 | 463 | $ hg -R bundle.hg verify |
|
464 | 464 | abort: 00changelog.i@bbd179dfa0a7: unknown parent! |
|
465 | 465 | |
|
466 | 466 | full history bundle, refuses to verify non-local repo |
|
467 | 467 | |
|
468 | 468 | $ hg -R all.hg verify |
|
469 | 469 | abort: cannot verify bundle or remote repos |
|
470 | 470 | |
|
471 | 471 | but, regular verify must continue to work |
|
472 | 472 | |
|
473 | 473 | $ hg -R orig verify |
|
474 | 474 | checking changesets |
|
475 | 475 | checking manifests |
|
476 | 476 | crosschecking files in changesets and manifests |
|
477 | 477 | checking files |
|
478 | 478 | 2 files, 2 changesets, 2 total revisions |
|
479 | 479 | |
|
480 | 480 | diff against bundle |
|
481 | 481 | |
|
482 | 482 | $ hg init b |
|
483 | 483 | $ cd b |
|
484 | 484 | $ hg -R ../all.hg diff -r tip |
|
485 |
diff -r |
|
|
486 |
--- a/anotherfile |
|
|
485 | diff -r aa35859c02ea anotherfile | |
|
486 | --- a/anotherfile Thu Jan 01 00:00:00 1970 +0000 | |
|
487 | 487 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
488 | 488 | @@ -1,4 +0,0 @@ |
|
489 | 489 | -0 |
|
490 | 490 | -1 |
|
491 | 491 | -2 |
|
492 | 492 | -3 |
|
493 | 493 | $ cd .. |
|
494 | 494 | |
|
495 | 495 | bundle single branch |
|
496 | 496 | |
|
497 | 497 | $ hg init branchy |
|
498 | 498 | $ cd branchy |
|
499 | 499 | $ echo a >a |
|
500 | 500 | $ hg ci -Ama |
|
501 | 501 | adding a |
|
502 | 502 | $ echo b >b |
|
503 | 503 | $ hg ci -Amb |
|
504 | 504 | adding b |
|
505 | 505 | $ echo b1 >b1 |
|
506 | 506 | $ hg ci -Amb1 |
|
507 | 507 | adding b1 |
|
508 | 508 | $ hg up 0 |
|
509 | 509 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
510 | 510 | $ echo c >c |
|
511 | 511 | $ hg ci -Amc |
|
512 | 512 | adding c |
|
513 | 513 | created new head |
|
514 | 514 | $ echo c1 >c1 |
|
515 | 515 | $ hg ci -Amc1 |
|
516 | 516 | adding c1 |
|
517 | 517 | $ hg clone -q .#tip part |
|
518 | 518 | |
|
519 | 519 | == bundling via incoming |
|
520 | 520 | |
|
521 | 521 | $ hg in -R part --bundle incoming.hg --template "{node}\n" . |
|
522 | 522 | comparing with . |
|
523 | 523 | searching for changes |
|
524 | 524 | d2ae7f538514cd87c17547b0de4cea71fe1af9fb |
|
525 | 525 | 5ece8e77363e2b5269e27c66828b72da29e4341a |
|
526 | 526 | |
|
527 | 527 | == bundling |
|
528 | 528 | |
|
529 | 529 | $ hg bundle bundle.hg part --debug |
|
530 | 530 | searching for changes |
|
531 | 531 | common changesets up to c0025332f9ed |
|
532 | 532 | 2 changesets found |
|
533 | 533 | list of changesets: |
|
534 | 534 | d2ae7f538514cd87c17547b0de4cea71fe1af9fb |
|
535 | 535 | 5ece8e77363e2b5269e27c66828b72da29e4341a |
|
536 | 536 | bundling changes: 0 chunks |
|
537 | 537 | bundling changes: 1 chunks |
|
538 | 538 | bundling changes: 2 chunks |
|
539 | 539 | bundling changes: 3 chunks |
|
540 | 540 | bundling changes: 4 chunks |
|
541 | 541 | bundling changes: 5 chunks |
|
542 | 542 | bundling changes: 6 chunks |
|
543 | 543 | bundling manifests: 0 chunks |
|
544 | 544 | bundling manifests: 1 chunks |
|
545 | 545 | bundling manifests: 2 chunks |
|
546 | 546 | bundling manifests: 3 chunks |
|
547 | 547 | bundling manifests: 4 chunks |
|
548 | 548 | bundling manifests: 5 chunks |
|
549 | 549 | bundling manifests: 6 chunks |
|
550 | 550 | bundling files: b 0 chunks |
|
551 | 551 | bundling files: b 1 chunks |
|
552 | 552 | bundling files: b 2 chunks |
|
553 | 553 | bundling files: b 3 chunks |
|
554 | 554 | bundling files: b1 4 chunks |
|
555 | 555 | bundling files: b1 5 chunks |
|
556 | 556 | bundling files: b1 6 chunks |
|
557 | 557 | bundling files: b1 7 chunks |
|
558 | 558 |
@@ -1,24 +1,22 b'' | |||
|
1 | $ mkdir t | |
|
2 | $ cd t | |
|
3 | 1 |
|
|
4 | 2 | $ echo 0 > a |
|
5 | 3 | $ echo 0 > b |
|
6 |
$ hg ci -A -m m |
|
|
4 | $ hg ci -A -m m | |
|
7 | 5 | adding a |
|
8 | 6 | adding b |
|
9 | 7 | $ hg rm a |
|
10 | 8 | $ hg cat a |
|
11 | 9 | 0 |
|
12 | 10 | $ hg cat --decode a # more tests in test-encode |
|
13 | 11 | 0 |
|
14 | 12 | $ echo 1 > b |
|
15 |
$ hg ci -m m |
|
|
13 | $ hg ci -m m | |
|
16 | 14 |
$ |
|
17 | 15 |
$ |
|
18 | 16 | 0 |
|
19 | 17 | $ hg cat -r 0 b |
|
20 | 18 | 0 |
|
21 | 19 | $ hg cat -r 1 a |
|
22 |
a: no such file in rev |
|
|
20 | a: no such file in rev 7040230c159c | |
|
23 | 21 | $ hg cat -r 1 b |
|
24 | 22 | 1 |
@@ -1,253 +1,253 b'' | |||
|
1 | 1 | commit date test |
|
2 | 2 | |
|
3 | 3 | $ hg init test |
|
4 | 4 | $ cd test |
|
5 | 5 | $ echo foo > foo |
|
6 | 6 | $ hg add foo |
|
7 | 7 | $ HGEDITOR=true hg commit -m "" |
|
8 | 8 | abort: empty commit message |
|
9 | 9 | $ hg commit -d '0 0' -m commit-1 |
|
10 | 10 | $ echo foo >> foo |
|
11 | 11 | $ hg commit -d '1 4444444' -m commit-3 |
|
12 | 12 | abort: impossible time zone offset: 4444444 |
|
13 | 13 | $ hg commit -d '1 15.1' -m commit-4 |
|
14 | 14 | abort: invalid date: '1\t15.1' |
|
15 | 15 | $ hg commit -d 'foo bar' -m commit-5 |
|
16 | 16 | abort: invalid date: 'foo bar' |
|
17 | 17 | $ hg commit -d ' 1 4444' -m commit-6 |
|
18 | 18 | $ hg commit -d '111111111111 0' -m commit-7 |
|
19 | 19 | abort: date exceeds 32 bits: 111111111111 |
|
20 | 20 | |
|
21 | 21 | commit added file that has been deleted |
|
22 | 22 | |
|
23 | 23 | $ echo bar > bar |
|
24 | 24 | $ hg add bar |
|
25 | 25 | $ rm bar |
|
26 |
$ hg commit - |
|
|
26 | $ hg commit -m commit-8 | |
|
27 | 27 | nothing changed |
|
28 |
$ hg commit |
|
|
28 | $ hg commit -m commit-8-2 bar | |
|
29 | 29 | abort: bar: file not found! |
|
30 | 30 | |
|
31 | 31 | $ hg -q revert -a --no-backup |
|
32 | 32 | |
|
33 | 33 | $ mkdir dir |
|
34 | 34 | $ echo boo > dir/file |
|
35 | 35 | $ hg add |
|
36 | 36 | adding dir/file |
|
37 | 37 | $ hg -v commit -m commit-9 dir |
|
38 | 38 | dir/file |
|
39 | 39 | committed changeset 2:d2a76177cb42 |
|
40 | 40 | |
|
41 | 41 | $ echo > dir.file |
|
42 | 42 | $ hg add |
|
43 | 43 | adding dir.file |
|
44 | 44 | $ hg commit -m commit-10 dir dir.file |
|
45 | 45 | abort: dir: no match under directory! |
|
46 | 46 | |
|
47 | 47 | $ echo >> dir/file |
|
48 | 48 | $ mkdir bleh |
|
49 | 49 | $ mkdir dir2 |
|
50 | 50 | $ cd bleh |
|
51 | 51 | $ hg commit -m commit-11 . |
|
52 | 52 | abort: bleh: no match under directory! |
|
53 | 53 | $ hg commit -m commit-12 ../dir ../dir2 |
|
54 | 54 | abort: dir2: no match under directory! |
|
55 | 55 | $ hg -v commit -m commit-13 ../dir |
|
56 | 56 | dir/file |
|
57 | 57 | committed changeset 3:1cd62a2d8db5 |
|
58 | 58 | $ cd .. |
|
59 | 59 | |
|
60 | 60 | $ hg commit -m commit-14 does-not-exist |
|
61 | 61 | abort: does-not-exist: No such file or directory |
|
62 | 62 | $ ln -s foo baz |
|
63 | 63 | $ hg commit -m commit-15 baz |
|
64 | 64 | abort: baz: file not tracked! |
|
65 | 65 | $ touch quux |
|
66 | 66 | $ hg commit -m commit-16 quux |
|
67 | 67 | abort: quux: file not tracked! |
|
68 | 68 | $ echo >> dir/file |
|
69 | 69 | $ hg -v commit -m commit-17 dir/file |
|
70 | 70 | dir/file |
|
71 | 71 | committed changeset 4:49176991390e |
|
72 | 72 | |
|
73 | 73 | An empty date was interpreted as epoch origin |
|
74 | 74 | |
|
75 | 75 | $ echo foo >> foo |
|
76 | 76 | $ hg commit -d '' -m commit-no-date |
|
77 | 77 | $ hg tip --template '{date|isodate}\n' | grep '1970' |
|
78 | 78 | $ cd .. |
|
79 | 79 | |
|
80 | 80 | |
|
81 | 81 | partial subdir commit test |
|
82 | 82 | |
|
83 | 83 | $ hg init test2 |
|
84 | 84 | $ cd test2 |
|
85 | 85 | $ mkdir foo |
|
86 | 86 | $ echo foo > foo/foo |
|
87 | 87 | $ mkdir bar |
|
88 | 88 | $ echo bar > bar/bar |
|
89 | 89 | $ hg add |
|
90 | 90 | adding bar/bar |
|
91 | 91 | adding foo/foo |
|
92 |
$ hg ci |
|
|
93 |
$ hg ci |
|
|
92 | $ hg ci -m commit-subdir-1 foo | |
|
93 | $ hg ci -m commit-subdir-2 bar | |
|
94 | 94 | |
|
95 | 95 | subdir log 1 |
|
96 | 96 | |
|
97 | 97 | $ hg log -v foo |
|
98 |
changeset: 0: |
|
|
98 | changeset: 0:f97e73a25882 | |
|
99 | 99 | user: test |
|
100 |
date: |
|
|
100 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
101 | 101 | files: foo/foo |
|
102 | 102 | description: |
|
103 | 103 | commit-subdir-1 |
|
104 | 104 | |
|
105 | 105 | |
|
106 | 106 | |
|
107 | 107 | subdir log 2 |
|
108 | 108 | |
|
109 | 109 | $ hg log -v bar |
|
110 |
changeset: 1: |
|
|
110 | changeset: 1:aa809156d50d | |
|
111 | 111 | tag: tip |
|
112 | 112 | user: test |
|
113 |
date: |
|
|
113 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
114 | 114 | files: bar/bar |
|
115 | 115 | description: |
|
116 | 116 | commit-subdir-2 |
|
117 | 117 | |
|
118 | 118 | |
|
119 | 119 | |
|
120 | 120 | full log |
|
121 | 121 | |
|
122 | 122 | $ hg log -v |
|
123 |
changeset: 1: |
|
|
123 | changeset: 1:aa809156d50d | |
|
124 | 124 | tag: tip |
|
125 | 125 | user: test |
|
126 |
date: |
|
|
126 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
127 | 127 | files: bar/bar |
|
128 | 128 | description: |
|
129 | 129 | commit-subdir-2 |
|
130 | 130 | |
|
131 | 131 | |
|
132 |
changeset: 0: |
|
|
132 | changeset: 0:f97e73a25882 | |
|
133 | 133 | user: test |
|
134 |
date: |
|
|
134 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
135 | 135 | files: foo/foo |
|
136 | 136 | description: |
|
137 | 137 | commit-subdir-1 |
|
138 | 138 | |
|
139 | 139 | |
|
140 | 140 | $ cd .. |
|
141 | 141 | |
|
142 | 142 | |
|
143 | 143 | dot and subdir commit test |
|
144 | 144 | |
|
145 | 145 | $ hg init test3 |
|
146 | 146 | $ cd test3 |
|
147 | 147 | $ mkdir foo |
|
148 | 148 | $ echo foo content > foo/plain-file |
|
149 | 149 | $ hg add foo/plain-file |
|
150 |
$ hg ci |
|
|
150 | $ hg ci -m commit-foo-subdir foo | |
|
151 | 151 | $ echo modified foo content > foo/plain-file |
|
152 |
$ hg ci |
|
|
152 | $ hg ci -m commit-foo-dot . | |
|
153 | 153 | |
|
154 | 154 | full log |
|
155 | 155 | |
|
156 | 156 | $ hg log -v |
|
157 |
changeset: 1: |
|
|
157 | changeset: 1:95b38e3a5b2e | |
|
158 | 158 | tag: tip |
|
159 | 159 | user: test |
|
160 |
date: |
|
|
160 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
161 | 161 | files: foo/plain-file |
|
162 | 162 | description: |
|
163 | 163 | commit-foo-dot |
|
164 | 164 | |
|
165 | 165 | |
|
166 |
changeset: 0: |
|
|
166 | changeset: 0:65d4e9386227 | |
|
167 | 167 | user: test |
|
168 |
date: |
|
|
168 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
169 | 169 | files: foo/plain-file |
|
170 | 170 | description: |
|
171 | 171 | commit-foo-subdir |
|
172 | 172 | |
|
173 | 173 | |
|
174 | 174 | |
|
175 | 175 | subdir log |
|
176 | 176 | |
|
177 | 177 | $ cd foo |
|
178 | 178 | $ hg log . |
|
179 |
changeset: 1: |
|
|
179 | changeset: 1:95b38e3a5b2e | |
|
180 | 180 | tag: tip |
|
181 | 181 | user: test |
|
182 |
date: |
|
|
182 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
183 | 183 | summary: commit-foo-dot |
|
184 | 184 | |
|
185 |
changeset: 0: |
|
|
185 | changeset: 0:65d4e9386227 | |
|
186 | 186 | user: test |
|
187 |
date: |
|
|
187 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
188 | 188 | summary: commit-foo-subdir |
|
189 | 189 | |
|
190 | 190 | $ cd .. |
|
191 | 191 | $ cd .. |
|
192 | 192 | |
|
193 | 193 | $ cd .. |
|
194 | 194 | $ hg init issue1049 |
|
195 | 195 | $ cd issue1049 |
|
196 | 196 | $ echo a > a |
|
197 | 197 | $ hg ci -Ama |
|
198 | 198 | adding a |
|
199 | 199 | $ echo a >> a |
|
200 | 200 | $ hg ci -mb |
|
201 | 201 | $ hg up 0 |
|
202 | 202 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
203 | 203 | $ echo b >> a |
|
204 | 204 | $ hg ci -mc |
|
205 | 205 | created new head |
|
206 | 206 | $ HGMERGE=true hg merge |
|
207 | 207 | merging a |
|
208 | 208 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
209 | 209 | (branch merge, don't forget to commit) |
|
210 | 210 | |
|
211 | 211 | should fail because we are specifying a file name |
|
212 | 212 | |
|
213 | 213 | $ hg ci -mmerge a |
|
214 | 214 | abort: cannot partially commit a merge (do not specify files or patterns) |
|
215 | 215 | |
|
216 | 216 | should fail because we are specifying a pattern |
|
217 | 217 | |
|
218 | 218 | $ hg ci -mmerge -I a |
|
219 | 219 | abort: cannot partially commit a merge (do not specify files or patterns) |
|
220 | 220 | |
|
221 | 221 | should succeed |
|
222 | 222 | |
|
223 | 223 | $ hg ci -mmerge |
|
224 | 224 | $ cd .. |
|
225 | 225 | |
|
226 | 226 | |
|
227 | 227 | test commit message content |
|
228 | 228 | |
|
229 | 229 | $ hg init commitmsg |
|
230 | 230 | $ cd commitmsg |
|
231 | 231 | $ echo changed > changed |
|
232 | 232 | $ echo removed > removed |
|
233 | 233 | $ hg ci -qAm init |
|
234 | 234 | |
|
235 | 235 | $ hg rm removed |
|
236 | 236 | $ echo changed >> changed |
|
237 | 237 | $ echo added > added |
|
238 | 238 | $ hg add added |
|
239 | 239 | $ HGEDITOR=cat hg ci -A |
|
240 | 240 | |
|
241 | 241 | |
|
242 | 242 | HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
243 | 243 | HG: Leave message empty to abort commit. |
|
244 | 244 | HG: -- |
|
245 | 245 | HG: user: test |
|
246 | 246 | HG: branch 'default' |
|
247 | 247 | HG: added added |
|
248 | 248 | HG: changed changed |
|
249 | 249 | HG: removed removed |
|
250 | 250 | abort: empty commit message |
|
251 | 251 | $ cd .. |
|
252 | 252 | |
|
253 | 253 | $ exit 0 |
@@ -1,63 +1,63 b'' | |||
|
1 | 1 | $ unset HGUSER |
|
2 | 2 | $ EMAIL="My Name <myname@example.com>" |
|
3 | 3 | $ export EMAIL |
|
4 | 4 | |
|
5 | 5 | $ hg init test |
|
6 | 6 | $ cd test |
|
7 | 7 | $ touch asdf |
|
8 | 8 | $ hg add asdf |
|
9 |
$ hg commit - |
|
|
9 | $ hg commit -m commit-1 | |
|
10 | 10 | $ hg tip |
|
11 |
changeset: 0: |
|
|
11 | changeset: 0:53f268a58230 | |
|
12 | 12 | tag: tip |
|
13 | 13 | user: My Name <myname@example.com> |
|
14 |
date: |
|
|
14 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
15 | 15 | summary: commit-1 |
|
16 | 16 | |
|
17 | 17 | |
|
18 | 18 | $ unset EMAIL |
|
19 | 19 | $ echo 1234 > asdf |
|
20 |
$ hg commit |
|
|
20 | $ hg commit -u "foo@bar.com" -m commit-1 | |
|
21 | 21 | $ hg tip |
|
22 |
changeset: 1: |
|
|
22 | changeset: 1:3871b2a9e9bf | |
|
23 | 23 | tag: tip |
|
24 | 24 | user: foo@bar.com |
|
25 |
date: |
|
|
25 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
26 | 26 | summary: commit-1 |
|
27 | 27 | |
|
28 | 28 | $ echo "[ui]" >> .hg/hgrc |
|
29 | 29 | $ echo "username = foobar <foo@bar.com>" >> .hg/hgrc |
|
30 | 30 | $ echo 12 > asdf |
|
31 |
$ hg commit - |
|
|
31 | $ hg commit -m commit-1 | |
|
32 | 32 | $ hg tip |
|
33 |
changeset: 2: |
|
|
33 | changeset: 2:8eeac6695c1c | |
|
34 | 34 | tag: tip |
|
35 | 35 | user: foobar <foo@bar.com> |
|
36 |
date: |
|
|
36 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
37 | 37 | summary: commit-1 |
|
38 | 38 | |
|
39 | 39 | $ echo 1 > asdf |
|
40 |
$ hg commit |
|
|
40 | $ hg commit -u "foo@bar.com" -m commit-1 | |
|
41 | 41 | $ hg tip |
|
42 |
changeset: 3: |
|
|
42 | changeset: 3:957606a725e4 | |
|
43 | 43 | tag: tip |
|
44 | 44 | user: foo@bar.com |
|
45 |
date: |
|
|
45 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
46 | 46 | summary: commit-1 |
|
47 | 47 | |
|
48 | 48 | $ echo 123 > asdf |
|
49 | 49 | $ echo "[ui]" > .hg/hgrc |
|
50 | 50 | $ echo "username = " >> .hg/hgrc |
|
51 |
$ hg commit - |
|
|
51 | $ hg commit -m commit-1 | |
|
52 | 52 | abort: no username supplied (see "hg help config") |
|
53 | 53 | $ rm .hg/hgrc |
|
54 |
$ hg commit |
|
|
54 | $ hg commit -m commit-1 2>&1 | |
|
55 | 55 | No username found, using '[^']*' instead |
|
56 | 56 | |
|
57 | 57 | $ echo space > asdf |
|
58 |
$ hg commit - |
|
|
58 | $ hg commit -u ' ' -m commit-1 | |
|
59 | 59 | transaction abort! |
|
60 | 60 | rollback completed |
|
61 | 61 | abort: empty username! |
|
62 | 62 | |
|
63 | 63 | $ true |
@@ -1,32 +1,32 b'' | |||
|
1 | 1 | $ hg init |
|
2 | 2 | $ echo "nothing" > a |
|
3 | 3 | $ hg add a |
|
4 |
$ hg commit -m ancestor |
|
|
4 | $ hg commit -m ancestor | |
|
5 | 5 |
$ |
|
6 |
$ |
|
|
6 | $ hg commit -m branch1 | |
|
7 | 7 |
$ |
|
8 | 8 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
9 | 9 | $ echo "something else" > a |
|
10 |
$ hg commit -m branch2 |
|
|
10 | $ hg commit -m branch2 | |
|
11 | 11 | created new head |
|
12 | 12 | |
|
13 | 13 | $ hg merge 1 |
|
14 | 14 | merging a |
|
15 | 15 | warning: conflicts during merge. |
|
16 | 16 | merging a failed! |
|
17 | 17 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
18 | 18 | use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon |
|
19 | 19 | |
|
20 | 20 | $ hg id |
|
21 | e7fe8eb3e180+0d24b7662d3e+ tip | |
|
21 | 32e80765d7fe+75234512624c+ tip | |
|
22 | 22 | |
|
23 | 23 | $ cat a |
|
24 | 24 | <<<<<<< local |
|
25 | 25 | something else |
|
26 | 26 | ======= |
|
27 | 27 | something |
|
28 | 28 | >>>>>>> other |
|
29 | 29 | |
|
30 | 30 | $ hg status |
|
31 | 31 | M a |
|
32 | 32 | ? a.orig |
@@ -1,55 +1,55 b'' | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | 3 | hg init |
|
4 | 4 | echo foo > a |
|
5 | 5 | hg add a |
|
6 |
hg commit -m "1" |
|
|
6 | hg commit -m "1" | |
|
7 | 7 | |
|
8 | 8 | echo bar > b |
|
9 | 9 | hg add b |
|
10 | 10 | hg remove a |
|
11 | 11 | |
|
12 | 12 | echo "%%% should show a removed and b added" |
|
13 | 13 | hg status |
|
14 | 14 | |
|
15 | 15 | echo "reverting..." |
|
16 | 16 | hg revert --all |
|
17 | 17 | |
|
18 | 18 | echo "%%% should show b unknown and a back to normal" |
|
19 | 19 | hg status |
|
20 | 20 | |
|
21 | 21 | rm b |
|
22 | 22 | |
|
23 | 23 | hg co -C 0 |
|
24 | 24 | echo foo-a > a |
|
25 |
hg commit -m "2a" |
|
|
25 | hg commit -m "2a" | |
|
26 | 26 | |
|
27 | 27 | hg co -C 0 |
|
28 | 28 | echo foo-b > a |
|
29 |
hg commit -m "2b" |
|
|
29 | hg commit -m "2b" | |
|
30 | 30 | |
|
31 | 31 | HGMERGE=true hg merge 1 |
|
32 | 32 | |
|
33 | 33 | echo "%%% should show foo-b" |
|
34 | 34 | cat a |
|
35 | 35 | |
|
36 | 36 | echo bar > b |
|
37 | 37 | hg add b |
|
38 | 38 | rm a |
|
39 | 39 | hg remove a |
|
40 | 40 | |
|
41 | 41 | echo "%%% should show a removed and b added" |
|
42 | 42 | hg status |
|
43 | 43 | |
|
44 | 44 | echo "%%% revert should fail" |
|
45 | 45 | hg revert --all |
|
46 | 46 | |
|
47 | 47 | echo "%%% revert should be ok now" |
|
48 | 48 | hg revert -r2 --all |
|
49 | 49 | |
|
50 | 50 | echo "%%% should show b unknown and a marked modified (merged)" |
|
51 | 51 | hg status |
|
52 | 52 | |
|
53 | 53 | echo "%%% should show foo-b" |
|
54 | 54 | cat a |
|
55 | 55 |
@@ -1,63 +1,63 b'' | |||
|
1 | 1 | $ mkdir t |
|
2 | 2 | $ cd t |
|
3 | 3 | $ hg init |
|
4 | 4 | |
|
5 | 5 | $ echo 1 > a |
|
6 |
$ hg ci -qAm "first" |
|
|
6 | $ hg ci -qAm "first" | |
|
7 | 7 | |
|
8 | 8 | $ hg cp a b |
|
9 | 9 | $ hg mv a c |
|
10 | 10 | $ echo 2 >> b |
|
11 | 11 | $ echo 2 >> c |
|
12 | 12 | |
|
13 |
$ hg ci -qAm "second" |
|
|
13 | $ hg ci -qAm "second" | |
|
14 | 14 | |
|
15 | 15 | $ hg co -C 0 |
|
16 | 16 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
17 | 17 | |
|
18 | 18 | $ echo 0 > a |
|
19 | 19 | $ echo 1 >> a |
|
20 | 20 | |
|
21 |
$ hg ci -qAm "other" |
|
|
21 | $ hg ci -qAm "other" | |
|
22 | 22 | |
|
23 | 23 | $ hg merge --debug |
|
24 | 24 | searching for copies back to rev 1 |
|
25 | 25 | unmatched files in other: |
|
26 | 26 | b |
|
27 | 27 | c |
|
28 | 28 | all copies found (* = to merge, ! = divergent): |
|
29 | 29 | c -> a * |
|
30 | 30 | b -> a * |
|
31 | 31 | checking for directory renames |
|
32 | 32 | resolving manifests |
|
33 | 33 | overwrite None partial False |
|
34 | ancestor 583c7b748052 local fb3948d97f07+ remote 7f1309517659 | |
|
34 | ancestor b8bf91eeebbc local add3f11052fa+ remote 17c05bb7fcb6 | |
|
35 | 35 | a: remote moved to c -> m |
|
36 | 36 | a: remote moved to b -> m |
|
37 | 37 | preserving a for resolve of b |
|
38 | 38 | preserving a for resolve of c |
|
39 | 39 | removing a |
|
40 | 40 | updating: a 1/2 files (50.00%) |
|
41 | 41 | picked tool 'internal:merge' for b (binary False symlink False) |
|
42 | 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 | 44 | premerge successful |
|
45 | 45 | updating: a 2/2 files (100.00%) |
|
46 | 46 | picked tool 'internal:merge' for c (binary False symlink False) |
|
47 | 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 | 49 | premerge successful |
|
50 | 50 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
51 | 51 | (branch merge, don't forget to commit) |
|
52 | 52 | |
|
53 | 53 | file b |
|
54 | 54 | $ cat b |
|
55 | 55 | 0 |
|
56 | 56 | 1 |
|
57 | 57 | 2 |
|
58 | 58 | |
|
59 | 59 | file c |
|
60 | 60 | $ cat c |
|
61 | 61 | 0 |
|
62 | 62 | 1 |
|
63 | 63 | 2 |
@@ -1,91 +1,91 b'' | |||
|
1 | 1 | $ hg init |
|
2 | 2 | $ echo a > a |
|
3 | 3 | $ hg add a |
|
4 |
$ hg commit -m "1" |
|
|
4 | $ hg commit -m "1" | |
|
5 | 5 | $ hg status |
|
6 | 6 | $ hg copy a b |
|
7 | 7 | $ hg status |
|
8 | 8 | A b |
|
9 | 9 | $ hg sum |
|
10 |
parent: 0: |
|
|
10 | parent: 0:c19d34741b0a tip | |
|
11 | 11 | 1 |
|
12 | 12 | branch: default |
|
13 | 13 | commit: 1 copied |
|
14 | 14 | update: (current) |
|
15 |
$ hg --debug commit -m "2" |
|
|
15 | $ hg --debug commit -m "2" | |
|
16 | 16 | b |
|
17 | 17 | b: copy a:b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 |
|
18 | committed changeset 1:76973b01f66a012648546c979ea4c41de9e7d8cd | |
|
18 | committed changeset 1:93580a2c28a50a56f63526fb305067e6fbf739c4 | |
|
19 | 19 | |
|
20 | 20 | we should see two history entries |
|
21 | 21 | |
|
22 | 22 | $ hg history -v |
|
23 |
changeset: 1: |
|
|
23 | changeset: 1:93580a2c28a5 | |
|
24 | 24 | tag: tip |
|
25 | 25 | user: test |
|
26 |
date: |
|
|
26 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
27 | 27 | files: b |
|
28 | 28 | description: |
|
29 | 29 | 2 |
|
30 | 30 | |
|
31 | 31 | |
|
32 |
changeset: 0: |
|
|
32 | changeset: 0:c19d34741b0a | |
|
33 | 33 | user: test |
|
34 |
date: |
|
|
34 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
35 | 35 | files: a |
|
36 | 36 | description: |
|
37 | 37 | 1 |
|
38 | 38 | |
|
39 | 39 | |
|
40 | 40 | |
|
41 | 41 | we should see one log entry for a |
|
42 | 42 | |
|
43 | 43 | $ hg log a |
|
44 |
changeset: 0: |
|
|
44 | changeset: 0:c19d34741b0a | |
|
45 | 45 | user: test |
|
46 |
date: |
|
|
46 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
47 | 47 | summary: 1 |
|
48 | 48 | |
|
49 | 49 | |
|
50 | 50 | this should show a revision linked to changeset 0 |
|
51 | 51 | |
|
52 | 52 | $ hg debugindex .hg/store/data/a.i |
|
53 | 53 | rev offset length base linkrev nodeid p1 p2 |
|
54 | 54 | 0 0 3 0 0 b789fdd96dc2 000000000000 000000000000 |
|
55 | 55 | |
|
56 | 56 | we should see one log entry for b |
|
57 | 57 | |
|
58 | 58 | $ hg log b |
|
59 |
changeset: 1: |
|
|
59 | changeset: 1:93580a2c28a5 | |
|
60 | 60 | tag: tip |
|
61 | 61 | user: test |
|
62 |
date: |
|
|
62 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
63 | 63 | summary: 2 |
|
64 | 64 | |
|
65 | 65 | |
|
66 | 66 | this should show a revision linked to changeset 1 |
|
67 | 67 | |
|
68 | 68 | $ hg debugindex .hg/store/data/b.i |
|
69 | 69 | rev offset length base linkrev nodeid p1 p2 |
|
70 | 70 | 0 0 65 0 1 37d9b5d994ea 000000000000 000000000000 |
|
71 | 71 | |
|
72 | 72 | this should show the rename information in the metadata |
|
73 | 73 | |
|
74 | 74 | $ hg debugdata .hg/store/data/b.d 0 | head -3 | tail -2 |
|
75 | 75 | copy: a |
|
76 | 76 | copyrev: b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 |
|
77 | 77 | |
|
78 | 78 | $ $TESTDIR/md5sum.py .hg/store/data/b.i |
|
79 | 79 | 4999f120a3b88713bbefddd195cf5133 .hg/store/data/b.i |
|
80 | 80 | $ hg cat b > bsum |
|
81 | 81 | $ $TESTDIR/md5sum.py bsum |
|
82 | 82 | 60b725f10c9c85c70d97880dfe8191b3 bsum |
|
83 | 83 | $ hg cat a > asum |
|
84 | 84 | $ $TESTDIR/md5sum.py asum |
|
85 | 85 | 60b725f10c9c85c70d97880dfe8191b3 asum |
|
86 | 86 | $ hg verify |
|
87 | 87 | checking changesets |
|
88 | 88 | checking manifests |
|
89 | 89 | crosschecking files in changesets and manifests |
|
90 | 90 | checking files |
|
91 | 91 | 2 files, 2 changesets, 2 total revisions |
@@ -1,45 +1,45 b'' | |||
|
1 | 1 | $ hg init a |
|
2 | 2 | $ cd a |
|
3 | 3 | |
|
4 | 4 | $ hg diff inexistent1 inexistent2 |
|
5 | 5 | inexistent1: No such file or directory |
|
6 | 6 | inexistent2: No such file or directory |
|
7 | 7 | |
|
8 | 8 | $ echo bar > foo |
|
9 | 9 | $ hg add foo |
|
10 |
$ hg ci -m 'add foo' |
|
|
10 | $ hg ci -m 'add foo' | |
|
11 | 11 | |
|
12 | 12 | $ echo foobar > foo |
|
13 |
$ hg ci -m 'change foo' |
|
|
13 | $ hg ci -m 'change foo' | |
|
14 | 14 | |
|
15 | 15 | $ hg --quiet diff -r 0 -r 1 |
|
16 |
--- a/foo |
|
|
17 |
+++ b/foo |
|
|
16 | --- a/foo Thu Jan 01 00:00:00 1970 +0000 | |
|
17 | +++ b/foo Thu Jan 01 00:00:00 1970 +0000 | |
|
18 | 18 | @@ -1,1 +1,1 @@ |
|
19 | 19 | -bar |
|
20 | 20 | +foobar |
|
21 | 21 | |
|
22 | 22 | $ hg diff -r 0 -r 1 |
|
23 | diff -r 74de3f1392e2 -r b8b5f023a6ad foo | |
|
24 |
--- a/foo |
|
|
25 |
+++ b/foo |
|
|
23 | diff -r a99fb63adac3 -r 9b8568d3af2f foo | |
|
24 | --- a/foo Thu Jan 01 00:00:00 1970 +0000 | |
|
25 | +++ b/foo Thu Jan 01 00:00:00 1970 +0000 | |
|
26 | 26 | @@ -1,1 +1,1 @@ |
|
27 | 27 | -bar |
|
28 | 28 | +foobar |
|
29 | 29 | |
|
30 | 30 | $ hg --verbose diff -r 0 -r 1 |
|
31 | diff -r 74de3f1392e2 -r b8b5f023a6ad foo | |
|
32 |
--- a/foo |
|
|
33 |
+++ b/foo |
|
|
31 | diff -r a99fb63adac3 -r 9b8568d3af2f foo | |
|
32 | --- a/foo Thu Jan 01 00:00:00 1970 +0000 | |
|
33 | +++ b/foo Thu Jan 01 00:00:00 1970 +0000 | |
|
34 | 34 | @@ -1,1 +1,1 @@ |
|
35 | 35 | -bar |
|
36 | 36 | +foobar |
|
37 | 37 | |
|
38 | 38 | $ hg --debug diff -r 0 -r 1 |
|
39 | diff -r 74de3f1392e2d67856fb155963441f2610494e1a -r b8b5f023a6ad77fc378bd95cf3fa00cd1414d107 foo | |
|
40 |
--- a/foo |
|
|
41 |
+++ b/foo |
|
|
39 | diff -r a99fb63adac3f31816a22f665bc3b7a7655b30f4 -r 9b8568d3af2f1749445eef03aede868a6f39f210 foo | |
|
40 | --- a/foo Thu Jan 01 00:00:00 1970 +0000 | |
|
41 | +++ b/foo Thu Jan 01 00:00:00 1970 +0000 | |
|
42 | 42 | @@ -1,1 +1,1 @@ |
|
43 | 43 | -bar |
|
44 | 44 | +foobar |
|
45 | 45 |
@@ -1,40 +1,40 b'' | |||
|
1 | 1 | $ hg init |
|
2 | 2 | $ touch a |
|
3 | 3 | $ hg add a |
|
4 |
$ hg ci -m "a" |
|
|
4 | $ hg ci -m "a" | |
|
5 | 5 | |
|
6 | 6 | $ echo 123 > b |
|
7 | 7 | $ hg add b |
|
8 | 8 | $ hg diff --nodates |
|
9 |
diff -r |
|
|
9 | diff -r 3903775176ed b | |
|
10 | 10 | --- /dev/null |
|
11 | 11 | +++ b/b |
|
12 | 12 | @@ -0,0 +1,1 @@ |
|
13 | 13 | +123 |
|
14 | 14 | |
|
15 | 15 | $ hg diff --nodates -r tip |
|
16 |
diff -r |
|
|
16 | diff -r 3903775176ed b | |
|
17 | 17 | --- /dev/null |
|
18 | 18 | +++ b/b |
|
19 | 19 | @@ -0,0 +1,1 @@ |
|
20 | 20 | +123 |
|
21 | 21 | |
|
22 | 22 | $ echo foo > a |
|
23 | 23 | $ hg diff --nodates |
|
24 |
diff -r |
|
|
24 | diff -r 3903775176ed a | |
|
25 | 25 | --- a/a |
|
26 | 26 | +++ b/a |
|
27 | 27 | @@ -0,0 +1,1 @@ |
|
28 | 28 | +foo |
|
29 |
diff -r |
|
|
29 | diff -r 3903775176ed b | |
|
30 | 30 | --- /dev/null |
|
31 | 31 | +++ b/b |
|
32 | 32 | @@ -0,0 +1,1 @@ |
|
33 | 33 | +123 |
|
34 | 34 | |
|
35 | 35 | $ hg diff -r "" |
|
36 | 36 | abort: 00changelog.i@: ambiguous identifier! |
|
37 | 37 | $ hg diff -r tip -r "" |
|
38 | 38 | abort: 00changelog.i@: ambiguous identifier! |
|
39 | 39 | |
|
40 | 40 | $ true |
@@ -1,65 +1,65 b'' | |||
|
1 | 1 | $ hg init repo |
|
2 | 2 | $ cd repo |
|
3 | 3 | |
|
4 | 4 | $ echo line 1 > foo |
|
5 |
$ hg ci -qAm 'add foo' |
|
|
5 | $ hg ci -qAm 'add foo' | |
|
6 | 6 | |
|
7 | 7 | copy foo to bar and change both files |
|
8 | 8 | $ hg cp foo bar |
|
9 | 9 | $ echo line 2-1 >> foo |
|
10 | 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 | 13 | in another branch, change foo in a way that doesn't conflict with |
|
14 | 14 | the other changes |
|
15 | 15 | $ hg up -qC 0 |
|
16 | 16 | $ echo line 0 > foo |
|
17 | 17 | $ hg cat foo >> foo |
|
18 |
$ hg ci -m 'change foo' |
|
|
18 | $ hg ci -m 'change foo' | |
|
19 | 19 | created new head |
|
20 | 20 | |
|
21 | 21 | we get conflicts that shouldn't be there |
|
22 | 22 | $ hg merge -P |
|
23 |
changeset: 1: |
|
|
23 | changeset: 1:484bf6903104 | |
|
24 | 24 | user: test |
|
25 |
date: |
|
|
25 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
26 | 26 | summary: cp foo bar; change both |
|
27 | 27 | |
|
28 | 28 | $ hg merge --debug |
|
29 | 29 | searching for copies back to rev 1 |
|
30 | 30 | unmatched files in other: |
|
31 | 31 | bar |
|
32 | 32 | all copies found (* = to merge, ! = divergent): |
|
33 | 33 | bar -> foo * |
|
34 | 34 | checking for directory renames |
|
35 | 35 | resolving manifests |
|
36 | 36 | overwrite None partial False |
|
37 | ancestor 310fd17130da local 2092631ce82b+ remote d9da848d0adf | |
|
37 | ancestor e6dc8efe11cc local 6a0df1dad128+ remote 484bf6903104 | |
|
38 | 38 | foo: versions differ -> m |
|
39 | 39 | foo: remote copied to bar -> m |
|
40 | 40 | preserving foo for resolve of bar |
|
41 | 41 | preserving foo for resolve of foo |
|
42 | 42 | updating: foo 1/2 files (50.00%) |
|
43 | 43 | picked tool 'internal:merge' for bar (binary False symlink False) |
|
44 | 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 | 46 | premerge successful |
|
47 | 47 | updating: foo 2/2 files (100.00%) |
|
48 | 48 | picked tool 'internal:merge' for foo (binary False symlink False) |
|
49 | 49 | merging foo |
|
50 | my foo@2092631ce82b+ other foo@d9da848d0adf ancestor foo@310fd17130da | |
|
50 | my foo@6a0df1dad128+ other foo@484bf6903104 ancestor foo@e6dc8efe11cc | |
|
51 | 51 | premerge successful |
|
52 | 52 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
53 | 53 | (branch merge, don't forget to commit) |
|
54 | 54 | |
|
55 | 55 | contents of foo |
|
56 | 56 | $ cat foo |
|
57 | 57 | line 0 |
|
58 | 58 | line 1 |
|
59 | 59 | line 2-1 |
|
60 | 60 | |
|
61 | 61 | contents of bar |
|
62 | 62 | $ cat bar |
|
63 | 63 | line 0 |
|
64 | 64 | line 1 |
|
65 | 65 | line 2-2 |
@@ -1,16 +1,16 b'' | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | 3 | hg init |
|
4 | 4 | echo 123 > a |
|
5 | 5 | hg add a |
|
6 |
hg commit -m "first" |
|
|
6 | hg commit -m "first" a | |
|
7 | 7 | mkdir sub |
|
8 | 8 | echo 321 > sub/b |
|
9 | 9 | hg add sub/b |
|
10 |
hg commit -m "second" |
|
|
10 | hg commit -m "second" sub/b | |
|
11 | 11 | cat sub/b |
|
12 | 12 | hg co 0 |
|
13 | 13 | cat sub/b 2>/dev/null || echo "sub/b not present" |
|
14 | 14 | test -d sub || echo "sub not present" |
|
15 | 15 | |
|
16 | 16 | true |
@@ -1,25 +1,25 b'' | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | 3 | hg init a |
|
4 | 4 | cd a |
|
5 | 5 | touch empty1 |
|
6 | 6 | hg add empty1 |
|
7 |
hg commit -m 'add empty1' |
|
|
7 | hg commit -m 'add empty1' | |
|
8 | 8 | |
|
9 | 9 | touch empty2 |
|
10 | 10 | hg add empty2 |
|
11 |
hg commit -m 'add empty2' |
|
|
11 | hg commit -m 'add empty2' | |
|
12 | 12 | |
|
13 | 13 | hg up -C 0 |
|
14 | 14 | touch empty3 |
|
15 | 15 | hg add empty3 |
|
16 |
hg commit -m 'add empty3' |
|
|
16 | hg commit -m 'add empty3' | |
|
17 | 17 | |
|
18 | 18 | hg heads |
|
19 | 19 | |
|
20 | 20 | hg merge 1 |
|
21 | 21 | # before changeset 05257fd28591, we didn't notice the |
|
22 | 22 | # empty file that came from rev 1. |
|
23 | 23 | hg status |
|
24 |
hg commit -m merge |
|
|
24 | hg commit -m merge | |
|
25 | 25 | hg manifest --debug tip |
@@ -1,20 +1,20 b'' | |||
|
1 | 1 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
2 | 2 | created new head |
|
3 |
changeset: 2: |
|
|
3 | changeset: 2:a1cb177e0d44 | |
|
4 | 4 | tag: tip |
|
5 |
parent: 0: |
|
|
5 | parent: 0:1e1d9c4e5b64 | |
|
6 | 6 | user: test |
|
7 |
date: |
|
|
7 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
8 | 8 | summary: add empty3 |
|
9 | 9 | |
|
10 |
changeset: 1: |
|
|
10 | changeset: 1:097d2b0e17f6 | |
|
11 | 11 | user: test |
|
12 |
date: |
|
|
12 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
13 | 13 | summary: add empty2 |
|
14 | 14 | |
|
15 | 15 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
16 | 16 | (branch merge, don't forget to commit) |
|
17 | 17 | M empty2 |
|
18 | 18 | b80de5d138758541c5f05265ad144ab9fa86d1db 644 empty1 |
|
19 | 19 | b80de5d138758541c5f05265ad144ab9fa86d1db 644 empty2 |
|
20 | 20 | b80de5d138758541c5f05265ad144ab9fa86d1db 644 empty3 |
@@ -1,49 +1,49 b'' | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | # |
|
3 | 3 | # A B |
|
4 | 4 | # |
|
5 | 5 | # 3 4 3 |
|
6 | 6 | # |\/| |\ |
|
7 | 7 | # |/\| | \ |
|
8 | 8 | # 1 2 1 2 |
|
9 | 9 | # \ / \ / |
|
10 | 10 | # 0 0 |
|
11 | 11 | # |
|
12 | 12 | # if the result of the merge of 1 and 2 |
|
13 | 13 | # is the same in 3 and 4, no new manifest |
|
14 | 14 | # will be created and the manifest group |
|
15 | 15 | # will be empty during the pull |
|
16 | 16 | # |
|
17 | 17 | # (plus we test a failure where outgoing |
|
18 | 18 | # wrongly reported the number of csets) |
|
19 | 19 | # |
|
20 | 20 | |
|
21 | 21 | hg init a |
|
22 | 22 | cd a |
|
23 | 23 | touch init |
|
24 |
hg ci -A -m 0 |
|
|
24 | hg ci -A -m 0 | |
|
25 | 25 | touch x y |
|
26 |
hg ci -A -m 1 |
|
|
26 | hg ci -A -m 1 | |
|
27 | 27 | hg update 0 |
|
28 | 28 | touch x y |
|
29 |
hg ci -A -m 2 |
|
|
29 | hg ci -A -m 2 | |
|
30 | 30 | hg merge 1 |
|
31 |
hg ci -A -m m1 |
|
|
31 | hg ci -A -m m1 | |
|
32 | 32 | #hg log |
|
33 | 33 | #hg debugindex .hg/store/00manifest.i |
|
34 | 34 | hg update -C 1 |
|
35 | 35 | hg merge 2 |
|
36 |
hg ci -A -m m2 |
|
|
36 | hg ci -A -m m2 | |
|
37 | 37 | #hg log |
|
38 | 38 | #hg debugindex .hg/store/00manifest.i |
|
39 | 39 | |
|
40 | 40 | cd .. |
|
41 | 41 | hg clone -r 3 a b |
|
42 | 42 | hg clone -r 4 a c |
|
43 | 43 | hg -R a outgoing b |
|
44 | 44 | hg -R a outgoing c |
|
45 | 45 | hg -R b outgoing c |
|
46 | 46 | hg -R c outgoing b |
|
47 | 47 | |
|
48 | 48 | hg -R b pull a |
|
49 | 49 | hg -R c pull a |
@@ -1,80 +1,80 b'' | |||
|
1 | 1 | adding init |
|
2 | 2 | adding x |
|
3 | 3 | adding y |
|
4 | 4 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
5 | 5 | adding x |
|
6 | 6 | adding y |
|
7 | 7 | created new head |
|
8 | 8 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
9 | 9 | (branch merge, don't forget to commit) |
|
10 | 10 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
11 | 11 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
12 | 12 | (branch merge, don't forget to commit) |
|
13 | 13 | created new head |
|
14 | 14 | requesting all changes |
|
15 | 15 | adding changesets |
|
16 | 16 | adding manifests |
|
17 | 17 | adding file changes |
|
18 | 18 | added 4 changesets with 3 changes to 3 files |
|
19 | 19 | updating to branch default |
|
20 | 20 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
21 | 21 | requesting all changes |
|
22 | 22 | adding changesets |
|
23 | 23 | adding manifests |
|
24 | 24 | adding file changes |
|
25 | 25 | added 4 changesets with 3 changes to 3 files |
|
26 | 26 | updating to branch default |
|
27 | 27 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
28 | 28 | comparing with b |
|
29 | 29 | searching for changes |
|
30 |
changeset: 4: |
|
|
30 | changeset: 4:119caaef4ed1 | |
|
31 | 31 | tag: tip |
|
32 |
parent: 1: |
|
|
33 |
parent: 2: |
|
|
32 | parent: 1:79f9e10cd04e | |
|
33 | parent: 2:8e1bb01c1a24 | |
|
34 | 34 | user: test |
|
35 |
date: |
|
|
35 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
36 | 36 | summary: m2 |
|
37 | 37 | |
|
38 | 38 | comparing with c |
|
39 | 39 | searching for changes |
|
40 |
changeset: 3: |
|
|
41 |
parent: 2: |
|
|
42 |
parent: 1: |
|
|
40 | changeset: 3:cbb48b367d1b | |
|
41 | parent: 2:8e1bb01c1a24 | |
|
42 | parent: 1:79f9e10cd04e | |
|
43 | 43 | user: test |
|
44 |
date: |
|
|
44 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
45 | 45 | summary: m1 |
|
46 | 46 | |
|
47 | 47 | comparing with c |
|
48 | 48 | searching for changes |
|
49 |
changeset: 3: |
|
|
49 | changeset: 3:cbb48b367d1b | |
|
50 | 50 | tag: tip |
|
51 |
parent: 2: |
|
|
52 |
parent: 1: |
|
|
51 | parent: 2:8e1bb01c1a24 | |
|
52 | parent: 1:79f9e10cd04e | |
|
53 | 53 | user: test |
|
54 |
date: |
|
|
54 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
55 | 55 | summary: m1 |
|
56 | 56 | |
|
57 | 57 | comparing with b |
|
58 | 58 | searching for changes |
|
59 |
changeset: 3: |
|
|
59 | changeset: 3:119caaef4ed1 | |
|
60 | 60 | tag: tip |
|
61 |
parent: 1: |
|
|
62 |
parent: 2: |
|
|
61 | parent: 1:79f9e10cd04e | |
|
62 | parent: 2:8e1bb01c1a24 | |
|
63 | 63 | user: test |
|
64 |
date: |
|
|
64 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
65 | 65 | summary: m2 |
|
66 | 66 | |
|
67 | 67 | pulling from a |
|
68 | 68 | searching for changes |
|
69 | 69 | adding changesets |
|
70 | 70 | adding manifests |
|
71 | 71 | adding file changes |
|
72 | 72 | added 1 changesets with 0 changes to 0 files (+1 heads) |
|
73 | 73 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
74 | 74 | pulling from a |
|
75 | 75 | searching for changes |
|
76 | 76 | adding changesets |
|
77 | 77 | adding manifests |
|
78 | 78 | adding file changes |
|
79 | 79 | added 1 changesets with 0 changes to 0 files (+1 heads) |
|
80 | 80 | (run 'hg heads' to see heads, 'hg merge' to merge) |
@@ -1,48 +1,48 b'' | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | 3 | hg init |
|
4 | 4 | |
|
5 | 5 | cat > .hg/hgrc <<EOF |
|
6 | 6 | [encode] |
|
7 | 7 | not.gz = tr [:lower:] [:upper:] |
|
8 | 8 | *.gz = gzip -d |
|
9 | 9 | |
|
10 | 10 | [decode] |
|
11 | 11 | not.gz = tr [:upper:] [:lower:] |
|
12 | 12 | *.gz = gzip |
|
13 | 13 | |
|
14 | 14 | EOF |
|
15 | 15 | |
|
16 | 16 | echo "this is a test" | gzip > a.gz |
|
17 | 17 | echo "this is a test" > not.gz |
|
18 | 18 | hg add * |
|
19 |
hg ci -m "test" |
|
|
19 | hg ci -m "test" | |
|
20 | 20 | echo %% no changes |
|
21 | 21 | hg status |
|
22 | 22 | touch * |
|
23 | 23 | |
|
24 | 24 | echo %% no changes |
|
25 | 25 | hg status |
|
26 | 26 | |
|
27 | 27 | echo %% check contents in repo are encoded |
|
28 | 28 | hg debugdata .hg/store/data/a.gz.d 0 |
|
29 | 29 | hg debugdata .hg/store/data/not.gz.d 0 |
|
30 | 30 | |
|
31 | 31 | echo %% check committed content was decoded |
|
32 | 32 | gunzip < a.gz |
|
33 | 33 | cat not.gz |
|
34 | 34 | |
|
35 | 35 | rm * |
|
36 | 36 | hg co -C |
|
37 | 37 | |
|
38 | 38 | echo %% check decoding of our new working dir copy |
|
39 | 39 | gunzip < a.gz |
|
40 | 40 | cat not.gz |
|
41 | 41 | |
|
42 | 42 | echo %% check hg cat operation |
|
43 | 43 | hg cat a.gz |
|
44 | 44 | hg cat --decode a.gz | gunzip |
|
45 | 45 | mkdir subdir |
|
46 | 46 | cd subdir |
|
47 | 47 | hg -R .. cat ../a.gz |
|
48 | 48 | hg -R .. cat --decode ../a.gz | gunzip |
@@ -1,62 +1,62 b'' | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | 3 | hg init t |
|
4 | 4 | cd t |
|
5 | 5 | |
|
6 | 6 | # we need a repo with some legacy latin-1 changesets |
|
7 | 7 | hg unbundle $TESTDIR/legacy-encoding.hg |
|
8 | 8 | hg co |
|
9 | 9 | |
|
10 | 10 | python << EOF |
|
11 | 11 | f = file('latin-1', 'w'); f.write("latin-1 e' encoded: \xe9"); f.close() |
|
12 | 12 | f = file('utf-8', 'w'); f.write("utf-8 e' encoded: \xc3\xa9"); f.close() |
|
13 | 13 | f = file('latin-1-tag', 'w'); f.write("\xe9"); f.close() |
|
14 | 14 | EOF |
|
15 | 15 | |
|
16 | 16 | echo % should fail with encoding error |
|
17 | 17 | echo "plain old ascii" > a |
|
18 | 18 | hg st |
|
19 |
HGENCODING=ascii hg ci -l latin-1 |
|
|
19 | HGENCODING=ascii hg ci -l latin-1 | |
|
20 | 20 | |
|
21 | 21 | echo % these should work |
|
22 | 22 | echo "latin-1" > a |
|
23 |
HGENCODING=latin-1 hg ci -l latin-1 |
|
|
23 | HGENCODING=latin-1 hg ci -l latin-1 | |
|
24 | 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 | 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 | 30 | rm .hg/branch |
|
31 | 31 | |
|
32 | 32 | echo "% hg log (ascii)" |
|
33 | 33 | hg --encoding ascii log |
|
34 | 34 | echo "% hg log (latin-1)" |
|
35 | 35 | hg --encoding latin-1 log |
|
36 | 36 | echo "% hg log (utf-8)" |
|
37 | 37 | hg --encoding utf-8 log |
|
38 | 38 | echo "% hg tags (ascii)" |
|
39 | 39 | HGENCODING=ascii hg tags |
|
40 | 40 | echo "% hg tags (latin-1)" |
|
41 | 41 | HGENCODING=latin-1 hg tags |
|
42 | 42 | echo "% hg tags (utf-8)" |
|
43 | 43 | HGENCODING=utf-8 hg tags |
|
44 | 44 | echo "% hg branches (ascii)" |
|
45 | 45 | HGENCODING=ascii hg branches |
|
46 | 46 | echo "% hg branches (latin-1)" |
|
47 | 47 | HGENCODING=latin-1 hg branches |
|
48 | 48 | echo "% hg branches (utf-8)" |
|
49 | 49 | HGENCODING=utf-8 hg branches |
|
50 | 50 | |
|
51 | 51 | echo '[ui]' >> .hg/hgrc |
|
52 | 52 | echo 'fallbackencoding = koi8-r' >> .hg/hgrc |
|
53 | 53 | echo "% hg log (utf-8)" |
|
54 | 54 | HGENCODING=utf-8 hg log |
|
55 | 55 | |
|
56 | 56 | echo "% hg log (dolphin)" |
|
57 | 57 | HGENCODING=dolphin hg log |
|
58 | 58 | |
|
59 | 59 | HGENCODING=ascii hg branch `cat latin-1-tag` |
|
60 | 60 | cp latin-1-tag .hg/branch |
|
61 |
HGENCODING=latin-1 hg ci - |
|
|
61 | HGENCODING=latin-1 hg ci -m 'should fail' | |
|
62 | 62 | exit 0 |
@@ -1,127 +1,127 b'' | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | 3 | ######################################## |
|
4 | 4 | |
|
5 | 5 | HGENCODING=utf-8 |
|
6 | 6 | export HGENCODING |
|
7 | 7 | |
|
8 | 8 | hg init t |
|
9 | 9 | cd t |
|
10 | 10 | |
|
11 | 11 | python << EOF |
|
12 | 12 | # (byte, width) = (6, 4) |
|
13 | 13 | s = "\xe7\x9f\xad\xe5\x90\x8d" |
|
14 | 14 | # (byte, width) = (7, 7): odd width is good for alignment test |
|
15 | 15 | m = "MIDDLE_" |
|
16 | 16 | # (byte, width) = (18, 12) |
|
17 | 17 | l = "\xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d" |
|
18 | 18 | |
|
19 | 19 | f = file('s', 'w'); f.write(s); f.close() |
|
20 | 20 | f = file('m', 'w'); f.write(m); f.close() |
|
21 | 21 | f = file('l', 'w'); f.write(l); f.close() |
|
22 | 22 | |
|
23 | 23 | # instant extension to show list of options |
|
24 | 24 | f = file('showoptlist.py', 'w'); f.write("""# encoding: utf-8 |
|
25 | 25 | def showoptlist(ui, repo, *pats, **opts): |
|
26 | 26 | '''dummy command to show option descriptions''' |
|
27 | 27 | return 0 |
|
28 | 28 | |
|
29 | 29 | cmdtable = { |
|
30 | 30 | 'showoptlist': |
|
31 | 31 | (showoptlist, |
|
32 | 32 | [('s', 'opt1', '', 'short width', '""" + s + """'), |
|
33 | 33 | ('m', 'opt2', '', 'middle width', '""" + m + """'), |
|
34 | 34 | ('l', 'opt3', '', 'long width', '""" + l + """') |
|
35 | 35 | ], |
|
36 | 36 | "" |
|
37 | 37 | ) |
|
38 | 38 | } |
|
39 | 39 | """) |
|
40 | 40 | f.close() |
|
41 | 41 | EOF |
|
42 | 42 | |
|
43 | 43 | S=`cat s` |
|
44 | 44 | M=`cat m` |
|
45 | 45 | L=`cat l` |
|
46 | 46 | |
|
47 | 47 | ######################################## |
|
48 | 48 | #### alignment of: |
|
49 | 49 | #### - option descriptions in help |
|
50 | 50 | |
|
51 | 51 | cat <<EOF > .hg/hgrc |
|
52 | 52 | [extensions] |
|
53 | 53 | ja_ext = `pwd`/showoptlist.py |
|
54 | 54 | EOF |
|
55 | 55 | echo '% check alignment of option descriptions in help' |
|
56 | 56 | hg help showoptlist |
|
57 | 57 | |
|
58 | 58 | ######################################## |
|
59 | 59 | #### alignment of: |
|
60 | 60 | #### - user names in annotate |
|
61 | 61 | #### - file names in diffstat |
|
62 | 62 | |
|
63 | 63 | rm -f s; touch s |
|
64 | 64 | rm -f m; touch m |
|
65 | 65 | rm -f l; touch l |
|
66 | 66 | |
|
67 | 67 | #### add files |
|
68 | 68 | |
|
69 | 69 | cp s $S |
|
70 | 70 | hg add $S |
|
71 | 71 | cp m $M |
|
72 | 72 | hg add $M |
|
73 | 73 | cp l $L |
|
74 | 74 | hg add $L |
|
75 | 75 | |
|
76 | 76 | #### commit(1) |
|
77 | 77 | |
|
78 | 78 | echo 'first line(1)' >> s; cp s $S |
|
79 | 79 | echo 'first line(2)' >> m; cp m $M |
|
80 | 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 | 83 | #### commit(2) |
|
84 | 84 | |
|
85 | 85 | echo 'second line(1)' >> s; cp s $S |
|
86 | 86 | echo 'second line(2)' >> m; cp m $M |
|
87 | 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 | 90 | #### commit(3) |
|
91 | 91 | |
|
92 | 92 | echo 'third line(1)' >> s; cp s $S |
|
93 | 93 | echo 'third line(2)' >> m; cp m $M |
|
94 | 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 | 97 | #### check |
|
98 | 98 | |
|
99 | 99 | echo '% check alignment of user names in annotate' |
|
100 | 100 | hg annotate -u $M |
|
101 | 101 | echo '% check alignment of filenames in diffstat' |
|
102 | 102 | hg diff -c tip --stat |
|
103 | 103 | |
|
104 | 104 | ######################################## |
|
105 | 105 | #### alignment of: |
|
106 | 106 | #### - branch names in list |
|
107 | 107 | #### - tag names in list |
|
108 | 108 | |
|
109 | 109 | #### add branches/tags |
|
110 | 110 | |
|
111 | 111 | hg branch $S |
|
112 | hg tag -d "1000000 0" $S | |
|
112 | hg tag $S | |
|
113 | 113 | hg branch $M |
|
114 | hg tag -d "1000000 0" $M | |
|
114 | hg tag $M | |
|
115 | 115 | hg branch $L |
|
116 | hg tag -d "1000000 0" $L | |
|
116 | hg tag $L | |
|
117 | 117 | |
|
118 | 118 | #### check |
|
119 | 119 | |
|
120 | 120 | echo '% check alignment of branches' |
|
121 | 121 | hg tags |
|
122 | 122 | echo '% check alignment of tags' |
|
123 | 123 | hg tags |
|
124 | 124 | |
|
125 | 125 | ######################################## |
|
126 | 126 | |
|
127 | 127 | exit 0 |
@@ -1,34 +1,34 b'' | |||
|
1 | 1 | % check alignment of option descriptions in help |
|
2 | 2 | hg showoptlist |
|
3 | 3 | |
|
4 | 4 | dummy command to show option descriptions |
|
5 | 5 | |
|
6 | 6 | options: |
|
7 | 7 | |
|
8 | 8 | -s --opt1 短名 short width |
|
9 | 9 | -m --opt2 MIDDLE_ middle width |
|
10 | 10 | -l --opt3 長い長い名前 long width |
|
11 | 11 | |
|
12 | 12 | use "hg -v help showoptlist" to show global options |
|
13 | 13 | % check alignment of user names in annotate |
|
14 | 14 | 短名: first line(2) |
|
15 | 15 | MIDDLE_: second line(2) |
|
16 | 16 | 長い長い名前: third line(2) |
|
17 | 17 | % check alignment of filenames in diffstat |
|
18 | 18 | MIDDLE_ | 1 + |
|
19 | 19 | 短名 | 1 + |
|
20 | 20 | 長い長い名前 | 1 + |
|
21 | 21 | 3 files changed, 3 insertions(+), 0 deletions(-) |
|
22 | 22 | marked working directory as branch 短名 |
|
23 | 23 | marked working directory as branch MIDDLE_ |
|
24 | 24 | marked working directory as branch 長い長い名前 |
|
25 | 25 | % check alignment of branches |
|
26 |
tip 5: |
|
|
27 |
長い長い名前 4: |
|
|
28 |
MIDDLE_ 3: |
|
|
29 |
短名 2: |
|
|
26 | tip 5:d745ff46155b | |
|
27 | 長い長い名前 4:9259be597f19 | |
|
28 | MIDDLE_ 3:b06c5b6def9e | |
|
29 | 短名 2:64a70663cee8 | |
|
30 | 30 | % check alignment of tags |
|
31 |
tip 5: |
|
|
32 |
長い長い名前 4: |
|
|
33 |
MIDDLE_ 3: |
|
|
34 |
短名 2: |
|
|
31 | tip 5:d745ff46155b | |
|
32 | 長い長い名前 4:9259be597f19 | |
|
33 | MIDDLE_ 3:b06c5b6def9e | |
|
34 | 短名 2:64a70663cee8 |
@@ -1,174 +1,174 b'' | |||
|
1 | 1 | adding changesets |
|
2 | 2 | adding manifests |
|
3 | 3 | adding file changes |
|
4 | 4 | added 2 changesets with 2 changes to 1 files |
|
5 | 5 | (run 'hg update' to get a working copy) |
|
6 | 6 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
7 | 7 | % should fail with encoding error |
|
8 | 8 | M a |
|
9 | 9 | ? latin-1 |
|
10 | 10 | ? latin-1-tag |
|
11 | 11 | ? utf-8 |
|
12 | 12 | transaction abort! |
|
13 | 13 | rollback completed |
|
14 | 14 | abort: decoding near ' encoded: �': 'ascii' codec can't decode byte 0xe9 in position 20: ordinal not in range(128)! |
|
15 | 15 | % these should work |
|
16 | 16 | marked working directory as branch � |
|
17 | 17 | % hg log (ascii) |
|
18 | changeset: 5:db5520b4645f | |
|
18 | changeset: 5:093c6077d1c8 | |
|
19 | 19 | branch: ? |
|
20 | 20 | tag: tip |
|
21 | 21 | user: test |
|
22 |
date: |
|
|
22 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
23 | 23 | summary: latin1 branch |
|
24 | 24 | |
|
25 |
changeset: 4:9 |
|
|
25 | changeset: 4:94db611b4196 | |
|
26 | 26 | user: test |
|
27 |
date: |
|
|
28 |
summary: Added tag ? for changeset |
|
|
27 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
28 | summary: Added tag ? for changeset ca661e7520de | |
|
29 | 29 | |
|
30 |
changeset: 3: |
|
|
30 | changeset: 3:ca661e7520de | |
|
31 | 31 | tag: ? |
|
32 | 32 | user: test |
|
33 |
date: |
|
|
33 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
34 | 34 | summary: utf-8 e' encoded: ? |
|
35 | 35 | |
|
36 |
changeset: 2: |
|
|
36 | changeset: 2:650c6f3d55dd | |
|
37 | 37 | user: test |
|
38 |
date: |
|
|
38 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
39 | 39 | summary: latin-1 e' encoded: ? |
|
40 | 40 | |
|
41 | 41 | changeset: 1:0e5b7e3f9c4a |
|
42 | 42 | user: test |
|
43 | 43 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
44 | 44 | summary: koi8-r: ????? = u'\u0440\u0442\u0443\u0442\u044c' |
|
45 | 45 | |
|
46 | 46 | changeset: 0:1e78a93102a3 |
|
47 | 47 | user: test |
|
48 | 48 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
49 | 49 | summary: latin-1 e': ? = u'\xe9' |
|
50 | 50 | |
|
51 | 51 | % hg log (latin-1) |
|
52 | changeset: 5:db5520b4645f | |
|
52 | changeset: 5:093c6077d1c8 | |
|
53 | 53 | branch: � |
|
54 | 54 | tag: tip |
|
55 | 55 | user: test |
|
56 |
date: |
|
|
56 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
57 | 57 | summary: latin1 branch |
|
58 | 58 | |
|
59 |
changeset: 4:9 |
|
|
59 | changeset: 4:94db611b4196 | |
|
60 | 60 | user: test |
|
61 |
date: |
|
|
62 |
summary: Added tag � for changeset |
|
|
61 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
62 | summary: Added tag � for changeset ca661e7520de | |
|
63 | 63 | |
|
64 |
changeset: 3: |
|
|
64 | changeset: 3:ca661e7520de | |
|
65 | 65 | tag: � |
|
66 | 66 | user: test |
|
67 |
date: |
|
|
67 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
68 | 68 | summary: utf-8 e' encoded: � |
|
69 | 69 | |
|
70 |
changeset: 2: |
|
|
70 | changeset: 2:650c6f3d55dd | |
|
71 | 71 | user: test |
|
72 |
date: |
|
|
72 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
73 | 73 | summary: latin-1 e' encoded: � |
|
74 | 74 | |
|
75 | 75 | changeset: 1:0e5b7e3f9c4a |
|
76 | 76 | user: test |
|
77 | 77 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
78 | 78 | summary: koi8-r: ����� = u'\u0440\u0442\u0443\u0442\u044c' |
|
79 | 79 | |
|
80 | 80 | changeset: 0:1e78a93102a3 |
|
81 | 81 | user: test |
|
82 | 82 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
83 | 83 | summary: latin-1 e': � = u'\xe9' |
|
84 | 84 | |
|
85 | 85 | % hg log (utf-8) |
|
86 | changeset: 5:db5520b4645f | |
|
86 | changeset: 5:093c6077d1c8 | |
|
87 | 87 | branch: é |
|
88 | 88 | tag: tip |
|
89 | 89 | user: test |
|
90 |
date: |
|
|
90 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
91 | 91 | summary: latin1 branch |
|
92 | 92 | |
|
93 |
changeset: 4:9 |
|
|
93 | changeset: 4:94db611b4196 | |
|
94 | 94 | user: test |
|
95 |
date: |
|
|
96 |
summary: Added tag é for changeset |
|
|
95 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
96 | summary: Added tag é for changeset ca661e7520de | |
|
97 | 97 | |
|
98 |
changeset: 3: |
|
|
98 | changeset: 3:ca661e7520de | |
|
99 | 99 | tag: é |
|
100 | 100 | user: test |
|
101 |
date: |
|
|
101 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
102 | 102 | summary: utf-8 e' encoded: é |
|
103 | 103 | |
|
104 |
changeset: 2: |
|
|
104 | changeset: 2:650c6f3d55dd | |
|
105 | 105 | user: test |
|
106 |
date: |
|
|
106 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
107 | 107 | summary: latin-1 e' encoded: é |
|
108 | 108 | |
|
109 | 109 | changeset: 1:0e5b7e3f9c4a |
|
110 | 110 | user: test |
|
111 | 111 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
112 | 112 | summary: koi8-r: ÒÔÕÔØ = u'\u0440\u0442\u0443\u0442\u044c' |
|
113 | 113 | |
|
114 | 114 | changeset: 0:1e78a93102a3 |
|
115 | 115 | user: test |
|
116 | 116 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
117 | 117 | summary: latin-1 e': é = u'\xe9' |
|
118 | 118 | |
|
119 | 119 | % hg tags (ascii) |
|
120 |
tip 5: |
|
|
121 |
? 3: |
|
|
120 | tip 5:093c6077d1c8 | |
|
121 | ? 3:ca661e7520de | |
|
122 | 122 | % hg tags (latin-1) |
|
123 |
tip 5: |
|
|
124 |
� 3: |
|
|
123 | tip 5:093c6077d1c8 | |
|
124 | � 3:ca661e7520de | |
|
125 | 125 | % hg tags (utf-8) |
|
126 |
tip 5: |
|
|
127 |
é 3: |
|
|
126 | tip 5:093c6077d1c8 | |
|
127 | é 3:ca661e7520de | |
|
128 | 128 | % hg branches (ascii) |
|
129 |
? 5: |
|
|
130 |
default 4:9 |
|
|
129 | ? 5:093c6077d1c8 | |
|
130 | default 4:94db611b4196 (inactive) | |
|
131 | 131 | % hg branches (latin-1) |
|
132 |
� 5: |
|
|
133 |
default 4:9 |
|
|
132 | � 5:093c6077d1c8 | |
|
133 | default 4:94db611b4196 (inactive) | |
|
134 | 134 | % hg branches (utf-8) |
|
135 |
é 5: |
|
|
136 |
default 4:9 |
|
|
135 | é 5:093c6077d1c8 | |
|
136 | default 4:94db611b4196 (inactive) | |
|
137 | 137 | % hg log (utf-8) |
|
138 | changeset: 5:db5520b4645f | |
|
138 | changeset: 5:093c6077d1c8 | |
|
139 | 139 | branch: é |
|
140 | 140 | tag: tip |
|
141 | 141 | user: test |
|
142 |
date: |
|
|
142 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
143 | 143 | summary: latin1 branch |
|
144 | 144 | |
|
145 |
changeset: 4:9 |
|
|
145 | changeset: 4:94db611b4196 | |
|
146 | 146 | user: test |
|
147 |
date: |
|
|
148 |
summary: Added tag é for changeset |
|
|
147 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
148 | summary: Added tag é for changeset ca661e7520de | |
|
149 | 149 | |
|
150 |
changeset: 3: |
|
|
150 | changeset: 3:ca661e7520de | |
|
151 | 151 | tag: é |
|
152 | 152 | user: test |
|
153 |
date: |
|
|
153 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
154 | 154 | summary: utf-8 e' encoded: é |
|
155 | 155 | |
|
156 |
changeset: 2: |
|
|
156 | changeset: 2:650c6f3d55dd | |
|
157 | 157 | user: test |
|
158 |
date: |
|
|
158 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
159 | 159 | summary: latin-1 e' encoded: é |
|
160 | 160 | |
|
161 | 161 | changeset: 1:0e5b7e3f9c4a |
|
162 | 162 | user: test |
|
163 | 163 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
164 | 164 | summary: koi8-r: ртуть = u'\u0440\u0442\u0443\u0442\u044c' |
|
165 | 165 | |
|
166 | 166 | changeset: 0:1e78a93102a3 |
|
167 | 167 | user: test |
|
168 | 168 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
169 | 169 | summary: latin-1 e': И = u'\xe9' |
|
170 | 170 | |
|
171 | 171 | % hg log (dolphin) |
|
172 | 172 | abort: unknown encoding: dolphin, please check your locale settings |
|
173 | 173 | abort: decoding near '�': 'ascii' codec can't decode byte 0xe9 in position 0: ordinal not in range(128)! |
|
174 | 174 | abort: branch name not in UTF-8! |
@@ -1,101 +1,101 b'' | |||
|
1 | 1 | $ hg init |
|
2 | 2 | |
|
3 | 3 | $ echo foo > a |
|
4 | 4 | $ echo foo > b |
|
5 | 5 | $ hg add a b |
|
6 | 6 | |
|
7 |
$ hg ci -m "test" |
|
|
7 | $ hg ci -m "test" | |
|
8 | 8 | |
|
9 | 9 | $ echo blah > a |
|
10 | 10 | |
|
11 |
$ hg ci -m "branch a" |
|
|
11 | $ hg ci -m "branch a" | |
|
12 | 12 | |
|
13 | 13 | $ hg co 0 |
|
14 | 14 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
15 | 15 | |
|
16 | 16 | $ echo blah > b |
|
17 | 17 | |
|
18 |
$ hg ci -m "branch b" |
|
|
18 | $ hg ci -m "branch b" | |
|
19 | 19 | created new head |
|
20 | 20 | $ HGMERGE=true hg merge 1 |
|
21 | 21 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
22 | 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 | 26 | $ hg co 1 |
|
27 | 27 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
28 | 28 | $ HGMERGE=true hg merge 2 |
|
29 | 29 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
30 | 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 | 32 | created new head |
|
33 | 33 | |
|
34 | 34 | $ hg log |
|
35 |
changeset: 4: |
|
|
35 | changeset: 4:2ee31f665a86 | |
|
36 | 36 | tag: tip |
|
37 |
parent: 1: |
|
|
38 |
parent: 2: |
|
|
37 | parent: 1:96155394af80 | |
|
38 | parent: 2:92cc4c306b19 | |
|
39 | 39 | user: test |
|
40 |
date: |
|
|
40 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
41 | 41 | summary: merge a/b -> blah |
|
42 | 42 | |
|
43 |
changeset: 3: |
|
|
44 |
parent: 2: |
|
|
45 |
parent: 1: |
|
|
43 | changeset: 3:e16a66a37edd | |
|
44 | parent: 2:92cc4c306b19 | |
|
45 | parent: 1:96155394af80 | |
|
46 | 46 | user: test |
|
47 |
date: |
|
|
47 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
48 | 48 | summary: merge b/a -> blah |
|
49 | 49 | |
|
50 |
changeset: 2: |
|
|
51 |
parent: 0: |
|
|
50 | changeset: 2:92cc4c306b19 | |
|
51 | parent: 0:5e0375449e74 | |
|
52 | 52 | user: test |
|
53 |
date: |
|
|
53 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
54 | 54 | summary: branch b |
|
55 | 55 | |
|
56 |
changeset: 1: |
|
|
56 | changeset: 1:96155394af80 | |
|
57 | 57 | user: test |
|
58 |
date: |
|
|
58 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
59 | 59 | summary: branch a |
|
60 | 60 | |
|
61 |
changeset: 0: |
|
|
61 | changeset: 0:5e0375449e74 | |
|
62 | 62 | user: test |
|
63 |
date: |
|
|
63 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
64 | 64 | summary: test |
|
65 | 65 | |
|
66 | 66 | $ hg debugindex .hg/store/00changelog.i |
|
67 | 67 | rev offset length base linkrev nodeid p1 p2 |
|
68 |
0 0 6 |
|
|
69 |
1 6 |
|
|
70 |
2 1 |
|
|
71 | 3 200 75 3 3 13d875a22764 7c5dc2e857f2 448a8c5e42f1 | |
|
72 |
4 2 |
|
|
68 | 0 0 60 0 0 5e0375449e74 000000000000 000000000000 | |
|
69 | 1 60 62 1 1 96155394af80 5e0375449e74 000000000000 | |
|
70 | 2 122 62 2 2 92cc4c306b19 5e0375449e74 000000000000 | |
|
71 | 3 184 69 3 3 e16a66a37edd 92cc4c306b19 96155394af80 | |
|
72 | 4 253 29 3 4 2ee31f665a86 96155394af80 92cc4c306b19 | |
|
73 | 73 | |
|
74 | 74 | revision 1 |
|
75 | 75 | $ hg manifest --debug 1 |
|
76 | 76 | 79d7492df40aa0fa093ec4209be78043c181f094 644 a |
|
77 | 77 | 2ed2a3912a0b24502043eae84ee4b279c18b90dd 644 b |
|
78 | 78 | revision 2 |
|
79 | 79 | $ hg manifest --debug 2 |
|
80 | 80 | 2ed2a3912a0b24502043eae84ee4b279c18b90dd 644 a |
|
81 | 81 | 79d7492df40aa0fa093ec4209be78043c181f094 644 b |
|
82 | 82 | revision 3 |
|
83 | 83 | $ hg manifest --debug 3 |
|
84 | 84 | 79d7492df40aa0fa093ec4209be78043c181f094 644 a |
|
85 | 85 | 79d7492df40aa0fa093ec4209be78043c181f094 644 b |
|
86 | 86 | revision 4 |
|
87 | 87 | $ hg manifest --debug 4 |
|
88 | 88 | 79d7492df40aa0fa093ec4209be78043c181f094 644 a |
|
89 | 89 | 79d7492df40aa0fa093ec4209be78043c181f094 644 b |
|
90 | 90 | |
|
91 | 91 | $ hg debugindex .hg/store/data/a.i |
|
92 | 92 | rev offset length base linkrev nodeid p1 p2 |
|
93 | 93 | 0 0 5 0 0 2ed2a3912a0b 000000000000 000000000000 |
|
94 | 94 | 1 5 6 1 1 79d7492df40a 2ed2a3912a0b 000000000000 |
|
95 | 95 | |
|
96 | 96 | $ hg verify |
|
97 | 97 | checking changesets |
|
98 | 98 | checking manifests |
|
99 | 99 | crosschecking files in changesets and manifests |
|
100 | 100 | checking files |
|
101 | 101 | 2 files, 5 changesets, 4 total revisions |
@@ -1,79 +1,79 b'' | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | 3 | # This test makes sure that we don't mark a file as merged with its ancestor |
|
4 | 4 | # when we do a merge. |
|
5 | 5 | |
|
6 | 6 | cat <<EOF > merge |
|
7 | 7 | import sys, os |
|
8 | 8 | print "merging for", os.path.basename(sys.argv[1]) |
|
9 | 9 | EOF |
|
10 | 10 | HGMERGE="python ../merge"; export HGMERGE |
|
11 | 11 | |
|
12 | 12 | echo creating base |
|
13 | 13 | hg init a |
|
14 | 14 | cd a |
|
15 | 15 | echo 1 > foo |
|
16 | 16 | echo 1 > bar |
|
17 | 17 | echo 1 > baz |
|
18 | 18 | echo 1 > quux |
|
19 | 19 | hg add foo bar baz quux |
|
20 |
hg commit -m "base" |
|
|
20 | hg commit -m "base" | |
|
21 | 21 | |
|
22 | 22 | cd .. |
|
23 | 23 | hg clone a b |
|
24 | 24 | |
|
25 | 25 | echo creating branch a |
|
26 | 26 | cd a |
|
27 | 27 | echo 2a > foo |
|
28 | 28 | echo 2a > bar |
|
29 |
hg commit -m "branch a" |
|
|
29 | hg commit -m "branch a" | |
|
30 | 30 | |
|
31 | 31 | echo creating branch b |
|
32 | 32 | |
|
33 | 33 | cd .. |
|
34 | 34 | cd b |
|
35 | 35 | echo 2b > foo |
|
36 | 36 | echo 2b > baz |
|
37 |
hg commit -m "branch b" |
|
|
37 | hg commit -m "branch b" | |
|
38 | 38 | |
|
39 | 39 | echo "we shouldn't have anything but n state here" |
|
40 | 40 | hg debugstate --nodates | grep -v "^n" |
|
41 | 41 | |
|
42 | 42 | echo merging |
|
43 | 43 | hg pull ../a |
|
44 | 44 | hg merge -v |
|
45 | 45 | |
|
46 | 46 | echo 2m > foo |
|
47 | 47 | echo 2b > baz |
|
48 | 48 | echo new > quux |
|
49 | 49 | |
|
50 | 50 | echo "we shouldn't have anything but foo in merge state here" |
|
51 | 51 | hg debugstate --nodates | grep "^m" |
|
52 | 52 | |
|
53 |
hg ci -m "merge" |
|
|
53 | hg ci -m "merge" | |
|
54 | 54 | |
|
55 | 55 | echo "main: we should have a merge here" |
|
56 | 56 | hg debugindex .hg/store/00changelog.i |
|
57 | 57 | |
|
58 | 58 | echo "log should show foo and quux changed" |
|
59 | 59 | hg log -v -r tip |
|
60 | 60 | |
|
61 | 61 | echo "foo: we should have a merge here" |
|
62 | 62 | hg debugindex .hg/store/data/foo.i |
|
63 | 63 | |
|
64 | 64 | echo "bar: we shouldn't have a merge here" |
|
65 | 65 | hg debugindex .hg/store/data/bar.i |
|
66 | 66 | |
|
67 | 67 | echo "baz: we shouldn't have a merge here" |
|
68 | 68 | hg debugindex .hg/store/data/baz.i |
|
69 | 69 | |
|
70 | 70 | echo "quux: we shouldn't have a merge here" |
|
71 | 71 | hg debugindex .hg/store/data/quux.i |
|
72 | 72 | |
|
73 | 73 | echo "manifest entries should match tips of all files" |
|
74 | 74 | hg manifest --debug |
|
75 | 75 | |
|
76 | 76 | echo "everything should be clean now" |
|
77 | 77 | hg status |
|
78 | 78 | |
|
79 | 79 | hg verify |
@@ -1,69 +1,69 b'' | |||
|
1 | 1 | creating base |
|
2 | 2 | updating to branch default |
|
3 | 3 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
4 | 4 | creating branch a |
|
5 | 5 | creating branch b |
|
6 | 6 | we shouldn't have anything but n state here |
|
7 | 7 | merging |
|
8 | 8 | pulling from ../a |
|
9 | 9 | searching for changes |
|
10 | 10 | adding changesets |
|
11 | 11 | adding manifests |
|
12 | 12 | adding file changes |
|
13 | 13 | added 1 changesets with 2 changes to 2 files (+1 heads) |
|
14 | 14 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
15 | 15 | merging for foo |
|
16 | 16 | resolving manifests |
|
17 | 17 | getting bar |
|
18 | 18 | merging foo |
|
19 | 19 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
20 | 20 | (branch merge, don't forget to commit) |
|
21 | 21 | we shouldn't have anything but foo in merge state here |
|
22 | 22 | m 644 3 foo |
|
23 | 23 | main: we should have a merge here |
|
24 | 24 | rev offset length base linkrev nodeid p1 p2 |
|
25 |
0 0 7 |
|
|
26 |
1 7 |
|
|
27 |
2 1 |
|
|
28 | 3 221 72 3 3 0c2cc6fc80e2 182b283965f1 a6aef98656b7 | |
|
25 | 0 0 73 0 0 cdca01651b96 000000000000 000000000000 | |
|
26 | 1 73 68 1 1 f6718a9cb7f3 cdca01651b96 000000000000 | |
|
27 | 2 141 68 2 2 bdd988058d16 cdca01651b96 000000000000 | |
|
28 | 3 209 66 3 3 d8a521142a3c f6718a9cb7f3 bdd988058d16 | |
|
29 | 29 | log should show foo and quux changed |
|
30 | changeset: 3:0c2cc6fc80e2 | |
|
30 | changeset: 3:d8a521142a3c | |
|
31 | 31 | tag: tip |
|
32 |
parent: 1: |
|
|
33 |
parent: 2: |
|
|
32 | parent: 1:f6718a9cb7f3 | |
|
33 | parent: 2:bdd988058d16 | |
|
34 | 34 | user: test |
|
35 |
date: |
|
|
35 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
36 | 36 | files: foo quux |
|
37 | 37 | description: |
|
38 | 38 | merge |
|
39 | 39 | |
|
40 | 40 | |
|
41 | 41 | foo: we should have a merge here |
|
42 | 42 | rev offset length base linkrev nodeid p1 p2 |
|
43 | 43 | 0 0 3 0 0 b8e02f643373 000000000000 000000000000 |
|
44 | 44 | 1 3 4 1 1 2ffeddde1b65 b8e02f643373 000000000000 |
|
45 | 45 | 2 7 4 2 2 33d1fb69067a b8e02f643373 000000000000 |
|
46 | 46 | 3 11 4 3 3 aa27919ee430 2ffeddde1b65 33d1fb69067a |
|
47 | 47 | bar: we shouldn't have a merge here |
|
48 | 48 | rev offset length base linkrev nodeid p1 p2 |
|
49 | 49 | 0 0 3 0 0 b8e02f643373 000000000000 000000000000 |
|
50 | 50 | 1 3 4 1 2 33d1fb69067a b8e02f643373 000000000000 |
|
51 | 51 | baz: we shouldn't have a merge here |
|
52 | 52 | rev offset length base linkrev nodeid p1 p2 |
|
53 | 53 | 0 0 3 0 0 b8e02f643373 000000000000 000000000000 |
|
54 | 54 | 1 3 4 1 1 2ffeddde1b65 b8e02f643373 000000000000 |
|
55 | 55 | quux: we shouldn't have a merge here |
|
56 | 56 | rev offset length base linkrev nodeid p1 p2 |
|
57 | 57 | 0 0 3 0 0 b8e02f643373 000000000000 000000000000 |
|
58 | 58 | 1 3 5 1 3 6128c0f33108 b8e02f643373 000000000000 |
|
59 | 59 | manifest entries should match tips of all files |
|
60 | 60 | 33d1fb69067a0139622a3fa3b7ba1cdb1367972e 644 bar |
|
61 | 61 | 2ffeddde1b65b4827f6746174a145474129fa2ce 644 baz |
|
62 | 62 | aa27919ee4303cfd575e1fb932dd64d75aa08be4 644 foo |
|
63 | 63 | 6128c0f33108e8cfbb4e0824d13ae48b466d7280 644 quux |
|
64 | 64 | everything should be clean now |
|
65 | 65 | checking changesets |
|
66 | 66 | checking manifests |
|
67 | 67 | crosschecking files in changesets and manifests |
|
68 | 68 | checking files |
|
69 | 69 | 4 files, 4 changesets, 10 total revisions |
@@ -1,149 +1,149 b'' | |||
|
1 | 1 | $ umask 027 |
|
2 | 2 | $ mkdir test1 |
|
3 | 3 | $ cd test1 |
|
4 | 4 | |
|
5 | 5 | $ hg init |
|
6 | 6 | $ touch a b |
|
7 | 7 | $ hg add a b |
|
8 |
$ hg ci -m "added a b" |
|
|
8 | $ hg ci -m "added a b" | |
|
9 | 9 | |
|
10 | 10 | $ cd .. |
|
11 | 11 | $ hg clone test1 test3 |
|
12 | 12 | updating to branch default |
|
13 | 13 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
14 | 14 | $ mkdir test2 |
|
15 | 15 | $ cd test2 |
|
16 | 16 | |
|
17 | 17 | $ hg init |
|
18 | 18 | $ hg pull ../test1 |
|
19 | 19 | pulling from ../test1 |
|
20 | 20 | requesting all changes |
|
21 | 21 | adding changesets |
|
22 | 22 | adding manifests |
|
23 | 23 | adding file changes |
|
24 | 24 | added 1 changesets with 2 changes to 2 files |
|
25 | 25 | (run 'hg update' to get a working copy) |
|
26 | 26 | $ hg co |
|
27 | 27 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
28 | 28 | $ chmod +x a |
|
29 |
$ hg ci -m "chmod +x a" |
|
|
29 | $ hg ci -m "chmod +x a" | |
|
30 | 30 | |
|
31 | 31 | the changelog should mention file a: |
|
32 | 32 | |
|
33 | 33 | $ hg tip --template '{files}\n' |
|
34 | 34 | a |
|
35 | 35 | |
|
36 | 36 | $ cd ../test1 |
|
37 | 37 | $ echo 123 >>a |
|
38 |
$ hg ci -m "a updated" |
|
|
38 | $ hg ci -m "a updated" | |
|
39 | 39 | |
|
40 | 40 | $ hg pull ../test2 |
|
41 | 41 | pulling from ../test2 |
|
42 | 42 | searching for changes |
|
43 | 43 | adding changesets |
|
44 | 44 | adding manifests |
|
45 | 45 | adding file changes |
|
46 | 46 | added 1 changesets with 0 changes to 0 files (+1 heads) |
|
47 | 47 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
48 | 48 | $ hg heads |
|
49 |
changeset: 2: |
|
|
49 | changeset: 2:7f4313b42a34 | |
|
50 | 50 | tag: tip |
|
51 |
parent: 0: |
|
|
51 | parent: 0:22a449e20da5 | |
|
52 | 52 | user: test |
|
53 |
date: |
|
|
53 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
54 | 54 | summary: chmod +x a |
|
55 | 55 | |
|
56 |
changeset: 1: |
|
|
56 | changeset: 1:c6ecefc45368 | |
|
57 | 57 | user: test |
|
58 |
date: |
|
|
58 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
59 | 59 | summary: a updated |
|
60 | 60 | |
|
61 | 61 | $ hg history |
|
62 |
changeset: 2: |
|
|
62 | changeset: 2:7f4313b42a34 | |
|
63 | 63 | tag: tip |
|
64 |
parent: 0: |
|
|
64 | parent: 0:22a449e20da5 | |
|
65 | 65 | user: test |
|
66 |
date: |
|
|
66 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
67 | 67 | summary: chmod +x a |
|
68 | 68 | |
|
69 |
changeset: 1: |
|
|
69 | changeset: 1:c6ecefc45368 | |
|
70 | 70 | user: test |
|
71 |
date: |
|
|
71 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
72 | 72 | summary: a updated |
|
73 | 73 | |
|
74 |
changeset: 0: |
|
|
74 | changeset: 0:22a449e20da5 | |
|
75 | 75 | user: test |
|
76 |
date: |
|
|
76 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
77 | 77 | summary: added a b |
|
78 | 78 | |
|
79 | 79 | |
|
80 | 80 | $ hg -v merge |
|
81 | 81 | resolving manifests |
|
82 | 82 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
83 | 83 | (branch merge, don't forget to commit) |
|
84 | 84 | |
|
85 | 85 | $ cd ../test3 |
|
86 | 86 | $ echo 123 >>b |
|
87 |
$ hg ci -m "b updated" |
|
|
87 | $ hg ci -m "b updated" | |
|
88 | 88 | |
|
89 | 89 | $ hg pull ../test2 |
|
90 | 90 | pulling from ../test2 |
|
91 | 91 | searching for changes |
|
92 | 92 | adding changesets |
|
93 | 93 | adding manifests |
|
94 | 94 | adding file changes |
|
95 | 95 | added 1 changesets with 0 changes to 0 files (+1 heads) |
|
96 | 96 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
97 | 97 | $ hg heads |
|
98 |
changeset: 2: |
|
|
98 | changeset: 2:7f4313b42a34 | |
|
99 | 99 | tag: tip |
|
100 |
parent: 0: |
|
|
100 | parent: 0:22a449e20da5 | |
|
101 | 101 | user: test |
|
102 |
date: |
|
|
102 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
103 | 103 | summary: chmod +x a |
|
104 | 104 | |
|
105 |
changeset: 1:d |
|
|
105 | changeset: 1:dc57ead75f79 | |
|
106 | 106 | user: test |
|
107 |
date: |
|
|
107 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
108 | 108 | summary: b updated |
|
109 | 109 | |
|
110 | 110 | $ hg history |
|
111 |
changeset: 2: |
|
|
111 | changeset: 2:7f4313b42a34 | |
|
112 | 112 | tag: tip |
|
113 |
parent: 0: |
|
|
113 | parent: 0:22a449e20da5 | |
|
114 | 114 | user: test |
|
115 |
date: |
|
|
115 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
116 | 116 | summary: chmod +x a |
|
117 | 117 | |
|
118 |
changeset: 1:d |
|
|
118 | changeset: 1:dc57ead75f79 | |
|
119 | 119 | user: test |
|
120 |
date: |
|
|
120 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
121 | 121 | summary: b updated |
|
122 | 122 | |
|
123 |
changeset: 0: |
|
|
123 | changeset: 0:22a449e20da5 | |
|
124 | 124 | user: test |
|
125 |
date: |
|
|
125 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
126 | 126 | summary: added a b |
|
127 | 127 | |
|
128 | 128 | |
|
129 | 129 | $ hg -v merge |
|
130 | 130 | resolving manifests |
|
131 | 131 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
132 | 132 | (branch merge, don't forget to commit) |
|
133 | 133 | |
|
134 | 134 | $ ls -l ../test[123]/a > foo |
|
135 | 135 | $ cut -b 1-10 < foo |
|
136 | 136 | -rwxr-x--- |
|
137 | 137 | -rwxr-x--- |
|
138 | 138 | -rwxr-x--- |
|
139 | 139 | |
|
140 | 140 | $ hg debugindex .hg/store/data/a.i |
|
141 | 141 | rev offset length base linkrev nodeid p1 p2 |
|
142 | 142 | 0 0 0 0 0 b80de5d13875 000000000000 000000000000 |
|
143 | 143 | $ hg debugindex ../test2/.hg/store/data/a.i |
|
144 | 144 | rev offset length base linkrev nodeid p1 p2 |
|
145 | 145 | 0 0 0 0 0 b80de5d13875 000000000000 000000000000 |
|
146 | 146 | $ hg debugindex ../test1/.hg/store/data/a.i |
|
147 | 147 | rev offset length base linkrev nodeid p1 p2 |
|
148 | 148 | 0 0 0 0 0 b80de5d13875 000000000000 000000000000 |
|
149 | 149 | 1 0 5 1 1 7fe919cc0336 b80de5d13875 000000000000 |
@@ -1,465 +1,465 b'' | |||
|
1 | 1 | $ cp "$TESTDIR"/printenv.py . |
|
2 | 2 | |
|
3 | 3 | # commit hooks can see env vars |
|
4 | 4 | |
|
5 | 5 | $ hg init a |
|
6 | 6 | $ cd a |
|
7 | 7 | $ echo "[hooks]" > .hg/hgrc |
|
8 | 8 | $ echo 'commit = unset HG_LOCAL HG_TAG; python ../printenv.py commit' >> .hg/hgrc |
|
9 | 9 | $ echo 'commit.b = unset HG_LOCAL HG_TAG; python ../printenv.py commit.b' >> .hg/hgrc |
|
10 | 10 | $ echo 'precommit = unset HG_LOCAL HG_NODE HG_TAG; python ../printenv.py precommit' >> .hg/hgrc |
|
11 | 11 | $ echo 'pretxncommit = unset HG_LOCAL HG_TAG; python ../printenv.py pretxncommit' >> .hg/hgrc |
|
12 | 12 | $ echo 'pretxncommit.tip = hg -q tip' >> .hg/hgrc |
|
13 | 13 | $ echo 'pre-identify = python ../printenv.py pre-identify 1' >> .hg/hgrc |
|
14 | 14 | $ echo 'pre-cat = python ../printenv.py pre-cat' >> .hg/hgrc |
|
15 | 15 | $ echo 'post-cat = python ../printenv.py post-cat' >> .hg/hgrc |
|
16 | 16 | $ echo a > a |
|
17 | 17 | $ hg add a |
|
18 |
$ hg commit -m a |
|
|
18 | $ hg commit -m a | |
|
19 | 19 | precommit hook: HG_PARENT1=0000000000000000000000000000000000000000 |
|
20 |
pretxncommit hook: HG_NODE= |
|
|
21 | 0:29b62aeb769f | |
|
22 |
commit hook: HG_NODE= |
|
|
23 |
commit.b hook: HG_NODE= |
|
|
20 | pretxncommit hook: HG_NODE=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b HG_PARENT1=0000000000000000000000000000000000000000 HG_PENDING=$HGTMP/test-hook.t/a | |
|
21 | 0:cb9a9f314b8b | |
|
22 | commit hook: HG_NODE=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b HG_PARENT1=0000000000000000000000000000000000000000 | |
|
23 | commit.b hook: HG_NODE=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b HG_PARENT1=0000000000000000000000000000000000000000 | |
|
24 | 24 | |
|
25 | 25 | $ hg clone . ../b |
|
26 | 26 | updating to branch default |
|
27 | 27 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
28 | 28 | $ cd ../b |
|
29 | 29 | |
|
30 | 30 | # changegroup hooks can see env vars |
|
31 | 31 | |
|
32 | 32 | $ echo '[hooks]' > .hg/hgrc |
|
33 | 33 | $ echo 'prechangegroup = python ../printenv.py prechangegroup' >> .hg/hgrc |
|
34 | 34 | $ echo 'changegroup = python ../printenv.py changegroup' >> .hg/hgrc |
|
35 | 35 | $ echo 'incoming = python ../printenv.py incoming' >> .hg/hgrc |
|
36 | 36 | |
|
37 | 37 | # pretxncommit and commit hooks can see both parents of merge |
|
38 | 38 | |
|
39 | 39 | $ cd ../a |
|
40 | 40 | $ echo b >> a |
|
41 | 41 | $ hg commit -m a1 -d "1 0" |
|
42 |
precommit hook: HG_PARENT1= |
|
|
43 |
pretxncommit hook: HG_NODE= |
|
|
44 | 1:b702efe96888 | |
|
45 | commit hook: HG_NODE=b702efe9688826e3a91283852b328b84dbf37bc2 HG_PARENT1=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b | |
|
46 | commit.b hook: HG_NODE=b702efe9688826e3a91283852b328b84dbf37bc2 HG_PARENT1=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b | |
|
42 | precommit hook: HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b | |
|
43 | pretxncommit hook: HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b HG_PENDING=$HGTMP/test-hook.t/a | |
|
44 | 1:ab228980c14d | |
|
45 | commit hook: HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b | |
|
46 | commit.b hook: HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b | |
|
47 | 47 | $ hg update -C 0 |
|
48 | 48 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
49 | 49 | $ echo b > b |
|
50 | 50 | $ hg add b |
|
51 | 51 | $ hg commit -m b -d '1 0' |
|
52 |
precommit hook: HG_PARENT1= |
|
|
53 |
pretxncommit hook: HG_NODE= |
|
|
54 | 2:1324a5531bac | |
|
55 | commit hook: HG_NODE=1324a5531bac09b329c3845d35ae6a7526874edb HG_PARENT1=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b | |
|
56 | commit.b hook: HG_NODE=1324a5531bac09b329c3845d35ae6a7526874edb HG_PARENT1=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b | |
|
52 | precommit hook: HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b | |
|
53 | pretxncommit hook: HG_NODE=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b HG_PENDING=$HGTMP/test-hook.t/a | |
|
54 | 2:ee9deb46ab31 | |
|
55 | commit hook: HG_NODE=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b | |
|
56 | commit.b hook: HG_NODE=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b | |
|
57 | 57 | created new head |
|
58 | 58 |
$ |
|
59 | 59 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
60 | 60 | (branch merge, don't forget to commit) |
|
61 | 61 | $ hg commit -m merge -d '2 0' |
|
62 | precommit hook: HG_PARENT1=1324a5531bac09b329c3845d35ae6a7526874edb HG_PARENT2=b702efe9688826e3a91283852b328b84dbf37bc2 | |
|
63 | pretxncommit hook: HG_NODE=4c52fb2e402287dd5dc052090682536c8406c321 HG_PARENT1=1324a5531bac09b329c3845d35ae6a7526874edb HG_PARENT2=b702efe9688826e3a91283852b328b84dbf37bc2 HG_PENDING=$HGTMP/test-hook.t/a | |
|
64 | 3:4c52fb2e4022 | |
|
65 | commit hook: HG_NODE=4c52fb2e402287dd5dc052090682536c8406c321 HG_PARENT1=1324a5531bac09b329c3845d35ae6a7526874edb HG_PARENT2=b702efe9688826e3a91283852b328b84dbf37bc2 | |
|
66 | commit.b hook: HG_NODE=4c52fb2e402287dd5dc052090682536c8406c321 HG_PARENT1=1324a5531bac09b329c3845d35ae6a7526874edb HG_PARENT2=b702efe9688826e3a91283852b328b84dbf37bc2 | |
|
62 | precommit hook: HG_PARENT1=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT2=ab228980c14deea8b9555d91c9581127383e40fd | |
|
63 | pretxncommit hook: HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_PARENT1=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT2=ab228980c14deea8b9555d91c9581127383e40fd HG_PENDING=$HGTMP/test-hook.t/a | |
|
64 | 3:07f3376c1e65 | |
|
65 | commit hook: HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_PARENT1=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT2=ab228980c14deea8b9555d91c9581127383e40fd | |
|
66 | commit.b hook: HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_PARENT1=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT2=ab228980c14deea8b9555d91c9581127383e40fd | |
|
67 | 67 | |
|
68 | 68 | # test generic hooks |
|
69 | 69 | |
|
70 | 70 | $ hg id |
|
71 | 71 | pre-identify hook: HG_ARGS=id HG_OPTS={'tags': None, 'rev': '', 'num': None, 'branch': None, 'id': None} HG_PATS=[] |
|
72 | 72 | warning: pre-identify hook exited with status 1 |
|
73 | 73 | $ hg cat b |
|
74 | 74 | pre-cat hook: HG_ARGS=cat b HG_OPTS={'rev': '', 'decode': None, 'exclude': [], 'output': '', 'include': []} HG_PATS=['b'] |
|
75 | 75 | post-cat hook: HG_ARGS=cat b HG_OPTS={'rev': '', 'decode': None, 'exclude': [], 'output': '', 'include': []} HG_PATS=['b'] HG_RESULT=0 |
|
76 | 76 | b |
|
77 | 77 | |
|
78 | 78 | $ cd ../b |
|
79 | 79 | $ hg pull ../a |
|
80 | 80 | prechangegroup hook: HG_SOURCE=pull HG_URL=file: |
|
81 |
changegroup hook: HG_NODE= |
|
|
82 |
incoming hook: HG_NODE= |
|
|
83 |
incoming hook: HG_NODE= |
|
|
84 |
incoming hook: HG_NODE= |
|
|
81 | changegroup hook: HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_SOURCE=pull HG_URL=file: | |
|
82 | incoming hook: HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_SOURCE=pull HG_URL=file: | |
|
83 | incoming hook: HG_NODE=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_SOURCE=pull HG_URL=file: | |
|
84 | incoming hook: HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_SOURCE=pull HG_URL=file: | |
|
85 | 85 | pulling from ../a |
|
86 | 86 | searching for changes |
|
87 | 87 | adding changesets |
|
88 | 88 | adding manifests |
|
89 | 89 | adding file changes |
|
90 | 90 | added 3 changesets with 2 changes to 2 files |
|
91 | 91 | (run 'hg update' to get a working copy) |
|
92 | 92 | |
|
93 | 93 | # tag hooks can see env vars |
|
94 | 94 | |
|
95 | 95 | $ cd ../a |
|
96 | 96 | $ echo 'pretag = python ../printenv.py pretag' >> .hg/hgrc |
|
97 | 97 |
$ echo 'tag = unset HG_PARENT1 HG_PARENT2; |
|
98 | 98 | $ hg tag -d '3 0' a |
|
99 | pretag hook: HG_LOCAL=0 HG_NODE=4c52fb2e402287dd5dc052090682536c8406c321 HG_TAG=a | |
|
100 | precommit hook: HG_PARENT1=4c52fb2e402287dd5dc052090682536c8406c321 | |
|
101 | pretxncommit hook: HG_NODE=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_PARENT1=4c52fb2e402287dd5dc052090682536c8406c321 HG_PENDING=$HGTMP/test-hook.t/a | |
|
102 | 4:8ea2ef7ad3e8 | |
|
103 | commit hook: HG_NODE=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_PARENT1=4c52fb2e402287dd5dc052090682536c8406c321 | |
|
104 | commit.b hook: HG_NODE=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_PARENT1=4c52fb2e402287dd5dc052090682536c8406c321 | |
|
105 | tag 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=07f3376c1e655977439df2a814e3cc14b27abac2 | |
|
101 | pretxncommit hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PARENT1=07f3376c1e655977439df2a814e3cc14b27abac2 HG_PENDING=$HGTMP/test-hook.t/a | |
|
102 | 4:539e4b31b6dc | |
|
103 | commit hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PARENT1=07f3376c1e655977439df2a814e3cc14b27abac2 | |
|
104 | commit.b hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PARENT1=07f3376c1e655977439df2a814e3cc14b27abac2 | |
|
105 | tag hook: HG_LOCAL=0 HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_TAG=a | |
|
106 | 106 | $ hg tag -l la |
|
107 |
pretag hook: HG_LOCAL=1 HG_NODE= |
|
|
108 |
tag 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=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=la | |
|
109 | 109 | |
|
110 | 110 | # pretag hook can forbid tagging |
|
111 | 111 | |
|
112 | 112 | $ echo 'pretag.forbid = python ../printenv.py pretag.forbid 1' >> .hg/hgrc |
|
113 | 113 | $ hg tag -d '4 0' fa |
|
114 |
pretag hook: HG_LOCAL=0 HG_NODE= |
|
|
115 |
pretag.forbid 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=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=fa | |
|
116 | 116 | abort: pretag.forbid hook exited with status 1 |
|
117 | 117 | $ hg tag -l fla |
|
118 |
pretag hook: HG_LOCAL=1 HG_NODE= |
|
|
119 |
pretag.forbid 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=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=fla | |
|
120 | 120 | abort: pretag.forbid hook exited with status 1 |
|
121 | 121 | |
|
122 | 122 | # pretxncommit hook can see changeset, can roll back txn, changeset |
|
123 | 123 | # no more there after |
|
124 | 124 | |
|
125 | 125 | $ echo 'pretxncommit.forbid0 = hg tip -q' >> .hg/hgrc |
|
126 | 126 | $ echo 'pretxncommit.forbid1 = python ../printenv.py pretxncommit.forbid 1' >> .hg/hgrc |
|
127 | 127 | $ echo z > z |
|
128 | 128 | $ hg add z |
|
129 | 129 | $ hg -q tip |
|
130 | 4:8ea2ef7ad3e8 | |
|
130 | 4:539e4b31b6dc | |
|
131 | 131 | $ hg commit -m 'fail' -d '4 0' |
|
132 | precommit hook: HG_PARENT1=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 | |
|
133 |
pretxncommit hook: HG_NODE= |
|
|
134 | 5:fad284daf8c0 | |
|
135 | 5:fad284daf8c0 | |
|
136 |
pretxncommit.forbid hook: HG_NODE= |
|
|
132 | precommit hook: HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 | |
|
133 | pretxncommit hook: HG_NODE=6f611f8018c10e827fee6bd2bc807f937e761567 HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PENDING=$HGTMP/test-hook.t/a | |
|
134 | 5:6f611f8018c1 | |
|
135 | 5:6f611f8018c1 | |
|
136 | pretxncommit.forbid hook: HG_NODE=6f611f8018c10e827fee6bd2bc807f937e761567 HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PENDING=$HGTMP/test-hook.t/a | |
|
137 | 137 | transaction abort! |
|
138 | 138 | rollback completed |
|
139 | 139 | abort: pretxncommit.forbid1 hook exited with status 1 |
|
140 | 140 | $ hg -q tip |
|
141 | 4:8ea2ef7ad3e8 | |
|
141 | 4:539e4b31b6dc | |
|
142 | 142 | |
|
143 | 143 | # precommit hook can prevent commit |
|
144 | 144 | |
|
145 | 145 | $ echo 'precommit.forbid = python ../printenv.py precommit.forbid 1' >> .hg/hgrc |
|
146 | 146 | $ hg commit -m 'fail' -d '4 0' |
|
147 | precommit hook: HG_PARENT1=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 | |
|
148 |
precommit.forbid hook: HG_PARENT1= |
|
|
147 | precommit hook: HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 | |
|
148 | precommit.forbid hook: HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 | |
|
149 | 149 | abort: precommit.forbid hook exited with status 1 |
|
150 | 150 | $ hg -q tip |
|
151 | 4:8ea2ef7ad3e8 | |
|
151 | 4:539e4b31b6dc | |
|
152 | 152 | |
|
153 | 153 | # preupdate hook can prevent update |
|
154 | 154 | |
|
155 | 155 | $ echo 'preupdate = python ../printenv.py preupdate' >> .hg/hgrc |
|
156 | 156 | $ hg update 1 |
|
157 |
preupdate hook: HG_PARENT1= |
|
|
157 | preupdate hook: HG_PARENT1=ab228980c14d | |
|
158 | 158 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
159 | 159 | |
|
160 | 160 | # update hook |
|
161 | 161 | |
|
162 | 162 | $ echo 'update = python ../printenv.py update' >> .hg/hgrc |
|
163 | 163 | $ hg update |
|
164 |
preupdate hook: HG_PARENT1= |
|
|
165 |
update hook: HG_ERROR=0 HG_PARENT1= |
|
|
164 | preupdate hook: HG_PARENT1=539e4b31b6dc | |
|
165 | update hook: HG_ERROR=0 HG_PARENT1=539e4b31b6dc | |
|
166 | 166 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
167 | 167 | |
|
168 | 168 | # prechangegroup hook can prevent incoming changes |
|
169 | 169 | |
|
170 | 170 | $ cd ../b |
|
171 | 171 | $ hg -q tip |
|
172 | 3:4c52fb2e4022 | |
|
172 | 3:07f3376c1e65 | |
|
173 | 173 | $ echo '[hooks]' > .hg/hgrc |
|
174 | 174 | $ echo 'prechangegroup.forbid = python ../printenv.py prechangegroup.forbid 1' >> .hg/hgrc |
|
175 | 175 | $ hg pull ../a |
|
176 | 176 | prechangegroup.forbid hook: HG_SOURCE=pull HG_URL=file: |
|
177 | 177 | pulling from ../a |
|
178 | 178 | searching for changes |
|
179 | 179 | abort: prechangegroup.forbid hook exited with status 1 |
|
180 | 180 | |
|
181 | 181 | # pretxnchangegroup hook can see incoming changes, can roll back txn, |
|
182 | 182 | # incoming changes no longer there after |
|
183 | 183 | |
|
184 | 184 | $ echo '[hooks]' > .hg/hgrc |
|
185 | 185 | $ echo 'pretxnchangegroup.forbid0 = hg tip -q' >> .hg/hgrc |
|
186 | 186 | $ echo 'pretxnchangegroup.forbid1 = python ../printenv.py pretxnchangegroup.forbid 1' >> .hg/hgrc |
|
187 | 187 | $ hg pull ../a |
|
188 | 4:8ea2ef7ad3e8 | |
|
189 |
pretxnchangegroup.forbid hook: HG_NODE= |
|
|
188 | 4:539e4b31b6dc | |
|
189 | pretxnchangegroup.forbid hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PENDING=$HGTMP/test-hook.t/b HG_SOURCE=pull HG_URL=file: | |
|
190 | 190 | pulling from ../a |
|
191 | 191 | searching for changes |
|
192 | 192 | adding changesets |
|
193 | 193 | adding manifests |
|
194 | 194 | adding file changes |
|
195 | 195 | added 1 changesets with 1 changes to 1 files |
|
196 | 196 | transaction abort! |
|
197 | 197 | rollback completed |
|
198 | 198 | abort: pretxnchangegroup.forbid1 hook exited with status 1 |
|
199 | 199 | $ hg -q tip |
|
200 | 3:4c52fb2e4022 | |
|
200 | 3:07f3376c1e65 | |
|
201 | 201 | |
|
202 | 202 | # outgoing hooks can see env vars |
|
203 | 203 | |
|
204 | 204 | $ rm .hg/hgrc |
|
205 | 205 | $ echo '[hooks]' > ../a/.hg/hgrc |
|
206 | 206 | $ echo 'preoutgoing = python ../printenv.py preoutgoing' >> ../a/.hg/hgrc |
|
207 | 207 | $ echo 'outgoing = python ../printenv.py outgoing' >> ../a/.hg/hgrc |
|
208 | 208 | $ hg pull ../a |
|
209 | 209 | preoutgoing hook: HG_SOURCE=pull |
|
210 |
outgoing hook: HG_NODE= |
|
|
210 | outgoing hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_SOURCE=pull | |
|
211 | 211 | pulling from ../a |
|
212 | 212 | searching for changes |
|
213 | 213 | adding changesets |
|
214 | 214 | adding manifests |
|
215 | 215 | adding file changes |
|
216 | 216 | added 1 changesets with 1 changes to 1 files |
|
217 | 217 | (run 'hg update' to get a working copy) |
|
218 | 218 | $ hg rollback |
|
219 | 219 | rolling back to revision 3 (undo pull) |
|
220 | 220 | |
|
221 | 221 | # preoutgoing hook can prevent outgoing changes |
|
222 | 222 | |
|
223 | 223 | $ echo 'preoutgoing.forbid = python ../printenv.py preoutgoing.forbid 1' >> ../a/.hg/hgrc |
|
224 | 224 | $ hg pull ../a |
|
225 | 225 | preoutgoing hook: HG_SOURCE=pull |
|
226 | 226 | preoutgoing.forbid hook: HG_SOURCE=pull |
|
227 | 227 | pulling from ../a |
|
228 | 228 | searching for changes |
|
229 | 229 | abort: preoutgoing.forbid hook exited with status 1 |
|
230 | 230 | |
|
231 | 231 | # outgoing hooks work for local clones |
|
232 | 232 | |
|
233 | 233 | $ cd .. |
|
234 | 234 | $ echo '[hooks]' > a/.hg/hgrc |
|
235 | 235 | $ echo 'preoutgoing = python ../printenv.py preoutgoing' >> a/.hg/hgrc |
|
236 | 236 | $ echo 'outgoing = python ../printenv.py outgoing' >> a/.hg/hgrc |
|
237 | 237 | $ hg clone a c |
|
238 | 238 | preoutgoing hook: HG_SOURCE=clone |
|
239 | 239 | outgoing hook: HG_NODE=0000000000000000000000000000000000000000 HG_SOURCE=clone |
|
240 | 240 | updating to branch default |
|
241 | 241 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
242 | 242 | $ rm -rf c |
|
243 | 243 | |
|
244 | 244 | # preoutgoing hook can prevent outgoing changes for local clones |
|
245 | 245 | |
|
246 | 246 | $ echo 'preoutgoing.forbid = python ../printenv.py preoutgoing.forbid 1' >> a/.hg/hgrc |
|
247 | 247 | $ hg clone a zzz |
|
248 | 248 | preoutgoing hook: HG_SOURCE=clone |
|
249 | 249 | preoutgoing.forbid hook: HG_SOURCE=clone |
|
250 | 250 | abort: preoutgoing.forbid hook exited with status 1 |
|
251 | 251 | $ cd b |
|
252 | 252 | |
|
253 | 253 | $ cat > hooktests.py <<EOF |
|
254 | 254 | > from mercurial import util |
|
255 | 255 | > |
|
256 | 256 | > uncallable = 0 |
|
257 | 257 | > |
|
258 | 258 | > def printargs(args): |
|
259 | 259 | > args.pop('ui', None) |
|
260 | 260 | > args.pop('repo', None) |
|
261 | 261 | > a = list(args.items()) |
|
262 | 262 | > a.sort() |
|
263 | 263 | > print 'hook args:' |
|
264 | 264 | > for k, v in a: |
|
265 | 265 | > print ' ', k, v |
|
266 | 266 | > |
|
267 | 267 | > def passhook(**args): |
|
268 | 268 | > printargs(args) |
|
269 | 269 | > |
|
270 | 270 | > def failhook(**args): |
|
271 | 271 | > printargs(args) |
|
272 | 272 | > return True |
|
273 | 273 | > |
|
274 | 274 | > class LocalException(Exception): |
|
275 | 275 | > pass |
|
276 | 276 | > |
|
277 | 277 | > def raisehook(**args): |
|
278 | 278 | > raise LocalException('exception from hook') |
|
279 | 279 | > |
|
280 | 280 | > def aborthook(**args): |
|
281 | 281 | > raise util.Abort('raise abort from hook') |
|
282 | 282 | > |
|
283 | 283 | > def brokenhook(**args): |
|
284 | 284 | > return 1 + {} |
|
285 | 285 | > |
|
286 | 286 | > class container: |
|
287 | 287 | > unreachable = 1 |
|
288 | 288 | > EOF |
|
289 | 289 | |
|
290 | 290 | # test python hooks |
|
291 | 291 | |
|
292 | 292 | $ PYTHONPATH="`pwd`:$PYTHONPATH" |
|
293 | 293 | $ export PYTHONPATH |
|
294 | 294 | |
|
295 | 295 | $ echo '[hooks]' > ../a/.hg/hgrc |
|
296 | 296 | $ echo 'preoutgoing.broken = python:hooktests.brokenhook' >> ../a/.hg/hgrc |
|
297 | 297 | $ hg pull ../a 2>&1 | grep 'raised an exception' |
|
298 | 298 | error: preoutgoing.broken hook raised an exception: unsupported operand type(s) for +: 'int' and 'dict' |
|
299 | 299 | |
|
300 | 300 | $ echo '[hooks]' > ../a/.hg/hgrc |
|
301 | 301 | $ echo 'preoutgoing.raise = python:hooktests.raisehook' >> ../a/.hg/hgrc |
|
302 | 302 | $ hg pull ../a 2>&1 | grep 'raised an exception' |
|
303 | 303 | error: preoutgoing.raise hook raised an exception: exception from hook |
|
304 | 304 | |
|
305 | 305 | $ echo '[hooks]' > ../a/.hg/hgrc |
|
306 | 306 | $ echo 'preoutgoing.abort = python:hooktests.aborthook' >> ../a/.hg/hgrc |
|
307 | 307 | $ hg pull ../a |
|
308 | 308 | pulling from ../a |
|
309 | 309 | searching for changes |
|
310 | 310 | error: preoutgoing.abort hook failed: raise abort from hook |
|
311 | 311 | abort: raise abort from hook |
|
312 | 312 | |
|
313 | 313 | $ echo '[hooks]' > ../a/.hg/hgrc |
|
314 | 314 | $ echo 'preoutgoing.fail = python:hooktests.failhook' >> ../a/.hg/hgrc |
|
315 | 315 | $ hg pull ../a |
|
316 | 316 | pulling from ../a |
|
317 | 317 | searching for changes |
|
318 | 318 | hook args: |
|
319 | 319 | hooktype preoutgoing |
|
320 | 320 | source pull |
|
321 | 321 | abort: preoutgoing.fail hook failed |
|
322 | 322 | |
|
323 | 323 | $ echo '[hooks]' > ../a/.hg/hgrc |
|
324 | 324 | $ echo 'preoutgoing.uncallable = python:hooktests.uncallable' >> ../a/.hg/hgrc |
|
325 | 325 | $ hg pull ../a |
|
326 | 326 | pulling from ../a |
|
327 | 327 | searching for changes |
|
328 | 328 | abort: preoutgoing.uncallable hook is invalid ("hooktests.uncallable" is not callable) |
|
329 | 329 | |
|
330 | 330 | $ echo '[hooks]' > ../a/.hg/hgrc |
|
331 | 331 | $ echo 'preoutgoing.nohook = python:hooktests.nohook' >> ../a/.hg/hgrc |
|
332 | 332 | $ hg pull ../a |
|
333 | 333 | pulling from ../a |
|
334 | 334 | searching for changes |
|
335 | 335 | abort: preoutgoing.nohook hook is invalid ("hooktests.nohook" is not defined) |
|
336 | 336 | |
|
337 | 337 | $ echo '[hooks]' > ../a/.hg/hgrc |
|
338 | 338 | $ echo 'preoutgoing.nomodule = python:nomodule' >> ../a/.hg/hgrc |
|
339 | 339 | $ hg pull ../a |
|
340 | 340 | pulling from ../a |
|
341 | 341 | searching for changes |
|
342 | 342 | abort: preoutgoing.nomodule hook is invalid ("nomodule" not in a module) |
|
343 | 343 | |
|
344 | 344 | $ echo '[hooks]' > ../a/.hg/hgrc |
|
345 | 345 | $ echo 'preoutgoing.badmodule = python:nomodule.nowhere' >> ../a/.hg/hgrc |
|
346 | 346 | $ hg pull ../a |
|
347 | 347 | pulling from ../a |
|
348 | 348 | searching for changes |
|
349 | 349 | abort: preoutgoing.badmodule hook is invalid (import of "nomodule" failed) |
|
350 | 350 | |
|
351 | 351 | $ echo '[hooks]' > ../a/.hg/hgrc |
|
352 | 352 | $ echo 'preoutgoing.unreachable = python:hooktests.container.unreachable' >> ../a/.hg/hgrc |
|
353 | 353 | $ hg pull ../a |
|
354 | 354 | pulling from ../a |
|
355 | 355 | searching for changes |
|
356 | 356 | abort: preoutgoing.unreachable hook is invalid (import of "hooktests.container" failed) |
|
357 | 357 | |
|
358 | 358 | $ echo '[hooks]' > ../a/.hg/hgrc |
|
359 | 359 | $ echo 'preoutgoing.pass = python:hooktests.passhook' >> ../a/.hg/hgrc |
|
360 | 360 | $ hg pull ../a |
|
361 | 361 | pulling from ../a |
|
362 | 362 | searching for changes |
|
363 | 363 | hook args: |
|
364 | 364 | hooktype preoutgoing |
|
365 | 365 | source pull |
|
366 | 366 | adding changesets |
|
367 | 367 | adding manifests |
|
368 | 368 | adding file changes |
|
369 | 369 | added 1 changesets with 1 changes to 1 files |
|
370 | 370 | (run 'hg update' to get a working copy) |
|
371 | 371 | |
|
372 | 372 | # make sure --traceback works |
|
373 | 373 | |
|
374 | 374 | $ echo '[hooks]' > .hg/hgrc |
|
375 | 375 | $ echo 'commit.abort = python:hooktests.aborthook' >> .hg/hgrc |
|
376 | 376 | |
|
377 | 377 | $ echo aa > a |
|
378 | 378 | $ hg --traceback commit -d '0 0' -ma 2>&1 | grep '^Traceback' |
|
379 | 379 | Traceback (most recent call last): |
|
380 | 380 | |
|
381 | 381 | $ cd .. |
|
382 | 382 | $ hg init c |
|
383 | 383 | $ cd c |
|
384 | 384 | |
|
385 | 385 | $ cat > hookext.py <<EOF |
|
386 | 386 | > def autohook(**args): |
|
387 | 387 | > print "Automatically installed hook" |
|
388 | 388 | > |
|
389 | 389 | > def reposetup(ui, repo): |
|
390 | 390 | > repo.ui.setconfig("hooks", "commit.auto", autohook) |
|
391 | 391 | > EOF |
|
392 | 392 | $ echo '[extensions]' >> .hg/hgrc |
|
393 | 393 | $ echo 'hookext = hookext.py' >> .hg/hgrc |
|
394 | 394 | |
|
395 | 395 | $ touch foo |
|
396 | 396 | $ hg add foo |
|
397 | 397 | $ hg ci -d '0 0' -m 'add foo' |
|
398 | 398 | Automatically installed hook |
|
399 | 399 | $ echo >> foo |
|
400 | 400 | $ hg ci --debug -d '0 0' -m 'change foo' |
|
401 | 401 | foo |
|
402 | 402 | calling hook commit.auto: <function autohook at .*> |
|
403 | 403 | Automatically installed hook |
|
404 | 404 | committed changeset 1:52998019f6252a2b893452765fcb0a47351a5708 |
|
405 | 405 | |
|
406 | 406 | $ hg showconfig hooks |
|
407 | 407 | hooks.commit.auto=<function autohook at .*> |
|
408 | 408 | |
|
409 | 409 | # test python hook configured with python:[file]:[hook] syntax |
|
410 | 410 | |
|
411 | 411 | $ cd .. |
|
412 | 412 | $ mkdir d |
|
413 | 413 | $ cd d |
|
414 | 414 | $ hg init repo |
|
415 | 415 | $ mkdir hooks |
|
416 | 416 | |
|
417 | 417 | $ cd hooks |
|
418 | 418 | $ cat > testhooks.py <<EOF |
|
419 | 419 | > def testhook(**args): |
|
420 | 420 | > print 'hook works' |
|
421 | 421 | > EOF |
|
422 | 422 | $ echo '[hooks]' > ../repo/.hg/hgrc |
|
423 | 423 | $ echo "pre-commit.test = python:`pwd`/testhooks.py:testhook" >> ../repo/.hg/hgrc |
|
424 | 424 | |
|
425 | 425 | $ cd ../repo |
|
426 | 426 | $ hg commit -d '0 0' |
|
427 | 427 | hook works |
|
428 | 428 | nothing changed |
|
429 | 429 | |
|
430 | 430 | $ cd ../../b |
|
431 | 431 | |
|
432 | 432 | # make sure --traceback works on hook import failure |
|
433 | 433 | |
|
434 | 434 | $ cat > importfail.py <<EOF |
|
435 | 435 | > import somebogusmodule |
|
436 | 436 | > # dereference something in the module to force demandimport to load it |
|
437 | 437 | > somebogusmodule.whatever |
|
438 | 438 | > EOF |
|
439 | 439 | |
|
440 | 440 | $ echo '[hooks]' > .hg/hgrc |
|
441 | 441 | $ echo 'precommit.importfail = python:importfail.whatever' >> .hg/hgrc |
|
442 | 442 | |
|
443 | 443 | $ echo a >> a |
|
444 |
$ hg --traceback commit - |
|
|
444 | $ hg --traceback commit -ma 2>&1 | egrep '^(exception|Traceback|ImportError)' | |
|
445 | 445 | exception from first failed import attempt: |
|
446 | 446 | Traceback (most recent call last): |
|
447 | 447 | ImportError: No module named somebogusmodule |
|
448 | 448 | exception from second failed import attempt: |
|
449 | 449 | Traceback (most recent call last): |
|
450 | 450 | ImportError: No module named hgext_importfail |
|
451 | 451 | Traceback (most recent call last): |
|
452 | 452 | |
|
453 | 453 | # commit and update hooks should run after command completion (issue 1827) |
|
454 | 454 | |
|
455 | 455 | $ echo '[hooks]' > .hg/hgrc |
|
456 | 456 | $ echo 'commit = hg id' >> .hg/hgrc |
|
457 | 457 | $ echo 'update = hg id' >> .hg/hgrc |
|
458 | 458 | $ echo bb > a |
|
459 |
$ hg ci - |
|
|
460 | 8da618c33484 tip | |
|
459 | $ hg ci -ma | |
|
460 | 223eafe2750c tip | |
|
461 | 461 | $ hg up 0 |
|
462 | 29b62aeb769f | |
|
462 | cb9a9f314b8b | |
|
463 | 463 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
464 | 464 | |
|
465 | 465 | $ exit 0 |
@@ -1,468 +1,468 b'' | |||
|
1 | 1 | $ mkdir test |
|
2 | 2 | $ cd test |
|
3 | 3 | $ hg init |
|
4 | 4 | $ for i in 0 1 2 3 4 5 6 7 8; do |
|
5 | 5 | > echo $i >> foo |
|
6 |
> hg commit -A -m $i |
|
|
6 | > hg commit -A -m $i | |
|
7 | 7 | > done |
|
8 | 8 | adding foo |
|
9 | 9 | $ hg verify |
|
10 | 10 | checking changesets |
|
11 | 11 | checking manifests |
|
12 | 12 | crosschecking files in changesets and manifests |
|
13 | 13 | checking files |
|
14 | 14 | 1 files, 9 changesets, 9 total revisions |
|
15 | 15 | $ hg serve -p $HGPORT -d --pid-file=hg.pid |
|
16 | 16 | $ cat hg.pid >> $DAEMON_PIDS |
|
17 | 17 | $ cd .. |
|
18 | 18 | |
|
19 | 19 | $ hg init new |
|
20 | 20 | |
|
21 | 21 | http incoming |
|
22 | 22 | |
|
23 | 23 | $ hg -R new incoming http://localhost:$HGPORT/ | sed -e "s,:$HGPORT/,:\$HGPORT/," |
|
24 | 24 | comparing with http://localhost:$HGPORT/ |
|
25 |
changeset: 0: |
|
|
25 | changeset: 0:00a43fa82f62 | |
|
26 | 26 | user: test |
|
27 |
date: |
|
|
27 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
28 | 28 | summary: 0 |
|
29 | 29 | |
|
30 |
changeset: 1: |
|
|
30 | changeset: 1:5460a410df01 | |
|
31 | 31 | user: test |
|
32 |
date: |
|
|
32 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
33 | 33 | summary: 1 |
|
34 | 34 | |
|
35 |
changeset: 2: |
|
|
35 | changeset: 2:d9f42cd1a1ec | |
|
36 | 36 | user: test |
|
37 |
date: |
|
|
37 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
38 | 38 | summary: 2 |
|
39 | 39 | |
|
40 |
changeset: 3: |
|
|
40 | changeset: 3:376476025137 | |
|
41 | 41 | user: test |
|
42 |
date: |
|
|
42 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
43 | 43 | summary: 3 |
|
44 | 44 | |
|
45 |
changeset: 4: |
|
|
45 | changeset: 4:70d7eb252d49 | |
|
46 | 46 | user: test |
|
47 |
date: |
|
|
47 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
48 | 48 | summary: 4 |
|
49 | 49 | |
|
50 |
changeset: 5: |
|
|
50 | changeset: 5:ad284ee3b5ee | |
|
51 | 51 | user: test |
|
52 |
date: |
|
|
52 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
53 | 53 | summary: 5 |
|
54 | 54 | |
|
55 |
changeset: 6: |
|
|
55 | changeset: 6:e9229f2de384 | |
|
56 | 56 | user: test |
|
57 |
date: |
|
|
57 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
58 | 58 | summary: 6 |
|
59 | 59 | |
|
60 |
changeset: 7:d |
|
|
60 | changeset: 7:d152815bb8db | |
|
61 | 61 | user: test |
|
62 |
date: |
|
|
62 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
63 | 63 | summary: 7 |
|
64 | 64 | |
|
65 |
changeset: 8: |
|
|
65 | changeset: 8:e4feb4ac9035 | |
|
66 | 66 | tag: tip |
|
67 | 67 | user: test |
|
68 |
date: |
|
|
68 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
69 | 69 | summary: 8 |
|
70 | 70 | |
|
71 | 71 | $ hg -R new incoming -r 4 http://localhost:$HGPORT/ | sed -e "s,:$HGPORT/,:\$HGPORT/," |
|
72 | 72 | comparing with http://localhost:$HGPORT/ |
|
73 |
changeset: 0: |
|
|
73 | changeset: 0:00a43fa82f62 | |
|
74 | 74 | user: test |
|
75 |
date: |
|
|
75 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
76 | 76 | summary: 0 |
|
77 | 77 | |
|
78 |
changeset: 1: |
|
|
78 | changeset: 1:5460a410df01 | |
|
79 | 79 | user: test |
|
80 |
date: |
|
|
80 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
81 | 81 | summary: 1 |
|
82 | 82 | |
|
83 |
changeset: 2: |
|
|
83 | changeset: 2:d9f42cd1a1ec | |
|
84 | 84 | user: test |
|
85 |
date: |
|
|
85 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
86 | 86 | summary: 2 |
|
87 | 87 | |
|
88 |
changeset: 3: |
|
|
88 | changeset: 3:376476025137 | |
|
89 | 89 | user: test |
|
90 |
date: |
|
|
90 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
91 | 91 | summary: 3 |
|
92 | 92 | |
|
93 |
changeset: 4: |
|
|
93 | changeset: 4:70d7eb252d49 | |
|
94 | 94 | tag: tip |
|
95 | 95 | user: test |
|
96 |
date: |
|
|
96 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
97 | 97 | summary: 4 |
|
98 | 98 | |
|
99 | 99 | |
|
100 | 100 | local incoming |
|
101 | 101 | |
|
102 | 102 | $ hg -R new incoming test |
|
103 | 103 | comparing with test |
|
104 |
changeset: 0: |
|
|
104 | changeset: 0:00a43fa82f62 | |
|
105 | 105 | user: test |
|
106 |
date: |
|
|
106 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
107 | 107 | summary: 0 |
|
108 | 108 | |
|
109 |
changeset: 1: |
|
|
109 | changeset: 1:5460a410df01 | |
|
110 | 110 | user: test |
|
111 |
date: |
|
|
111 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
112 | 112 | summary: 1 |
|
113 | 113 | |
|
114 |
changeset: 2: |
|
|
114 | changeset: 2:d9f42cd1a1ec | |
|
115 | 115 | user: test |
|
116 |
date: |
|
|
116 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
117 | 117 | summary: 2 |
|
118 | 118 | |
|
119 |
changeset: 3: |
|
|
119 | changeset: 3:376476025137 | |
|
120 | 120 | user: test |
|
121 |
date: |
|
|
121 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
122 | 122 | summary: 3 |
|
123 | 123 | |
|
124 |
changeset: 4: |
|
|
124 | changeset: 4:70d7eb252d49 | |
|
125 | 125 | user: test |
|
126 |
date: |
|
|
126 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
127 | 127 | summary: 4 |
|
128 | 128 | |
|
129 |
changeset: 5: |
|
|
129 | changeset: 5:ad284ee3b5ee | |
|
130 | 130 | user: test |
|
131 |
date: |
|
|
131 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
132 | 132 | summary: 5 |
|
133 | 133 | |
|
134 |
changeset: 6: |
|
|
134 | changeset: 6:e9229f2de384 | |
|
135 | 135 | user: test |
|
136 |
date: |
|
|
136 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
137 | 137 | summary: 6 |
|
138 | 138 | |
|
139 |
changeset: 7:d |
|
|
139 | changeset: 7:d152815bb8db | |
|
140 | 140 | user: test |
|
141 |
date: |
|
|
141 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
142 | 142 | summary: 7 |
|
143 | 143 | |
|
144 |
changeset: 8: |
|
|
144 | changeset: 8:e4feb4ac9035 | |
|
145 | 145 | tag: tip |
|
146 | 146 | user: test |
|
147 |
date: |
|
|
147 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
148 | 148 | summary: 8 |
|
149 | 149 | |
|
150 | 150 | $ hg -R new incoming -r 4 test |
|
151 | 151 | comparing with test |
|
152 |
changeset: 0: |
|
|
152 | changeset: 0:00a43fa82f62 | |
|
153 | 153 | user: test |
|
154 |
date: |
|
|
154 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
155 | 155 | summary: 0 |
|
156 | 156 | |
|
157 |
changeset: 1: |
|
|
157 | changeset: 1:5460a410df01 | |
|
158 | 158 | user: test |
|
159 |
date: |
|
|
159 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
160 | 160 | summary: 1 |
|
161 | 161 | |
|
162 |
changeset: 2: |
|
|
162 | changeset: 2:d9f42cd1a1ec | |
|
163 | 163 | user: test |
|
164 |
date: |
|
|
164 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
165 | 165 | summary: 2 |
|
166 | 166 | |
|
167 |
changeset: 3: |
|
|
167 | changeset: 3:376476025137 | |
|
168 | 168 | user: test |
|
169 |
date: |
|
|
169 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
170 | 170 | summary: 3 |
|
171 | 171 | |
|
172 |
changeset: 4: |
|
|
172 | changeset: 4:70d7eb252d49 | |
|
173 | 173 | user: test |
|
174 |
date: |
|
|
174 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
175 | 175 | summary: 4 |
|
176 | 176 | |
|
177 | 177 | |
|
178 | 178 | limit to 2 changesets |
|
179 | 179 | |
|
180 | 180 | $ hg -R new incoming -l 2 test |
|
181 | 181 | comparing with test |
|
182 |
changeset: 0: |
|
|
182 | changeset: 0:00a43fa82f62 | |
|
183 | 183 | user: test |
|
184 |
date: |
|
|
184 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
185 | 185 | summary: 0 |
|
186 | 186 | |
|
187 |
changeset: 1: |
|
|
187 | changeset: 1:5460a410df01 | |
|
188 | 188 | user: test |
|
189 |
date: |
|
|
189 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
190 | 190 | summary: 1 |
|
191 | 191 | |
|
192 | 192 | |
|
193 | 193 | limit to 2 changesets, test with -p --git |
|
194 | 194 | |
|
195 | 195 | $ hg -R new incoming -l 2 -p --git test |
|
196 | 196 | comparing with test |
|
197 |
changeset: 0: |
|
|
197 | changeset: 0:00a43fa82f62 | |
|
198 | 198 | user: test |
|
199 |
date: |
|
|
199 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
200 | 200 | summary: 0 |
|
201 | 201 | |
|
202 | 202 | diff --git a/foo b/foo |
|
203 | 203 | new file mode 100644 |
|
204 | 204 | --- /dev/null |
|
205 | 205 | +++ b/foo |
|
206 | 206 | @@ -0,0 +1,1 @@ |
|
207 | 207 | +0 |
|
208 | 208 | |
|
209 |
changeset: 1: |
|
|
209 | changeset: 1:5460a410df01 | |
|
210 | 210 | user: test |
|
211 |
date: |
|
|
211 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
212 | 212 | summary: 1 |
|
213 | 213 | |
|
214 | 214 | diff --git a/foo b/foo |
|
215 | 215 | --- a/foo |
|
216 | 216 | +++ b/foo |
|
217 | 217 | @@ -1,1 +1,2 @@ |
|
218 | 218 | 0 |
|
219 | 219 | +1 |
|
220 | 220 | |
|
221 | 221 | |
|
222 | 222 | test with --bundle |
|
223 | 223 | |
|
224 | 224 | $ hg -R new incoming --bundle test.hg http://localhost:$HGPORT/ | sed -e "s,:$HGPORT/,:\$HGPORT/," |
|
225 | 225 | comparing with http://localhost:$HGPORT/ |
|
226 |
changeset: 0: |
|
|
226 | changeset: 0:00a43fa82f62 | |
|
227 | 227 | user: test |
|
228 |
date: |
|
|
228 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
229 | 229 | summary: 0 |
|
230 | 230 | |
|
231 |
changeset: 1: |
|
|
231 | changeset: 1:5460a410df01 | |
|
232 | 232 | user: test |
|
233 |
date: |
|
|
233 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
234 | 234 | summary: 1 |
|
235 | 235 | |
|
236 |
changeset: 2: |
|
|
236 | changeset: 2:d9f42cd1a1ec | |
|
237 | 237 | user: test |
|
238 |
date: |
|
|
238 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
239 | 239 | summary: 2 |
|
240 | 240 | |
|
241 |
changeset: 3: |
|
|
241 | changeset: 3:376476025137 | |
|
242 | 242 | user: test |
|
243 |
date: |
|
|
243 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
244 | 244 | summary: 3 |
|
245 | 245 | |
|
246 |
changeset: 4: |
|
|
246 | changeset: 4:70d7eb252d49 | |
|
247 | 247 | user: test |
|
248 |
date: |
|
|
248 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
249 | 249 | summary: 4 |
|
250 | 250 | |
|
251 |
changeset: 5: |
|
|
251 | changeset: 5:ad284ee3b5ee | |
|
252 | 252 | user: test |
|
253 |
date: |
|
|
253 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
254 | 254 | summary: 5 |
|
255 | 255 | |
|
256 |
changeset: 6: |
|
|
256 | changeset: 6:e9229f2de384 | |
|
257 | 257 | user: test |
|
258 |
date: |
|
|
258 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
259 | 259 | summary: 6 |
|
260 | 260 | |
|
261 |
changeset: 7:d |
|
|
261 | changeset: 7:d152815bb8db | |
|
262 | 262 | user: test |
|
263 |
date: |
|
|
263 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
264 | 264 | summary: 7 |
|
265 | 265 | |
|
266 |
changeset: 8: |
|
|
266 | changeset: 8:e4feb4ac9035 | |
|
267 | 267 | tag: tip |
|
268 | 268 | user: test |
|
269 |
date: |
|
|
269 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
270 | 270 | summary: 8 |
|
271 | 271 | |
|
272 | 272 | $ hg -R new incoming --bundle test2.hg test |
|
273 | 273 | comparing with test |
|
274 |
changeset: 0: |
|
|
274 | changeset: 0:00a43fa82f62 | |
|
275 | 275 | user: test |
|
276 |
date: |
|
|
276 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
277 | 277 | summary: 0 |
|
278 | 278 | |
|
279 |
changeset: 1: |
|
|
279 | changeset: 1:5460a410df01 | |
|
280 | 280 | user: test |
|
281 |
date: |
|
|
281 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
282 | 282 | summary: 1 |
|
283 | 283 | |
|
284 |
changeset: 2: |
|
|
284 | changeset: 2:d9f42cd1a1ec | |
|
285 | 285 | user: test |
|
286 |
date: |
|
|
286 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
287 | 287 | summary: 2 |
|
288 | 288 | |
|
289 |
changeset: 3: |
|
|
289 | changeset: 3:376476025137 | |
|
290 | 290 | user: test |
|
291 |
date: |
|
|
291 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
292 | 292 | summary: 3 |
|
293 | 293 | |
|
294 |
changeset: 4: |
|
|
294 | changeset: 4:70d7eb252d49 | |
|
295 | 295 | user: test |
|
296 |
date: |
|
|
296 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
297 | 297 | summary: 4 |
|
298 | 298 | |
|
299 |
changeset: 5: |
|
|
299 | changeset: 5:ad284ee3b5ee | |
|
300 | 300 | user: test |
|
301 |
date: |
|
|
301 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
302 | 302 | summary: 5 |
|
303 | 303 | |
|
304 |
changeset: 6: |
|
|
304 | changeset: 6:e9229f2de384 | |
|
305 | 305 | user: test |
|
306 |
date: |
|
|
306 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
307 | 307 | summary: 6 |
|
308 | 308 | |
|
309 |
changeset: 7:d |
|
|
309 | changeset: 7:d152815bb8db | |
|
310 | 310 | user: test |
|
311 |
date: |
|
|
311 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
312 | 312 | summary: 7 |
|
313 | 313 | |
|
314 |
changeset: 8: |
|
|
314 | changeset: 8:e4feb4ac9035 | |
|
315 | 315 | tag: tip |
|
316 | 316 | user: test |
|
317 |
date: |
|
|
317 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
318 | 318 | summary: 8 |
|
319 | 319 | |
|
320 | 320 | |
|
321 | 321 | |
|
322 | 322 | test the resulting bundles |
|
323 | 323 | |
|
324 | 324 | $ hg init temp |
|
325 | 325 | $ hg init temp2 |
|
326 | 326 | $ hg -R temp unbundle test.hg |
|
327 | 327 | adding changesets |
|
328 | 328 | adding manifests |
|
329 | 329 | adding file changes |
|
330 | 330 | added 9 changesets with 9 changes to 1 files |
|
331 | 331 | (run 'hg update' to get a working copy) |
|
332 | 332 | $ hg -R temp2 unbundle test2.hg |
|
333 | 333 | adding changesets |
|
334 | 334 | adding manifests |
|
335 | 335 | adding file changes |
|
336 | 336 | added 9 changesets with 9 changes to 1 files |
|
337 | 337 | (run 'hg update' to get a working copy) |
|
338 | 338 | $ hg -R temp tip |
|
339 |
changeset: 8: |
|
|
339 | changeset: 8:e4feb4ac9035 | |
|
340 | 340 | tag: tip |
|
341 | 341 | user: test |
|
342 |
date: |
|
|
342 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
343 | 343 | summary: 8 |
|
344 | 344 | |
|
345 | 345 | $ hg -R temp2 tip |
|
346 |
changeset: 8: |
|
|
346 | changeset: 8:e4feb4ac9035 | |
|
347 | 347 | tag: tip |
|
348 | 348 | user: test |
|
349 |
date: |
|
|
349 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
350 | 350 | summary: 8 |
|
351 | 351 | |
|
352 | 352 | |
|
353 | 353 | $ rm -r temp temp2 new |
|
354 | 354 | |
|
355 | 355 | test outgoing |
|
356 | 356 | |
|
357 | 357 | $ hg clone test test-dev |
|
358 | 358 | updating to branch default |
|
359 | 359 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
360 | 360 | $ cd test-dev |
|
361 | 361 | $ for i in 9 10 11 12 13; do |
|
362 | 362 | > echo $i >> foo |
|
363 |
> hg commit -A -m $i |
|
|
363 | > hg commit -A -m $i | |
|
364 | 364 | > done |
|
365 | 365 | $ hg verify |
|
366 | 366 | checking changesets |
|
367 | 367 | checking manifests |
|
368 | 368 | crosschecking files in changesets and manifests |
|
369 | 369 | checking files |
|
370 | 370 | 1 files, 14 changesets, 14 total revisions |
|
371 | 371 | $ cd .. |
|
372 | 372 | $ hg -R test-dev outgoing test |
|
373 | 373 | comparing with test |
|
374 | 374 | searching for changes |
|
375 |
changeset: 9: |
|
|
375 | changeset: 9:d89d4abea5bc | |
|
376 | 376 | user: test |
|
377 |
date: |
|
|
377 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
378 | 378 | summary: 9 |
|
379 | 379 | |
|
380 |
changeset: 10: |
|
|
380 | changeset: 10:820095aa7158 | |
|
381 | 381 | user: test |
|
382 |
date: |
|
|
382 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
383 | 383 | summary: 10 |
|
384 | 384 | |
|
385 |
changeset: 11:0 |
|
|
385 | changeset: 11:09ede2f3a638 | |
|
386 | 386 | user: test |
|
387 |
date: |
|
|
387 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
388 | 388 | summary: 11 |
|
389 | 389 | |
|
390 |
changeset: 12: |
|
|
390 | changeset: 12:e576b1bed305 | |
|
391 | 391 | user: test |
|
392 |
date: |
|
|
392 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
393 | 393 | summary: 12 |
|
394 | 394 | |
|
395 |
changeset: 13: |
|
|
395 | changeset: 13:96bbff09a7cc | |
|
396 | 396 | tag: tip |
|
397 | 397 | user: test |
|
398 |
date: |
|
|
398 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
399 | 399 | summary: 13 |
|
400 | 400 | |
|
401 | 401 | |
|
402 | 402 | limit to 3 changesets |
|
403 | 403 | |
|
404 | 404 | $ hg -R test-dev outgoing -l 3 test |
|
405 | 405 | comparing with test |
|
406 | 406 | searching for changes |
|
407 |
changeset: 9: |
|
|
407 | changeset: 9:d89d4abea5bc | |
|
408 | 408 | user: test |
|
409 |
date: |
|
|
409 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
410 | 410 | summary: 9 |
|
411 | 411 | |
|
412 |
changeset: 10: |
|
|
412 | changeset: 10:820095aa7158 | |
|
413 | 413 | user: test |
|
414 |
date: |
|
|
414 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
415 | 415 | summary: 10 |
|
416 | 416 | |
|
417 |
changeset: 11:0 |
|
|
417 | changeset: 11:09ede2f3a638 | |
|
418 | 418 | user: test |
|
419 |
date: |
|
|
419 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
420 | 420 | summary: 11 |
|
421 | 421 | |
|
422 | 422 | $ hg -R test-dev outgoing http://localhost:$HGPORT/ | sed -e "s,:$HGPORT/,:\$HGPORT/," |
|
423 | 423 | comparing with http://localhost:$HGPORT/ |
|
424 | 424 | searching for changes |
|
425 |
changeset: 9: |
|
|
425 | changeset: 9:d89d4abea5bc | |
|
426 | 426 | user: test |
|
427 |
date: |
|
|
427 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
428 | 428 | summary: 9 |
|
429 | 429 | |
|
430 |
changeset: 10: |
|
|
430 | changeset: 10:820095aa7158 | |
|
431 | 431 | user: test |
|
432 |
date: |
|
|
432 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
433 | 433 | summary: 10 |
|
434 | 434 | |
|
435 |
changeset: 11:0 |
|
|
435 | changeset: 11:09ede2f3a638 | |
|
436 | 436 | user: test |
|
437 |
date: |
|
|
437 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
438 | 438 | summary: 11 |
|
439 | 439 | |
|
440 |
changeset: 12: |
|
|
440 | changeset: 12:e576b1bed305 | |
|
441 | 441 | user: test |
|
442 |
date: |
|
|
442 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
443 | 443 | summary: 12 |
|
444 | 444 | |
|
445 |
changeset: 13: |
|
|
445 | changeset: 13:96bbff09a7cc | |
|
446 | 446 | tag: tip |
|
447 | 447 | user: test |
|
448 |
date: |
|
|
448 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
449 | 449 | summary: 13 |
|
450 | 450 | |
|
451 | 451 | $ hg -R test-dev outgoing -r 11 http://localhost:$HGPORT/ | sed -e "s,:$HGPORT/,:\$HGPORT/," |
|
452 | 452 | comparing with http://localhost:$HGPORT/ |
|
453 | 453 | searching for changes |
|
454 |
changeset: 9: |
|
|
454 | changeset: 9:d89d4abea5bc | |
|
455 | 455 | user: test |
|
456 |
date: |
|
|
456 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
457 | 457 | summary: 9 |
|
458 | 458 | |
|
459 |
changeset: 10: |
|
|
459 | changeset: 10:820095aa7158 | |
|
460 | 460 | user: test |
|
461 |
date: |
|
|
461 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
462 | 462 | summary: 10 |
|
463 | 463 | |
|
464 |
changeset: 11:0 |
|
|
464 | changeset: 11:09ede2f3a638 | |
|
465 | 465 | user: test |
|
466 |
date: |
|
|
466 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
467 | 467 | summary: 11 |
|
468 | 468 |
@@ -1,156 +1,156 b'' | |||
|
1 | 1 | # This test tries to exercise the ssh functionality with a dummy script |
|
2 | 2 | |
|
3 | 3 | $ cat <<EOF > dummyssh |
|
4 | 4 | > import sys |
|
5 | 5 | > import os |
|
6 | 6 | > |
|
7 | 7 | > os.chdir(os.path.dirname(sys.argv[0])) |
|
8 | 8 | > if sys.argv[1] != "user@dummy": |
|
9 | 9 | > sys.exit(-1) |
|
10 | 10 | > |
|
11 | 11 | > if not os.path.exists("dummyssh"): |
|
12 | 12 | > sys.exit(-1) |
|
13 | 13 | > |
|
14 | 14 | > log = open("dummylog", "ab") |
|
15 | 15 | > log.write("Got arguments") |
|
16 | 16 | > for i, arg in enumerate(sys.argv[1:]): |
|
17 | 17 | > log.write(" %d:%s" % (i+1, arg)) |
|
18 | 18 | > log.write("\n") |
|
19 | 19 | > log.close() |
|
20 | 20 | > r = os.system(sys.argv[2]) |
|
21 | 21 | > sys.exit(bool(r)) |
|
22 | 22 | > EOF |
|
23 | 23 | |
|
24 | 24 | $ checknewrepo() |
|
25 | 25 | > { |
|
26 | 26 | > name=$1 |
|
27 | 27 | > if [ -d $name/.hg/store ]; then |
|
28 | 28 | > echo store created |
|
29 | 29 | > fi |
|
30 | 30 | > if [ -f $name/.hg/00changelog.i ]; then |
|
31 | 31 | > echo 00changelog.i created |
|
32 | 32 | > fi |
|
33 | 33 | > cat $name/.hg/requires |
|
34 | 34 | > } |
|
35 | 35 | |
|
36 | 36 | creating 'local' |
|
37 | 37 | |
|
38 | 38 | $ hg init local |
|
39 | 39 | $ checknewrepo local |
|
40 | 40 | store created |
|
41 | 41 | 00changelog.i created |
|
42 | 42 | revlogv1 |
|
43 | 43 | store |
|
44 | 44 | fncache |
|
45 | 45 | $ echo this > local/foo |
|
46 |
$ hg ci --cwd local -A -m "init" |
|
|
46 | $ hg ci --cwd local -A -m "init" | |
|
47 | 47 | adding foo |
|
48 | 48 | |
|
49 | 49 | creating repo with format.usestore=false |
|
50 | 50 | |
|
51 | 51 | $ hg --config format.usestore=false init old |
|
52 | 52 | $ checknewrepo old |
|
53 | 53 | revlogv1 |
|
54 | 54 | |
|
55 | 55 | creating repo with format.usefncache=false |
|
56 | 56 | |
|
57 | 57 | $ hg --config format.usefncache=false init old2 |
|
58 | 58 | $ checknewrepo old2 |
|
59 | 59 | store created |
|
60 | 60 | 00changelog.i created |
|
61 | 61 | revlogv1 |
|
62 | 62 | store |
|
63 | 63 | |
|
64 | 64 | test failure |
|
65 | 65 | |
|
66 | 66 | $ hg init local |
|
67 | 67 | abort: repository local already exists! |
|
68 | 68 | |
|
69 | 69 | init+push to remote2 |
|
70 | 70 | |
|
71 | 71 | $ hg init -e "python ./dummyssh" ssh://user@dummy/remote2 |
|
72 | 72 | $ hg incoming -R remote2 local |
|
73 | 73 | comparing with local |
|
74 |
changeset: 0: |
|
|
74 | changeset: 0:08b9e9f63b32 | |
|
75 | 75 | tag: tip |
|
76 | 76 | user: test |
|
77 |
date: |
|
|
77 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
78 | 78 | summary: init |
|
79 | 79 | |
|
80 | 80 | |
|
81 | 81 | $ hg push -R local -e "python ./dummyssh" ssh://user@dummy/remote2 |
|
82 | 82 | pushing to ssh://user@dummy/remote2 |
|
83 | 83 | searching for changes |
|
84 | 84 | remote: adding changesets |
|
85 | 85 | remote: adding manifests |
|
86 | 86 | remote: adding file changes |
|
87 | 87 | remote: added 1 changesets with 1 changes to 1 files |
|
88 | 88 | |
|
89 | 89 | clone to remote1 |
|
90 | 90 | |
|
91 | 91 | $ hg clone -e "python ./dummyssh" local ssh://user@dummy/remote1 |
|
92 | 92 | searching for changes |
|
93 | 93 | remote: adding changesets |
|
94 | 94 | remote: adding manifests |
|
95 | 95 | remote: adding file changes |
|
96 | 96 | remote: added 1 changesets with 1 changes to 1 files |
|
97 | 97 | |
|
98 | 98 | init to existing repo |
|
99 | 99 | |
|
100 | 100 | $ hg init -e "python ./dummyssh" ssh://user@dummy/remote1 |
|
101 | 101 | abort: repository remote1 already exists! |
|
102 | 102 | abort: could not create remote repo! |
|
103 | 103 | |
|
104 | 104 | clone to existing repo |
|
105 | 105 | |
|
106 | 106 | $ hg clone -e "python ./dummyssh" local ssh://user@dummy/remote1 |
|
107 | 107 | abort: repository remote1 already exists! |
|
108 | 108 | abort: could not create remote repo! |
|
109 | 109 | |
|
110 | 110 | output of dummyssh |
|
111 | 111 | |
|
112 | 112 | $ cat dummylog |
|
113 | 113 | Got arguments 1:user@dummy 2:hg init remote2 |
|
114 | 114 | Got arguments 1:user@dummy 2:hg -R remote2 serve --stdio |
|
115 | 115 | Got arguments 1:user@dummy 2:hg -R remote2 serve --stdio |
|
116 | 116 | Got arguments 1:user@dummy 2:hg init remote1 |
|
117 | 117 | Got arguments 1:user@dummy 2:hg -R remote1 serve --stdio |
|
118 | 118 | Got arguments 1:user@dummy 2:hg init remote1 |
|
119 | 119 | Got arguments 1:user@dummy 2:hg init remote1 |
|
120 | 120 | |
|
121 | 121 | comparing repositories |
|
122 | 122 | |
|
123 | 123 | $ hg tip -q -R local |
|
124 | 0:c4e059d443be | |
|
124 | 0:08b9e9f63b32 | |
|
125 | 125 | $ hg tip -q -R remote1 |
|
126 | 0:c4e059d443be | |
|
126 | 0:08b9e9f63b32 | |
|
127 | 127 | $ hg tip -q -R remote2 |
|
128 | 0:c4e059d443be | |
|
128 | 0:08b9e9f63b32 | |
|
129 | 129 | |
|
130 | 130 | check names for repositories (clashes with URL schemes, special chars) |
|
131 | 131 | |
|
132 | 132 | $ for i in bundle file hg http https old-http ssh static-http " " "with space"; do |
|
133 | 133 | > printf "hg init \"$i\"... " |
|
134 | 134 | > hg init "$i" |
|
135 | 135 | > test -d "$i" -a -d "$i/.hg" && echo "ok" || echo "failed" |
|
136 | 136 | > done |
|
137 | 137 | hg init "bundle"... ok |
|
138 | 138 | hg init "file"... ok |
|
139 | 139 | hg init "hg"... ok |
|
140 | 140 | hg init "http"... ok |
|
141 | 141 | hg init "https"... ok |
|
142 | 142 | hg init "old-http"... ok |
|
143 | 143 | hg init "ssh"... ok |
|
144 | 144 | hg init "static-http"... ok |
|
145 | 145 | hg init " "... ok |
|
146 | 146 | hg init "with space"... ok |
|
147 | 147 | |
|
148 | 148 | creating 'local/sub/repo' |
|
149 | 149 | |
|
150 | 150 | $ hg init local/sub/repo |
|
151 | 151 | $ checknewrepo local/sub/repo |
|
152 | 152 | store created |
|
153 | 153 | 00changelog.i created |
|
154 | 154 | revlogv1 |
|
155 | 155 | store |
|
156 | 156 | fncache |
@@ -1,24 +1,24 b'' | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | 3 | mkdir t |
|
4 | 4 | cd t |
|
5 | 5 | |
|
6 | 6 | hg init |
|
7 | 7 | mkdir src |
|
8 | 8 | echo a > src/a.c |
|
9 | hg ci -Ama -d "10000000 0" | |
|
9 | hg ci -Ama | |
|
10 | 10 | |
|
11 | 11 | hg mv src source |
|
12 |
hg ci -Ammove |
|
|
12 | hg ci -Ammove | |
|
13 | 13 | |
|
14 | 14 | hg co -C 0 |
|
15 | 15 | echo new > src/a.c |
|
16 | 16 | echo compiled > src/a.o |
|
17 |
hg ci -mupdate |
|
|
17 | hg ci -mupdate | |
|
18 | 18 | |
|
19 | 19 | hg st |
|
20 | 20 | |
|
21 | 21 | hg merge |
|
22 | 22 | |
|
23 | 23 | hg st |
|
24 | 24 |
@@ -1,20 +1,20 b'' | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | 3 | mkdir t |
|
4 | 4 | cd t |
|
5 | 5 | hg init |
|
6 | 6 | echo a > a |
|
7 | hg ci -Ama -d '1000000000 0' | |
|
7 | hg ci -Ama | |
|
8 | 8 | echo b > b |
|
9 | 9 | hg branch b |
|
10 | hg ci -Amb -d '1000000000 0' | |
|
10 | hg ci -Amb | |
|
11 | 11 | hg co -C 0 |
|
12 | 12 | |
|
13 | 13 | echo fast-forward |
|
14 | 14 | hg merge b |
|
15 |
hg ci -Ammerge |
|
|
15 | hg ci -Ammerge | |
|
16 | 16 | |
|
17 | 17 | echo bogus fast-forward should fail |
|
18 | 18 | hg merge b |
|
19 | 19 | |
|
20 | 20 | echo done |
@@ -1,56 +1,56 b'' | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | 3 | hglocate() |
|
4 | 4 | { |
|
5 | 5 | echo "hg locate $@" |
|
6 | 6 | hg locate "$@" |
|
7 | 7 | ret=$? |
|
8 | 8 | echo |
|
9 | 9 | return $ret |
|
10 | 10 | } |
|
11 | 11 | |
|
12 | 12 | mkdir t |
|
13 | 13 | cd t |
|
14 | 14 | hg init |
|
15 | 15 | echo 0 > a |
|
16 | 16 | echo 0 > b |
|
17 | 17 | echo 0 > t.h |
|
18 | 18 | mkdir t |
|
19 | 19 | echo 0 > t/x |
|
20 | 20 | echo 0 > t/b |
|
21 | 21 | echo 0 > t/e.h |
|
22 | 22 | mkdir dir.h |
|
23 | 23 | echo 0 > dir.h/foo |
|
24 |
hg ci -A -m m |
|
|
24 | hg ci -A -m m | |
|
25 | 25 | touch nottracked |
|
26 | 26 | hglocate a && echo locate succeeded || echo locate failed |
|
27 | 27 | hglocate NONEXISTENT && echo locate succeeded || echo locate failed |
|
28 | 28 | hglocate |
|
29 | 29 | hg rm a |
|
30 | hg ci -m m -d "1000000 0" | |
|
30 | hg ci -m m | |
|
31 | 31 | hglocate a |
|
32 | 32 | hglocate NONEXISTENT |
|
33 | 33 | hglocate relpath:NONEXISTENT |
|
34 | 34 | hglocate |
|
35 | 35 | hglocate -r 0 a |
|
36 | 36 | hglocate -r 0 NONEXISTENT |
|
37 | 37 | hglocate -r 0 relpath:NONEXISTENT |
|
38 | 38 | hglocate -r 0 |
|
39 | 39 | echo % -I/-X with relative path should work |
|
40 | 40 | cd t |
|
41 | 41 | hglocate |
|
42 | 42 | hglocate -I ../t |
|
43 | 43 | # test issue294 |
|
44 | 44 | cd .. |
|
45 | 45 | rm -r t |
|
46 | 46 | hglocate 't/**' |
|
47 | 47 | mkdir otherdir |
|
48 | 48 | cd otherdir |
|
49 | 49 | hglocate b |
|
50 | 50 | hglocate '*.h' |
|
51 | 51 | hglocate path:t/x |
|
52 | 52 | hglocate 're:.*\.h$' |
|
53 | 53 | hglocate -r 0 b |
|
54 | 54 | hglocate -r 0 '*.h' |
|
55 | 55 | hglocate -r 0 path:t/x |
|
56 | 56 | hglocate -r 0 're:.*\.h$' |
@@ -1,84 +1,84 b'' | |||
|
1 | 1 | $ hgcommit() { |
|
2 |
> hg commit -u user |
|
|
2 | > hg commit -u user "$@" | |
|
3 | 3 | > } |
|
4 | 4 | |
|
5 | 5 | $ hg init clhead |
|
6 | 6 | $ cd clhead |
|
7 | 7 | |
|
8 | 8 | $ touch foo && hg add && hgcommit -m 'foo' |
|
9 | 9 | adding foo |
|
10 | 10 | $ touch bar && hg add && hgcommit -m 'bar' |
|
11 | 11 | adding bar |
|
12 | 12 | $ touch baz && hg add && hgcommit -m 'baz' |
|
13 | 13 | adding baz |
|
14 | 14 | |
|
15 | 15 | $ echo "flub" > foo |
|
16 | 16 | $ hgcommit -m "flub" |
|
17 | 17 | $ echo "nub" > foo |
|
18 | 18 | $ hgcommit -m "nub" |
|
19 | 19 | |
|
20 | 20 | $ hg up -C 2 |
|
21 | 21 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
22 | 22 | |
|
23 | 23 | $ echo "c1" > c1 |
|
24 | 24 | $ hg add c1 |
|
25 | 25 | $ hgcommit -m "c1" |
|
26 | 26 | created new head |
|
27 | 27 | $ echo "c2" > c1 |
|
28 | 28 | $ hgcommit -m "c2" |
|
29 | 29 | |
|
30 | 30 | $ hg up -C 2 |
|
31 | 31 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
32 | 32 | |
|
33 | 33 | $ echo "d1" > d1 |
|
34 | 34 | $ hg add d1 |
|
35 | 35 | $ hgcommit -m "d1" |
|
36 | 36 | created new head |
|
37 | 37 | $ echo "d2" > d1 |
|
38 | 38 | $ hgcommit -m "d2" |
|
39 | 39 | $ hg tag -l good |
|
40 | 40 | |
|
41 | 41 | fail with three heads |
|
42 | 42 | $ hg up -C good |
|
43 | 43 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
44 | 44 | $ hg merge |
|
45 | 45 | abort: branch 'default' has 3 heads - please merge with an explicit rev |
|
46 | 46 | (run 'hg heads .' to see heads) |
|
47 | 47 | |
|
48 | 48 | close one of the heads |
|
49 | 49 | $ hg up -C 6 |
|
50 | 50 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
51 | 51 | $ hgcommit -m 'close this head' --close-branch |
|
52 | 52 | |
|
53 | 53 | succeed with two open heads |
|
54 | 54 | $ hg up -C good |
|
55 | 55 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
56 | 56 | $ hg up -C good |
|
57 | 57 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
58 | 58 | $ hg merge |
|
59 | 59 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
60 | 60 | (branch merge, don't forget to commit) |
|
61 | 61 | $ hgcommit -m 'merged heads' |
|
62 | 62 | |
|
63 | 63 | hg update -C 8 |
|
64 | 64 | $ hg update -C 8 |
|
65 | 65 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
66 | 66 | |
|
67 | 67 | hg branch some-branch |
|
68 | 68 | $ hg branch some-branch |
|
69 | 69 | marked working directory as branch some-branch |
|
70 | 70 | hg commit |
|
71 | 71 | $ hgcommit -m 'started some-branch' |
|
72 | 72 | hg commit --close-branch |
|
73 | 73 | $ hgcommit --close-branch -m 'closed some-branch' |
|
74 | 74 | |
|
75 | 75 | hg update default |
|
76 | 76 | $ hg update default |
|
77 | 77 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
78 | 78 | hg merge some-branch |
|
79 | 79 | $ hg merge some-branch |
|
80 | 80 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
81 | 81 | (branch merge, don't forget to commit) |
|
82 | 82 | hg commit (no reopening of some-branch) |
|
83 | 83 | $ hgcommit -m 'merge with closed branch' |
|
84 | 84 |
@@ -1,56 +1,56 b'' | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | 3 | # make sure that the internal merge tools (internal:fail, internal:local, and |
|
4 | 4 | # internal:other) are used when matched by a merge-pattern in hgrc |
|
5 | 5 | |
|
6 | 6 | unset HGMERGE # make sure HGMERGE doesn't interfere with the test |
|
7 | 7 | |
|
8 | 8 | hg init |
|
9 | 9 | |
|
10 | 10 | echo "# initial file contents" |
|
11 | 11 | echo "line 1" > f |
|
12 | 12 | echo "line 2" >> f |
|
13 | 13 | echo "line 3" >> f |
|
14 |
hg commit -Am "revision 0" |
|
|
14 | hg commit -Am "revision 0" | |
|
15 | 15 | cat f |
|
16 | 16 | echo "# branch 1: editing line 1" |
|
17 | 17 | sed 's/line 1/first line/' f > f.new |
|
18 | 18 | mv f.new f |
|
19 |
hg commit -Am "edited first line" |
|
|
19 | hg commit -Am "edited first line" | |
|
20 | 20 | |
|
21 | 21 | echo "# branch 2: editing line 3" |
|
22 | 22 | hg update 0 |
|
23 | 23 | sed 's/line 3/third line/' f > f.new |
|
24 | 24 | mv f.new f |
|
25 |
hg commit -Am "edited third line" |
|
|
25 | hg commit -Am "edited third line" | |
|
26 | 26 | |
|
27 | 27 | echo "# merge using internal:fail tool" |
|
28 | 28 | echo "[merge-patterns]" > .hg/hgrc |
|
29 | 29 | echo "* = internal:fail" >> .hg/hgrc |
|
30 | 30 | hg merge |
|
31 | 31 | cat f |
|
32 | 32 | hg stat |
|
33 | 33 | |
|
34 | 34 | echo "# merge using internal:local tool" |
|
35 | 35 | hg update -C 2 |
|
36 | 36 | sed 's/internal:fail/internal:local/' .hg/hgrc > .hg/hgrc.new |
|
37 | 37 | mv .hg/hgrc.new .hg/hgrc |
|
38 | 38 | hg merge |
|
39 | 39 | cat f |
|
40 | 40 | hg stat |
|
41 | 41 | |
|
42 | 42 | echo "# merge using internal:other tool" |
|
43 | 43 | hg update -C 2 |
|
44 | 44 | sed 's/internal:local/internal:other/' .hg/hgrc > .hg/hgrc.new |
|
45 | 45 | mv .hg/hgrc.new .hg/hgrc |
|
46 | 46 | hg merge |
|
47 | 47 | cat f |
|
48 | 48 | hg stat |
|
49 | 49 | |
|
50 | 50 | echo "# merge using default tool" |
|
51 | 51 | hg update -C 2 |
|
52 | 52 | rm .hg/hgrc |
|
53 | 53 | hg merge |
|
54 | 54 | cat f |
|
55 | 55 | hg stat |
|
56 | 56 |
@@ -1,50 +1,50 b'' | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | 3 | hg init |
|
4 | 4 | |
|
5 | 5 | echo "# revision 0" |
|
6 | 6 | echo "unchanged" > unchanged |
|
7 | 7 | echo "remove me" > remove |
|
8 | 8 | echo "copy me" > copy |
|
9 | 9 | echo "move me" > move |
|
10 | 10 | for i in 1 2 3 4 5 6 7 8 9; do |
|
11 | 11 | echo "merge ok $i" >> zzz1_merge_ok |
|
12 | 12 | done |
|
13 | 13 | echo "merge bad" > zzz2_merge_bad |
|
14 |
hg ci -Am "revision 0" |
|
|
14 | hg ci -Am "revision 0" | |
|
15 | 15 | |
|
16 | 16 | echo "# revision 1" |
|
17 | 17 | hg rm remove |
|
18 | 18 | hg mv move moved |
|
19 | 19 | hg cp copy copied |
|
20 | 20 | echo "added" > added |
|
21 | 21 | hg add added |
|
22 | 22 | echo "new first line" > zzz1_merge_ok |
|
23 | 23 | hg cat zzz1_merge_ok >> zzz1_merge_ok |
|
24 | 24 | echo "new last line" >> zzz2_merge_bad |
|
25 |
hg ci -m "revision 1" |
|
|
25 | hg ci -m "revision 1" | |
|
26 | 26 | |
|
27 | 27 | echo "# local changes to revision 0" |
|
28 | 28 | hg co 0 |
|
29 | 29 | echo "new last line" >> zzz1_merge_ok |
|
30 | 30 | echo "another last line" >> zzz2_merge_bad |
|
31 | 31 | hg diff --nodates | grep "^[+-][^<>]" |
|
32 | 32 | hg st |
|
33 | 33 | |
|
34 | 34 | echo "# local merge with bad merge tool" |
|
35 | 35 | HGMERGE=false hg co |
|
36 | 36 | hg co 0 |
|
37 | 37 | hg diff --nodates | grep "^[+-][^<>]" |
|
38 | 38 | hg st |
|
39 | 39 | |
|
40 | 40 | echo "# local merge with conflicts" |
|
41 | 41 | hg co |
|
42 | 42 | hg co 0 |
|
43 | 43 | hg diff --nodates | grep "^[+-][^<>]" |
|
44 | 44 | hg st |
|
45 | 45 | |
|
46 | 46 | echo "# local merge without conflicts" |
|
47 | 47 | hg revert zzz2_merge_bad |
|
48 | 48 | hg co |
|
49 | 49 | hg diff --nodates | grep "^[+-][^<>]" |
|
50 | 50 | hg st |
@@ -1,44 +1,44 b'' | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | 3 | mkdir t |
|
4 | 4 | cd t |
|
5 | 5 | hg init |
|
6 | 6 | echo "added file1" > file1 |
|
7 | 7 | echo "added file2" > file2 |
|
8 | 8 | hg add file1 file2 |
|
9 |
hg commit -m "added file1 and file2" |
|
|
9 | hg commit -m "added file1 and file2" | |
|
10 | 10 | echo "changed file1" >> file1 |
|
11 |
hg commit -m "changed file1" |
|
|
11 | hg commit -m "changed file1" | |
|
12 | 12 | hg -q log |
|
13 | 13 | hg id |
|
14 | 14 | hg update -C 0 |
|
15 | 15 | hg id |
|
16 | 16 | echo "changed file1" >> file1 |
|
17 | 17 | hg id |
|
18 | 18 | hg revert --all |
|
19 | 19 | hg diff |
|
20 | 20 | hg status |
|
21 | 21 | hg id |
|
22 | 22 | hg update |
|
23 | 23 | hg diff |
|
24 | 24 | hg status |
|
25 | 25 | hg id |
|
26 | 26 | hg update -C 0 |
|
27 | 27 | echo "changed file1" >> file1 |
|
28 | 28 | hg update |
|
29 | 29 | hg diff |
|
30 | 30 | hg status |
|
31 | 31 | hg id |
|
32 | 32 | hg revert --all |
|
33 | 33 | hg diff |
|
34 | 34 | hg status |
|
35 | 35 | hg id |
|
36 | 36 | hg revert -r tip --all |
|
37 | 37 | hg diff |
|
38 | 38 | hg status |
|
39 | 39 | hg id |
|
40 | 40 | hg update -C |
|
41 | 41 | hg diff |
|
42 | 42 | hg status |
|
43 | 43 | hg id |
|
44 | 44 |
@@ -1,23 +1,23 b'' | |||
|
1 | 1:016807e6fdaf | |
|
2 | 0:eb43f19ff115 | |
|
3 | 016807e6fdaf tip | |
|
1 | 1:08a16e8e4408 | |
|
2 | 0:d29c767a4b52 | |
|
3 | 08a16e8e4408 tip | |
|
4 | 4 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
5 | eb43f19ff115 | |
|
6 | eb43f19ff115+ | |
|
5 | d29c767a4b52 | |
|
6 | d29c767a4b52+ | |
|
7 | 7 | reverting file1 |
|
8 | 8 | ? file1.orig |
|
9 | eb43f19ff115 | |
|
9 | d29c767a4b52 | |
|
10 | 10 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
11 | 11 | ? file1.orig |
|
12 | 016807e6fdaf tip | |
|
12 | 08a16e8e4408 tip | |
|
13 | 13 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
14 | 14 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
15 | 15 | ? file1.orig |
|
16 | 016807e6fdaf tip | |
|
16 | 08a16e8e4408 tip | |
|
17 | 17 | ? file1.orig |
|
18 | 016807e6fdaf tip | |
|
18 | 08a16e8e4408 tip | |
|
19 | 19 | ? file1.orig |
|
20 | 016807e6fdaf tip | |
|
20 | 08a16e8e4408 tip | |
|
21 | 21 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
22 | 22 | ? file1.orig |
|
23 | 016807e6fdaf tip | |
|
23 | 08a16e8e4408 tip |
@@ -1,45 +1,45 b'' | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | 3 | mkdir t |
|
4 | 4 | cd t |
|
5 | 5 | hg init |
|
6 | 6 | echo "added file1" > file1 |
|
7 | 7 | echo "another line of text" >> file1 |
|
8 | 8 | echo "added file2" > file2 |
|
9 | 9 | hg add file1 file2 |
|
10 |
hg commit -m "added file1 and file2" |
|
|
10 | hg commit -m "added file1 and file2" | |
|
11 | 11 | echo "changed file1" >> file1 |
|
12 |
hg commit -m "changed file1" |
|
|
12 | hg commit -m "changed file1" | |
|
13 | 13 | hg -q log |
|
14 | 14 | hg id |
|
15 | 15 | hg update -C 0 |
|
16 | 16 | hg id |
|
17 | 17 | echo "changed file1" >> file1 |
|
18 | 18 | hg id |
|
19 | 19 | hg revert --no-backup --all |
|
20 | 20 | hg diff |
|
21 | 21 | hg status |
|
22 | 22 | hg id |
|
23 | 23 | hg update |
|
24 | 24 | hg diff |
|
25 | 25 | hg status |
|
26 | 26 | hg id |
|
27 | 27 | hg update -C 0 |
|
28 | 28 | echo "changed file1 different" >> file1 |
|
29 | 29 | hg update |
|
30 | 30 | hg diff --nodates |
|
31 | 31 | hg status |
|
32 | 32 | hg id |
|
33 | 33 | hg revert --no-backup --all |
|
34 | 34 | hg diff |
|
35 | 35 | hg status |
|
36 | 36 | hg id |
|
37 | 37 | hg revert -r tip --no-backup --all |
|
38 | 38 | hg diff |
|
39 | 39 | hg status |
|
40 | 40 | hg id |
|
41 | 41 | hg update -C |
|
42 | 42 | hg diff |
|
43 | 43 | hg status |
|
44 | 44 | hg id |
|
45 | 45 |
@@ -1,38 +1,38 b'' | |||
|
1 | 1:f248da0d4c3e | |
|
2 | 0:9eca13a34789 | |
|
3 | f248da0d4c3e tip | |
|
1 | 1:dfab7f3c2efb | |
|
2 | 0:c3fa057dd86f | |
|
3 | dfab7f3c2efb tip | |
|
4 | 4 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
5 | 9eca13a34789 | |
|
6 | 9eca13a34789+ | |
|
5 | c3fa057dd86f | |
|
6 | c3fa057dd86f+ | |
|
7 | 7 | reverting file1 |
|
8 | 9eca13a34789 | |
|
8 | c3fa057dd86f | |
|
9 | 9 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
10 | f248da0d4c3e tip | |
|
10 | dfab7f3c2efb tip | |
|
11 | 11 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
12 | 12 | merging file1 |
|
13 | 13 | warning: conflicts during merge. |
|
14 | 14 | merging file1 failed! |
|
15 | 15 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
16 | 16 | use 'hg resolve' to retry unresolved file merges |
|
17 |
diff -r |
|
|
17 | diff -r dfab7f3c2efb file1 | |
|
18 | 18 | --- a/file1 |
|
19 | 19 | +++ b/file1 |
|
20 | 20 | @@ -1,3 +1,7 @@ |
|
21 | 21 | added file1 |
|
22 | 22 | another line of text |
|
23 | 23 | +<<<<<<< local |
|
24 | 24 | +changed file1 different |
|
25 | 25 | +======= |
|
26 | 26 | changed file1 |
|
27 | 27 | +>>>>>>> other |
|
28 | 28 | M file1 |
|
29 | 29 | ? file1.orig |
|
30 | f248da0d4c3e+ tip | |
|
30 | dfab7f3c2efb+ tip | |
|
31 | 31 | reverting file1 |
|
32 | 32 | ? file1.orig |
|
33 | f248da0d4c3e tip | |
|
33 | dfab7f3c2efb tip | |
|
34 | 34 | ? file1.orig |
|
35 | f248da0d4c3e tip | |
|
35 | dfab7f3c2efb tip | |
|
36 | 36 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
37 | 37 | ? file1.orig |
|
38 | f248da0d4c3e tip | |
|
38 | dfab7f3c2efb tip |
@@ -1,197 +1,197 b'' | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | 3 | # test merge-tools configuration - mostly exercising filemerge.py |
|
4 | 4 | |
|
5 | 5 | unset HGMERGE # make sure HGMERGE doesn't interfere with the test |
|
6 | 6 | |
|
7 | 7 | hg init |
|
8 | 8 | |
|
9 | 9 | echo "# revision 0" |
|
10 | 10 | echo "revision 0" > f |
|
11 | 11 | echo "space" >> f |
|
12 |
hg commit -Am "revision 0" |
|
|
12 | hg commit -Am "revision 0" | |
|
13 | 13 | |
|
14 | 14 | echo "# revision 1" |
|
15 | 15 | echo "revision 1" > f |
|
16 | 16 | echo "space" >> f |
|
17 |
hg commit -Am "revision 1" |
|
|
17 | hg commit -Am "revision 1" | |
|
18 | 18 | |
|
19 | 19 | hg update 0 > /dev/null |
|
20 | 20 | echo "# revision 2" |
|
21 | 21 | echo "revision 2" > f |
|
22 | 22 | echo "space" >> f |
|
23 |
hg commit -Am "revision 2" |
|
|
23 | hg commit -Am "revision 2" | |
|
24 | 24 | |
|
25 | 25 | hg update 0 > /dev/null |
|
26 | 26 | echo "# revision 3 - simple to merge" |
|
27 | 27 | echo "revision 3" >> f |
|
28 |
hg commit -Am "revision 3" |
|
|
28 | hg commit -Am "revision 3" | |
|
29 | 29 | |
|
30 | 30 | |
|
31 | 31 | echo "[merge-tools]" > .hg/hgrc |
|
32 | 32 | echo |
|
33 | 33 | |
|
34 | 34 | beforemerge() { |
|
35 | 35 | cat .hg/hgrc |
|
36 | 36 | echo "# hg update -C 1" |
|
37 | 37 | hg update -C 1 > /dev/null |
|
38 | 38 | } |
|
39 | 39 | |
|
40 | 40 | aftermerge() { |
|
41 | 41 | echo "# cat f" |
|
42 | 42 | cat f |
|
43 | 43 | echo "# hg stat" |
|
44 | 44 | hg stat |
|
45 | 45 | rm -f f.orig |
|
46 | 46 | echo |
|
47 | 47 | } |
|
48 | 48 | |
|
49 | 49 | domerge() { |
|
50 | 50 | beforemerge |
|
51 | 51 | echo "# hg merge $*" |
|
52 | 52 | hg merge $* |
|
53 | 53 | aftermerge |
|
54 | 54 | } |
|
55 | 55 | |
|
56 | 56 | echo |
|
57 | 57 | echo Tool selection |
|
58 | 58 | echo |
|
59 | 59 | |
|
60 | 60 | echo "# default is internal merge:" |
|
61 | 61 | beforemerge |
|
62 | 62 | echo "# hg merge -r 2" |
|
63 | 63 | # override $PATH to ensure hgmerge not visible; use $PYTHON in case we're |
|
64 | 64 | # running from a devel copy, not a temp installation |
|
65 | 65 | PATH="$BINDIR" $PYTHON "$BINDIR"/hg merge -r 2 |
|
66 | 66 | aftermerge |
|
67 | 67 | |
|
68 | 68 | echo "# simplest hgrc using false for merge:" |
|
69 | 69 | echo "false.whatever=" >> .hg/hgrc |
|
70 | 70 | domerge -r 2 |
|
71 | 71 | |
|
72 | 72 | echo "# true with higher .priority gets precedence:" |
|
73 | 73 | echo "true.priority=1" >> .hg/hgrc |
|
74 | 74 | domerge -r 2 |
|
75 | 75 | |
|
76 | 76 | echo "# unless lowered on command line:" |
|
77 | 77 | domerge -r 2 --config merge-tools.true.priority=-7 |
|
78 | 78 | |
|
79 | 79 | echo "# or false set higher on command line:" |
|
80 | 80 | domerge -r 2 --config merge-tools.false.priority=117 |
|
81 | 81 | |
|
82 | 82 | echo "# or true.executable not found in PATH:" |
|
83 | 83 | domerge -r 2 --config merge-tools.true.executable=nonexistingmergetool |
|
84 | 84 | |
|
85 | 85 | echo "# or true.executable with bogus path:" |
|
86 | 86 | domerge -r 2 --config merge-tools.true.executable=/nonexisting/mergetool |
|
87 | 87 | |
|
88 | 88 | echo "# but true.executable set to cat found in PATH works:" |
|
89 | 89 | echo "true.executable=cat" >> .hg/hgrc |
|
90 | 90 | domerge -r 2 |
|
91 | 91 | |
|
92 | 92 | echo "# and true.executable set to cat with path works:" |
|
93 | 93 | domerge -r 2 --config merge-tools.true.executable=cat |
|
94 | 94 | |
|
95 | 95 | echo |
|
96 | 96 | echo Tool selection and merge-patterns |
|
97 | 97 | echo |
|
98 | 98 | |
|
99 | 99 | echo "# merge-patterns specifies new tool false:" |
|
100 | 100 | domerge -r 2 --config merge-patterns.f=false |
|
101 | 101 | |
|
102 | 102 | echo "# merge-patterns specifies executable not found in PATH and gets warning:" |
|
103 | 103 | domerge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=nonexistingmergetool |
|
104 | 104 | |
|
105 | 105 | echo "# merge-patterns specifies executable with bogus path and gets warning:" |
|
106 | 106 | domerge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=/nonexisting/mergetool |
|
107 | 107 | |
|
108 | 108 | echo |
|
109 | 109 | echo ui.merge overrules priority |
|
110 | 110 | echo |
|
111 | 111 | |
|
112 | 112 | echo "# ui.merge specifies false:" |
|
113 | 113 | domerge -r 2 --config ui.merge=false |
|
114 | 114 | |
|
115 | 115 | echo "# ui.merge specifies internal:fail:" |
|
116 | 116 | domerge -r 2 --config ui.merge=internal:fail |
|
117 | 117 | |
|
118 | 118 | echo "# ui.merge specifies internal:local:" |
|
119 | 119 | domerge -r 2 --config ui.merge=internal:local |
|
120 | 120 | |
|
121 | 121 | echo "# ui.merge specifies internal:other:" |
|
122 | 122 | domerge -r 2 --config ui.merge=internal:other |
|
123 | 123 | |
|
124 | 124 | echo "# ui.merge specifies internal:prompt:" |
|
125 | 125 | domerge -r 2 --config ui.merge=internal:prompt |
|
126 | 126 | |
|
127 | 127 | echo "# ui.merge specifies internal:dump:" |
|
128 | 128 | domerge -r 2 --config ui.merge=internal:dump |
|
129 | 129 | echo f.base: |
|
130 | 130 | cat f.base |
|
131 | 131 | echo f.local: |
|
132 | 132 | cat f.local |
|
133 | 133 | echo f.other: |
|
134 | 134 | cat f.other |
|
135 | 135 | rm f.base f.local f.other |
|
136 | 136 | echo |
|
137 | 137 | |
|
138 | 138 | echo "# ui.merge specifies internal:other but is overruled by pattern for false:" |
|
139 | 139 | domerge -r 2 --config ui.merge=internal:other --config merge-patterns.f=false |
|
140 | 140 | |
|
141 | 141 | echo |
|
142 | 142 | echo Premerge |
|
143 | 143 | echo |
|
144 | 144 | |
|
145 | 145 | echo "# Default is silent simplemerge:" |
|
146 | 146 | domerge -r 3 |
|
147 | 147 | |
|
148 | 148 | echo "# .premerge=True is same:" |
|
149 | 149 | domerge -r 3 --config merge-tools.true.premerge=True |
|
150 | 150 | |
|
151 | 151 | echo "# .premerge=False executes merge-tool:" |
|
152 | 152 | domerge -r 3 --config merge-tools.true.premerge=False |
|
153 | 153 | |
|
154 | 154 | |
|
155 | 155 | echo |
|
156 | 156 | echo Tool execution |
|
157 | 157 | echo |
|
158 | 158 | |
|
159 | 159 | echo '# set tools.args explicit to include $base $local $other $output:' # default '$local $base $other' |
|
160 | 160 | beforemerge |
|
161 | 161 | hg merge -r 2 --config merge-tools.true.executable=head --config merge-tools.true.args='$base $local $other $output' \ |
|
162 | 162 | | sed 's,==> .* <==,==> ... <==,g' |
|
163 | 163 | aftermerge |
|
164 | 164 | |
|
165 | 165 | echo '# Merge with "echo mergeresult > $local":' |
|
166 | 166 | beforemerge |
|
167 | 167 | hg merge -r 2 --config merge-tools.true.executable=echo --config merge-tools.true.args='mergeresult > $local' |
|
168 | 168 | aftermerge |
|
169 | 169 | |
|
170 | 170 | echo '# - and $local is the file f:' |
|
171 | 171 | beforemerge |
|
172 | 172 | hg merge -r 2 --config merge-tools.true.executable=echo --config merge-tools.true.args='mergeresult > f' |
|
173 | 173 | aftermerge |
|
174 | 174 | |
|
175 | 175 | echo '# Merge with "echo mergeresult > $output" - the variable is a bit magic:' |
|
176 | 176 | beforemerge |
|
177 | 177 | hg merge -r 2 --config merge-tools.true.executable=echo --config merge-tools.true.args='mergeresult > $output' |
|
178 | 178 | aftermerge |
|
179 | 179 | |
|
180 | 180 | echo '# Merge using tool with a path that must be quoted:' |
|
181 | 181 | beforemerge |
|
182 | 182 | cat <<EOF > 'my merge tool' |
|
183 | 183 | #!/bin/sh |
|
184 | 184 | cat "\$1" "\$2" "\$3" > "\$4" |
|
185 | 185 | EOF |
|
186 | 186 | chmod +x 'my merge tool' |
|
187 | 187 | hg merge -r 2 --config merge-tools.true.executable='./my merge tool' --config merge-tools.true.args='$base $local $other $output' |
|
188 | 188 | rm -f 'my merge tool' |
|
189 | 189 | aftermerge |
|
190 | 190 | |
|
191 | 191 | |
|
192 | 192 | echo |
|
193 | 193 | echo Merge post-processing |
|
194 | 194 | echo |
|
195 | 195 | |
|
196 | 196 | echo "# cat is a bad merge-tool and doesn't change:" |
|
197 | 197 | domerge -y -r 2 --config merge-tools.true.checkchanged=1 |
@@ -1,165 +1,165 b'' | |||
|
1 | 1 | $ cat <<EOF > merge |
|
2 | 2 | > import sys, os |
|
3 | 3 | > |
|
4 | 4 | > try: |
|
5 | 5 | > import msvcrt |
|
6 | 6 | > msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY) |
|
7 | 7 | > msvcrt.setmode(sys.stderr.fileno(), os.O_BINARY) |
|
8 | 8 | > except ImportError: |
|
9 | 9 | > pass |
|
10 | 10 | > |
|
11 | 11 | > print "merging for", os.path.basename(sys.argv[1]) |
|
12 | 12 | > EOF |
|
13 | 13 | $ HGMERGE="python ../merge"; export HGMERGE |
|
14 | 14 | |
|
15 | 15 | $ mkdir t |
|
16 | 16 | $ cd t |
|
17 | 17 | $ hg init |
|
18 | 18 | $ echo This is file a1 > a |
|
19 | 19 | $ hg add a |
|
20 |
$ hg commit -m "commit #0" |
|
|
20 | $ hg commit -m "commit #0" | |
|
21 | 21 | $ echo This is file b1 > b |
|
22 | 22 | $ hg add b |
|
23 |
$ hg commit -m "commit #1" |
|
|
23 | $ hg commit -m "commit #1" | |
|
24 | 24 | |
|
25 | 25 | $ hg update 0 |
|
26 | 26 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
27 | 27 | $ echo This is file c1 > c |
|
28 | 28 | $ hg add c |
|
29 |
$ hg commit -m "commit #2" |
|
|
29 | $ hg commit -m "commit #2" | |
|
30 | 30 | created new head |
|
31 | 31 | $ echo This is file b1 > b |
|
32 | 32 | no merges expected |
|
33 | 33 | $ hg merge -P 1 |
|
34 |
changeset: 1: |
|
|
34 | changeset: 1:b8bb4a988f25 | |
|
35 | 35 | user: test |
|
36 |
date: |
|
|
36 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
37 | 37 | summary: commit #1 |
|
38 | 38 | |
|
39 | 39 | $ hg merge 1 |
|
40 | 40 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
41 | 41 | (branch merge, don't forget to commit) |
|
42 | 42 | $ hg diff --nodates |
|
43 |
diff -r |
|
|
43 | diff -r 49035e18a8e6 b | |
|
44 | 44 | --- /dev/null |
|
45 | 45 | +++ b/b |
|
46 | 46 | @@ -0,0 +1,1 @@ |
|
47 | 47 | +This is file b1 |
|
48 | 48 | $ hg status |
|
49 | 49 | M b |
|
50 | 50 | $ cd ..; rm -r t |
|
51 | 51 | |
|
52 | 52 | $ mkdir t |
|
53 | 53 | $ cd t |
|
54 | 54 | $ hg init |
|
55 | 55 | $ echo This is file a1 > a |
|
56 | 56 | $ hg add a |
|
57 |
$ hg commit -m "commit #0" |
|
|
57 | $ hg commit -m "commit #0" | |
|
58 | 58 | $ echo This is file b1 > b |
|
59 | 59 | $ hg add b |
|
60 |
$ hg commit -m "commit #1" |
|
|
60 | $ hg commit -m "commit #1" | |
|
61 | 61 | |
|
62 | 62 | $ hg update 0 |
|
63 | 63 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
64 | 64 | $ echo This is file c1 > c |
|
65 | 65 | $ hg add c |
|
66 |
$ hg commit -m "commit #2" |
|
|
66 | $ hg commit -m "commit #2" | |
|
67 | 67 | created new head |
|
68 | 68 | $ echo This is file b2 > b |
|
69 | 69 | merge should fail |
|
70 | 70 | $ hg merge 1 |
|
71 | 71 | abort: untracked file in working directory differs from file in requested revision: 'b' |
|
72 | 72 | merge of b expected |
|
73 | 73 | $ hg merge -f 1 |
|
74 | 74 | merging for b |
|
75 | 75 | merging b |
|
76 | 76 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
77 | 77 | (branch merge, don't forget to commit) |
|
78 | 78 | $ hg diff --nodates |
|
79 |
diff -r |
|
|
79 | diff -r 49035e18a8e6 b | |
|
80 | 80 | --- /dev/null |
|
81 | 81 | +++ b/b |
|
82 | 82 | @@ -0,0 +1,1 @@ |
|
83 | 83 | +This is file b2 |
|
84 | 84 | $ hg status |
|
85 | 85 | M b |
|
86 | 86 | $ cd ..; rm -r t |
|
87 | 87 | |
|
88 | 88 | $ mkdir t |
|
89 | 89 | $ cd t |
|
90 | 90 | $ hg init |
|
91 | 91 | $ echo This is file a1 > a |
|
92 | 92 | $ hg add a |
|
93 |
$ hg commit -m "commit #0" |
|
|
93 | $ hg commit -m "commit #0" | |
|
94 | 94 | $ echo This is file b1 > b |
|
95 | 95 | $ hg add b |
|
96 |
$ hg commit -m "commit #1" |
|
|
96 | $ hg commit -m "commit #1" | |
|
97 | 97 | $ echo This is file b22 > b |
|
98 |
$ hg commit -m "commit #2" |
|
|
98 | $ hg commit -m "commit #2" | |
|
99 | 99 | $ hg update 1 |
|
100 | 100 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
101 | 101 | $ echo This is file c1 > c |
|
102 | 102 | $ hg add c |
|
103 |
$ hg commit -m "commit #3" |
|
|
103 | $ hg commit -m "commit #3" | |
|
104 | 104 | created new head |
|
105 | 105 | |
|
106 | 106 | Contents of b should be "this is file b1" |
|
107 | 107 | $ cat b |
|
108 | 108 | This is file b1 |
|
109 | 109 | |
|
110 | 110 | $ echo This is file b22 > b |
|
111 | 111 | merge fails |
|
112 | 112 | $ hg merge 2 |
|
113 | 113 | abort: outstanding uncommitted changes (use 'hg status' to list changes) |
|
114 | 114 | $ echo %% merge expected! |
|
115 | 115 | %% merge expected! |
|
116 | 116 | $ hg merge -f 2 |
|
117 | 117 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
118 | 118 | (branch merge, don't forget to commit) |
|
119 | 119 | $ hg diff --nodates |
|
120 | diff -r c1dd73cbf59f b | |
|
120 | diff -r 85de557015a8 b | |
|
121 | 121 | --- a/b |
|
122 | 122 | +++ b/b |
|
123 | 123 | @@ -1,1 +1,1 @@ |
|
124 | 124 | -This is file b1 |
|
125 | 125 | +This is file b22 |
|
126 | 126 | $ hg status |
|
127 | 127 | M b |
|
128 | 128 | $ cd ..; rm -r t |
|
129 | 129 | |
|
130 | 130 | $ mkdir t |
|
131 | 131 | $ cd t |
|
132 | 132 | $ hg init |
|
133 | 133 | $ echo This is file a1 > a |
|
134 | 134 | $ hg add a |
|
135 |
$ hg commit -m "commit #0" |
|
|
135 | $ hg commit -m "commit #0" | |
|
136 | 136 | $ echo This is file b1 > b |
|
137 | 137 | $ hg add b |
|
138 |
$ hg commit -m "commit #1" |
|
|
138 | $ hg commit -m "commit #1" | |
|
139 | 139 | $ echo This is file b22 > b |
|
140 |
$ hg commit -m "commit #2" |
|
|
140 | $ hg commit -m "commit #2" | |
|
141 | 141 | $ hg update 1 |
|
142 | 142 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
143 | 143 | $ echo This is file c1 > c |
|
144 | 144 | $ hg add c |
|
145 |
$ hg commit -m "commit #3" |
|
|
145 | $ hg commit -m "commit #3" | |
|
146 | 146 | created new head |
|
147 | 147 | $ echo This is file b33 > b |
|
148 | 148 | merge of b should fail |
|
149 | 149 | $ hg merge 2 |
|
150 | 150 | abort: outstanding uncommitted changes (use 'hg status' to list changes) |
|
151 | 151 | merge of b expected |
|
152 | 152 | $ hg merge -f 2 |
|
153 | 153 | merging for b |
|
154 | 154 | merging b |
|
155 | 155 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
156 | 156 | (branch merge, don't forget to commit) |
|
157 | 157 | $ hg diff --nodates |
|
158 | diff -r c1dd73cbf59f b | |
|
158 | diff -r 85de557015a8 b | |
|
159 | 159 | --- a/b |
|
160 | 160 | +++ b/b |
|
161 | 161 | @@ -1,1 +1,1 @@ |
|
162 | 162 | -This is file b1 |
|
163 | 163 | +This is file b33 |
|
164 | 164 | $ hg status |
|
165 | 165 | M b |
@@ -1,51 +1,51 b'' | |||
|
1 | 1 | Test for changeset 9fe267f77f56ff127cf7e65dc15dd9de71ce8ceb |
|
2 | 2 | (merge correctly when all the files in a directory are moved |
|
3 | 3 | but then local changes are added in the same directory) |
|
4 | 4 | |
|
5 | 5 | $ hg init a |
|
6 | 6 | $ cd a |
|
7 | 7 | $ mkdir -p testdir |
|
8 | 8 | $ echo a > testdir/a |
|
9 | 9 | $ hg add testdir/a |
|
10 |
$ hg commit - |
|
|
10 | $ hg commit -m a | |
|
11 | 11 | $ cd .. |
|
12 | 12 | |
|
13 | 13 | $ hg clone a b |
|
14 | 14 | updating to branch default |
|
15 | 15 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
16 | 16 | $ cd a |
|
17 | 17 | $ echo alpha > testdir/a |
|
18 |
$ hg commit - |
|
|
18 | $ hg commit -m remote-change | |
|
19 | 19 | $ cd .. |
|
20 | 20 | |
|
21 | 21 | $ cd b |
|
22 | 22 | $ mkdir testdir/subdir |
|
23 | 23 | $ hg mv testdir/a testdir/subdir/a |
|
24 |
$ hg commit - |
|
|
24 | $ hg commit -m move | |
|
25 | 25 | $ mkdir newdir |
|
26 | 26 | $ echo beta > newdir/beta |
|
27 | 27 | $ hg add newdir/beta |
|
28 |
$ hg commit - |
|
|
28 | $ hg commit -m local-addition | |
|
29 | 29 | $ hg pull ../a |
|
30 | 30 | pulling from ../a |
|
31 | 31 | searching for changes |
|
32 | 32 | adding changesets |
|
33 | 33 | adding manifests |
|
34 | 34 | adding file changes |
|
35 | 35 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
36 | 36 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
37 | 37 | $ hg up -C 2 |
|
38 | 38 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
39 | 39 | $ hg merge |
|
40 | 40 | merging testdir/subdir/a and testdir/a to testdir/subdir/a |
|
41 | 41 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
42 | 42 | (branch merge, don't forget to commit) |
|
43 | 43 | $ hg stat |
|
44 | 44 | M testdir/subdir/a |
|
45 | 45 | $ hg diff --nodates |
|
46 |
diff -r |
|
|
46 | diff -r bc21c9773bfa testdir/subdir/a | |
|
47 | 47 | --- a/testdir/subdir/a |
|
48 | 48 | +++ b/testdir/subdir/a |
|
49 | 49 | @@ -1,1 +1,1 @@ |
|
50 | 50 | -a |
|
51 | 51 | +alpha |
@@ -1,53 +1,53 b'' | |||
|
1 | 1 | $ mkdir t |
|
2 | 2 | $ cd t |
|
3 | 3 | $ hg init |
|
4 | 4 | $ echo This is file a1 > a |
|
5 | 5 | $ hg add a |
|
6 |
$ hg commit -m "commit #0" |
|
|
6 | $ hg commit -m "commit #0" | |
|
7 | 7 | $ echo This is file b1 > b |
|
8 | 8 | $ hg add b |
|
9 |
$ hg commit -m "commit #1" |
|
|
9 | $ hg commit -m "commit #1" | |
|
10 | 10 | $ rm b |
|
11 | 11 | $ hg update 0 |
|
12 | 12 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
13 | 13 | $ echo This is file b2 > b |
|
14 | 14 | $ hg add b |
|
15 |
$ hg commit -m "commit #2" |
|
|
15 | $ hg commit -m "commit #2" | |
|
16 | 16 | created new head |
|
17 | 17 | $ cd ..; rm -r t |
|
18 | 18 | |
|
19 | 19 | $ mkdir t |
|
20 | 20 | $ cd t |
|
21 | 21 | $ hg init |
|
22 | 22 | $ echo This is file a1 > a |
|
23 | 23 | $ hg add a |
|
24 |
$ hg commit -m "commit #0" |
|
|
24 | $ hg commit -m "commit #0" | |
|
25 | 25 | $ echo This is file b1 > b |
|
26 | 26 | $ hg add b |
|
27 |
$ hg commit -m "commit #1" |
|
|
27 | $ hg commit -m "commit #1" | |
|
28 | 28 | $ rm b |
|
29 | 29 | $ hg update 0 |
|
30 | 30 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
31 | 31 | $ echo This is file b2 > b |
|
32 |
$ hg commit -A -m "commit #2" |
|
|
32 | $ hg commit -A -m "commit #2" | |
|
33 | 33 | adding b |
|
34 | 34 | created new head |
|
35 | 35 | $ cd ..; rm -r t |
|
36 | 36 | |
|
37 | 37 | $ mkdir t |
|
38 | 38 | $ cd t |
|
39 | 39 | $ hg init |
|
40 | 40 | $ echo This is file a1 > a |
|
41 | 41 | $ hg add a |
|
42 |
$ hg commit -m "commit #0" |
|
|
42 | $ hg commit -m "commit #0" | |
|
43 | 43 | $ echo This is file b1 > b |
|
44 | 44 | $ hg add b |
|
45 |
$ hg commit -m "commit #1" |
|
|
45 | $ hg commit -m "commit #1" | |
|
46 | 46 | $ rm b |
|
47 | 47 | $ hg remove b |
|
48 | 48 | $ hg update 0 |
|
49 | 49 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
50 | 50 | $ echo This is file b2 > b |
|
51 |
$ hg commit -A -m "commit #2" |
|
|
51 | $ hg commit -A -m "commit #2" | |
|
52 | 52 | adding b |
|
53 | 53 | created new head |
@@ -1,20 +1,20 b'' | |||
|
1 | 1 | $ hg init |
|
2 | 2 | $ echo This is file a1 > a |
|
3 | 3 | $ hg add a |
|
4 |
$ hg commit -m "commit #0" |
|
|
4 | $ hg commit -m "commit #0" | |
|
5 | 5 | $ echo This is file b1 > b |
|
6 | 6 | $ hg add b |
|
7 |
$ hg commit -m "commit #1" |
|
|
7 | $ hg commit -m "commit #1" | |
|
8 | 8 | $ hg update 0 |
|
9 | 9 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
10 | 10 | $ echo This is file c1 > c |
|
11 | 11 | $ hg add c |
|
12 |
$ hg commit -m "commit #2" |
|
|
12 | $ hg commit -m "commit #2" | |
|
13 | 13 | created new head |
|
14 | 14 | $ hg merge 1 |
|
15 | 15 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
16 | 16 | (branch merge, don't forget to commit) |
|
17 | 17 | $ rm b |
|
18 | 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 | 1 | $ cat <<EOF > merge |
|
2 | 2 | > import sys, os |
|
3 | 3 | > print "merging for", os.path.basename(sys.argv[1]) |
|
4 | 4 | > EOF |
|
5 | 5 | $ HGMERGE="python ../merge"; export HGMERGE |
|
6 | 6 | |
|
7 | 7 | $ mkdir A1 |
|
8 | 8 | $ cd A1 |
|
9 | 9 | $ hg init |
|
10 | 10 | $ echo This is file foo1 > foo |
|
11 | 11 | $ echo This is file bar1 > bar |
|
12 | 12 | $ hg add foo bar |
|
13 |
$ hg commit -m "commit text" |
|
|
13 | $ hg commit -m "commit text" | |
|
14 | 14 | |
|
15 | 15 | $ cd .. |
|
16 | 16 | $ hg clone A1 B1 |
|
17 | 17 | updating to branch default |
|
18 | 18 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
19 | 19 | |
|
20 | 20 | $ cd A1 |
|
21 | 21 | $ rm bar |
|
22 | 22 | $ hg remove bar |
|
23 |
$ hg commit -m "commit test" |
|
|
23 | $ hg commit -m "commit test" | |
|
24 | 24 | |
|
25 | 25 | $ cd ../B1 |
|
26 | 26 | $ echo This is file foo22 > foo |
|
27 |
$ hg commit -m "commit test" |
|
|
27 | $ hg commit -m "commit test" | |
|
28 | 28 | |
|
29 | 29 | $ cd .. |
|
30 | 30 | $ hg clone A1 A2 |
|
31 | 31 | updating to branch default |
|
32 | 32 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
33 | 33 | $ hg clone B1 B2 |
|
34 | 34 | updating to branch default |
|
35 | 35 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
36 | 36 | |
|
37 | 37 | $ cd A1 |
|
38 | 38 | $ hg pull ../B1 |
|
39 | 39 | pulling from ../B1 |
|
40 | 40 | searching for changes |
|
41 | 41 | adding changesets |
|
42 | 42 | adding manifests |
|
43 | 43 | adding file changes |
|
44 | 44 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
45 | 45 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
46 | 46 | $ hg merge |
|
47 | 47 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
48 | 48 | (branch merge, don't forget to commit) |
|
49 |
$ hg commit -m "commit test" |
|
|
49 | $ hg commit -m "commit test" | |
|
50 | 50 | bar should remain deleted. |
|
51 | 51 | $ hg manifest --debug |
|
52 | 52 | f9b0e817f6a48de3564c6b2957687c5e7297c5a0 644 foo |
|
53 | 53 | |
|
54 | 54 | $ cd ../B2 |
|
55 | 55 | $ hg pull ../A2 |
|
56 | 56 | pulling from ../A2 |
|
57 | 57 | searching for changes |
|
58 | 58 | adding changesets |
|
59 | 59 | adding manifests |
|
60 | 60 | adding file changes |
|
61 | 61 | added 1 changesets with 0 changes to 0 files (+1 heads) |
|
62 | 62 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
63 | 63 | $ hg merge |
|
64 | 64 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
65 | 65 | (branch merge, don't forget to commit) |
|
66 |
$ hg commit -m "commit test" |
|
|
66 | $ hg commit -m "commit test" | |
|
67 | 67 | bar should remain deleted. |
|
68 | 68 | $ hg manifest --debug |
|
69 | 69 | f9b0e817f6a48de3564c6b2957687c5e7297c5a0 644 foo |
@@ -1,143 +1,143 b'' | |||
|
1 | 1 | initial |
|
2 | 2 | $ hg init test-a |
|
3 | 3 | $ cd test-a |
|
4 | 4 | $ cat >test.txt <<"EOF" |
|
5 | 5 | > 1 |
|
6 | 6 | > 2 |
|
7 | 7 | > 3 |
|
8 | 8 | > EOF |
|
9 | 9 | $ hg add test.txt |
|
10 |
$ hg commit -m "Initial" |
|
|
10 | $ hg commit -m "Initial" | |
|
11 | 11 | |
|
12 | 12 | clone |
|
13 | 13 | $ cd .. |
|
14 | 14 | $ hg clone test-a test-b |
|
15 | 15 | updating to branch default |
|
16 | 16 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
17 | 17 | |
|
18 | 18 | change test-a |
|
19 | 19 | $ cd test-a |
|
20 | 20 | $ cat >test.txt <<"EOF" |
|
21 | 21 | > one |
|
22 | 22 | > two |
|
23 | 23 | > three |
|
24 | 24 | > EOF |
|
25 |
$ hg commit -m "Numbers as words" |
|
|
25 | $ hg commit -m "Numbers as words" | |
|
26 | 26 | |
|
27 | 27 | change test-b |
|
28 | 28 | $ cd ../test-b |
|
29 | 29 | $ cat >test.txt <<"EOF" |
|
30 | 30 | > 1 |
|
31 | 31 | > 2.5 |
|
32 | 32 | > 3 |
|
33 | 33 | > EOF |
|
34 |
$ hg commit -m "2 -> 2.5" |
|
|
34 | $ hg commit -m "2 -> 2.5" | |
|
35 | 35 | |
|
36 | 36 | now pull and merge from test-a |
|
37 | 37 | $ hg pull ../test-a |
|
38 | 38 | pulling from ../test-a |
|
39 | 39 | searching for changes |
|
40 | 40 | adding changesets |
|
41 | 41 | adding manifests |
|
42 | 42 | adding file changes |
|
43 | 43 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
44 | 44 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
45 | 45 | $ hg merge |
|
46 | 46 | merging test.txt |
|
47 | 47 | warning: conflicts during merge. |
|
48 | 48 | merging test.txt failed! |
|
49 | 49 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
50 | 50 | use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon |
|
51 | 51 | resolve conflict |
|
52 | 52 | $ cat >test.txt <<"EOF" |
|
53 | 53 | > one |
|
54 | 54 | > two-point-five |
|
55 | 55 | > three |
|
56 | 56 | > EOF |
|
57 | 57 | $ rm -f *.orig |
|
58 | 58 | $ hg resolve -m test.txt |
|
59 |
$ hg commit -m "Merge 1" |
|
|
59 | $ hg commit -m "Merge 1" | |
|
60 | 60 | |
|
61 | 61 | change test-a again |
|
62 | 62 | $ cd ../test-a |
|
63 | 63 | $ cat >test.txt <<"EOF" |
|
64 | 64 | > one |
|
65 | 65 | > two-point-one |
|
66 | 66 | > three |
|
67 | 67 | > EOF |
|
68 |
$ hg commit -m "two -> two-point-one" |
|
|
68 | $ hg commit -m "two -> two-point-one" | |
|
69 | 69 | |
|
70 | 70 | pull and merge from test-a again |
|
71 | 71 | $ cd ../test-b |
|
72 | 72 | $ hg pull ../test-a |
|
73 | 73 | pulling from ../test-a |
|
74 | 74 | searching for changes |
|
75 | 75 | adding changesets |
|
76 | 76 | adding manifests |
|
77 | 77 | adding file changes |
|
78 | 78 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
79 | 79 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
80 | 80 | $ hg merge --debug |
|
81 | 81 | searching for copies back to rev 1 |
|
82 | 82 | resolving manifests |
|
83 | 83 | overwrite None partial False |
|
84 | ancestor faaea63e63a9 local 451c744aabcc+ remote a070d41e8360 | |
|
84 | ancestor 96b70246a118 local 50c3a7e29886+ remote 40d11a4173a8 | |
|
85 | 85 | test.txt: versions differ -> m |
|
86 | 86 | preserving test.txt for resolve of test.txt |
|
87 | 87 | updating: test.txt 1/1 files (100.00%) |
|
88 | 88 | picked tool 'internal:merge' for test.txt (binary False symlink False) |
|
89 | 89 | merging test.txt |
|
90 |
my test.txt@ |
|
|
90 | my test.txt@50c3a7e29886+ other test.txt@40d11a4173a8 ancestor test.txt@96b70246a118 | |
|
91 | 91 | warning: conflicts during merge. |
|
92 | 92 | merging test.txt failed! |
|
93 | 93 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
94 | 94 | use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon |
|
95 | 95 | |
|
96 | 96 | $ cat test.txt |
|
97 | 97 | one |
|
98 | 98 | <<<<<<< local |
|
99 | 99 | two-point-five |
|
100 | 100 | ======= |
|
101 | 101 | two-point-one |
|
102 | 102 | >>>>>>> other |
|
103 | 103 | three |
|
104 | 104 | |
|
105 | 105 | $ hg debugindex .hg/store/data/test.txt.i |
|
106 | 106 | rev offset length base linkrev nodeid p1 p2 |
|
107 | 107 | 0 0 7 0 0 01365c4cca56 000000000000 000000000000 |
|
108 | 108 | 1 7 9 1 1 7b013192566a 01365c4cca56 000000000000 |
|
109 | 109 | 2 16 15 2 2 8fe46a3eb557 01365c4cca56 000000000000 |
|
110 | 110 | 3 31 27 2 3 fc3148072371 7b013192566a 8fe46a3eb557 |
|
111 | 111 | 4 58 25 4 4 d40249267ae3 8fe46a3eb557 000000000000 |
|
112 | 112 | |
|
113 | 113 | $ hg log |
|
114 |
changeset: 4: |
|
|
114 | changeset: 4:40d11a4173a8 | |
|
115 | 115 | tag: tip |
|
116 |
parent: 2: |
|
|
116 | parent: 2:96b70246a118 | |
|
117 | 117 | user: test |
|
118 |
date: |
|
|
118 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
119 | 119 | summary: two -> two-point-one |
|
120 | 120 | |
|
121 |
changeset: 3: |
|
|
122 |
parent: 1: |
|
|
123 |
parent: 2: |
|
|
121 | changeset: 3:50c3a7e29886 | |
|
122 | parent: 1:d1e159716d41 | |
|
123 | parent: 2:96b70246a118 | |
|
124 | 124 | user: test |
|
125 |
date: |
|
|
125 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
126 | 126 | summary: Merge 1 |
|
127 | 127 | |
|
128 |
changeset: 2: |
|
|
129 |
parent: 0: |
|
|
128 | changeset: 2:96b70246a118 | |
|
129 | parent: 0:b1832b9d912a | |
|
130 | 130 | user: test |
|
131 |
date: |
|
|
131 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
132 | 132 | summary: Numbers as words |
|
133 | 133 | |
|
134 |
changeset: 1: |
|
|
134 | changeset: 1:d1e159716d41 | |
|
135 | 135 | user: test |
|
136 |
date: |
|
|
136 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
137 | 137 | summary: 2 -> 2.5 |
|
138 | 138 | |
|
139 |
changeset: 0: |
|
|
139 | changeset: 0:b1832b9d912a | |
|
140 | 140 | user: test |
|
141 |
date: |
|
|
141 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
142 | 142 | summary: Initial |
|
143 | 143 |
@@ -1,124 +1,124 b'' | |||
|
1 | 1 | $ branches=.hg/branchheads.cache |
|
2 | 2 | $ echo '[extensions]' >> $HGRCPATH |
|
3 | 3 | $ echo 'mq =' >> $HGRCPATH |
|
4 | 4 | |
|
5 | 5 | $ show_branch_cache() |
|
6 | 6 | > { |
|
7 | 7 | > # force cache (re)generation |
|
8 | 8 | > hg log -r does-not-exist 2> /dev/null |
|
9 | 9 | > hg log -r tip --template 'tip: {rev}\n' |
|
10 | 10 | > if [ -f $branches ]; then |
|
11 | 11 | > sort $branches |
|
12 | 12 | > else |
|
13 | 13 | > echo No branch cache |
|
14 | 14 | > fi |
|
15 | 15 | > if [ "$1" = 1 ]; then |
|
16 | 16 | > for b in foo bar; do |
|
17 | 17 | > hg log -r $b --template "branch $b: "'{rev}\n' |
|
18 | 18 | > done |
|
19 | 19 | > fi |
|
20 | 20 | > } |
|
21 | 21 | |
|
22 | 22 | $ hg init a |
|
23 | 23 | $ cd a |
|
24 | 24 | $ hg qinit -c |
|
25 | 25 | |
|
26 | 26 | |
|
27 | 27 | mq patch on an empty repo |
|
28 | 28 | |
|
29 | 29 | $ hg qnew p1 |
|
30 | 30 | $ show_branch_cache |
|
31 | 31 | tip: 0 |
|
32 | 32 | No branch cache |
|
33 | 33 | |
|
34 | 34 | $ echo > pfile |
|
35 | 35 | $ hg add pfile |
|
36 | 36 | $ hg qrefresh -m 'patch 1' |
|
37 | 37 | $ show_branch_cache |
|
38 | 38 | tip: 0 |
|
39 | 39 | No branch cache |
|
40 | 40 | |
|
41 | 41 | some regular revisions |
|
42 | 42 | |
|
43 | 43 | $ hg qpop |
|
44 | 44 | popping p1 |
|
45 | 45 | patch queue now empty |
|
46 | 46 | $ echo foo > foo |
|
47 | 47 | $ hg add foo |
|
48 | 48 | $ echo foo > .hg/branch |
|
49 |
$ hg ci -m 'branch foo' |
|
|
49 | $ hg ci -m 'branch foo' | |
|
50 | 50 | |
|
51 | 51 | $ echo bar > bar |
|
52 | 52 | $ hg add bar |
|
53 | 53 | $ echo bar > .hg/branch |
|
54 |
$ hg ci -m 'branch bar' |
|
|
54 | $ hg ci -m 'branch bar' | |
|
55 | 55 | $ show_branch_cache |
|
56 | 56 | tip: 1 |
|
57 | 3f910abad313ff802d3a23a7529433872df9b3ae 1 | |
|
58 | 3f910abad313ff802d3a23a7529433872df9b3ae bar | |
|
59 | 9539f35bdc80732cc9a3f84e46508f1ed1ec8cff foo | |
|
57 | c229711f16da3d7591f89b1b8d963b79bda22714 1 | |
|
58 | c229711f16da3d7591f89b1b8d963b79bda22714 bar | |
|
59 | dc25e3827021582e979f600811852e36cbe57341 foo | |
|
60 | 60 | |
|
61 | 61 | add some mq patches |
|
62 | 62 | |
|
63 | 63 | $ hg qpush |
|
64 | 64 | applying p1 |
|
65 | 65 | now at: p1 |
|
66 | 66 | $ show_branch_cache |
|
67 | 67 | tip: 2 |
|
68 | 3f910abad313ff802d3a23a7529433872df9b3ae 1 | |
|
69 | 3f910abad313ff802d3a23a7529433872df9b3ae bar | |
|
70 | 9539f35bdc80732cc9a3f84e46508f1ed1ec8cff foo | |
|
68 | c229711f16da3d7591f89b1b8d963b79bda22714 1 | |
|
69 | c229711f16da3d7591f89b1b8d963b79bda22714 bar | |
|
70 | dc25e3827021582e979f600811852e36cbe57341 foo | |
|
71 | 71 | |
|
72 | 72 | $ hg qnew p2 |
|
73 | 73 | $ echo foo > .hg/branch |
|
74 | 74 | $ echo foo2 >> foo |
|
75 | 75 | $ hg qrefresh -m 'patch 2' |
|
76 | 76 | $ show_branch_cache 1 |
|
77 | 77 | tip: 3 |
|
78 | 3f910abad313ff802d3a23a7529433872df9b3ae 1 | |
|
79 | 3f910abad313ff802d3a23a7529433872df9b3ae bar | |
|
80 | 9539f35bdc80732cc9a3f84e46508f1ed1ec8cff foo | |
|
78 | c229711f16da3d7591f89b1b8d963b79bda22714 1 | |
|
79 | c229711f16da3d7591f89b1b8d963b79bda22714 bar | |
|
80 | dc25e3827021582e979f600811852e36cbe57341 foo | |
|
81 | 81 | branch foo: 3 |
|
82 | 82 | branch bar: 2 |
|
83 | 83 | |
|
84 | 84 | removing the cache |
|
85 | 85 | |
|
86 | 86 | $ rm $branches |
|
87 | 87 | $ show_branch_cache 1 |
|
88 | 88 | tip: 3 |
|
89 | 3f910abad313ff802d3a23a7529433872df9b3ae 1 | |
|
90 | 3f910abad313ff802d3a23a7529433872df9b3ae bar | |
|
91 | 9539f35bdc80732cc9a3f84e46508f1ed1ec8cff foo | |
|
89 | c229711f16da3d7591f89b1b8d963b79bda22714 1 | |
|
90 | c229711f16da3d7591f89b1b8d963b79bda22714 bar | |
|
91 | dc25e3827021582e979f600811852e36cbe57341 foo | |
|
92 | 92 | branch foo: 3 |
|
93 | 93 | branch bar: 2 |
|
94 | 94 | |
|
95 | 95 | importing rev 1 (the cache now ends in one of the patches) |
|
96 | 96 | |
|
97 | 97 | $ hg qimport -r 1 -n p0 |
|
98 | 98 | $ show_branch_cache 1 |
|
99 | 99 | tip: 3 |
|
100 | 3f910abad313ff802d3a23a7529433872df9b3ae 1 | |
|
101 | 3f910abad313ff802d3a23a7529433872df9b3ae bar | |
|
102 | 9539f35bdc80732cc9a3f84e46508f1ed1ec8cff foo | |
|
100 | c229711f16da3d7591f89b1b8d963b79bda22714 1 | |
|
101 | c229711f16da3d7591f89b1b8d963b79bda22714 bar | |
|
102 | dc25e3827021582e979f600811852e36cbe57341 foo | |
|
103 | 103 | branch foo: 3 |
|
104 | 104 | branch bar: 2 |
|
105 | 105 | $ hg log -r qbase --template 'qbase: {rev}\n' |
|
106 | 106 | qbase: 1 |
|
107 | 107 | |
|
108 | 108 | detect an invalid cache |
|
109 | 109 | |
|
110 | 110 | $ hg qpop -a |
|
111 | 111 | popping p2 |
|
112 | 112 | popping p1 |
|
113 | 113 | popping p0 |
|
114 | 114 | patch queue now empty |
|
115 | 115 | $ hg qpush -a |
|
116 | 116 | applying p0 |
|
117 | 117 | applying p1 |
|
118 | 118 | applying p2 |
|
119 | 119 | now at: p2 |
|
120 | 120 | $ show_branch_cache |
|
121 | 121 | tip: 3 |
|
122 | 9539f35bdc80732cc9a3f84e46508f1ed1ec8cff 0 | |
|
123 | 9539f35bdc80732cc9a3f84e46508f1ed1ec8cff foo | |
|
122 | dc25e3827021582e979f600811852e36cbe57341 0 | |
|
123 | dc25e3827021582e979f600811852e36cbe57341 foo | |
|
124 | 124 |
@@ -1,113 +1,113 b'' | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | 3 | branchcache=.hg/branchheads.cache |
|
4 | 4 | |
|
5 | 5 | hg init t |
|
6 | 6 | cd t |
|
7 | 7 | hg branches |
|
8 | 8 | |
|
9 | 9 | echo foo > a |
|
10 | 10 | hg add a |
|
11 |
hg ci -m "initial" |
|
|
11 | hg ci -m "initial" | |
|
12 | 12 | hg branch foo |
|
13 | 13 | hg branch |
|
14 |
hg ci -m "add branch name" |
|
|
14 | hg ci -m "add branch name" | |
|
15 | 15 | hg branch bar |
|
16 |
hg ci -m "change branch name" |
|
|
16 | hg ci -m "change branch name" | |
|
17 | 17 | echo % branch shadowing |
|
18 | 18 | hg branch default |
|
19 | 19 | hg branch -f default |
|
20 |
hg ci -m "clear branch name" |
|
|
20 | hg ci -m "clear branch name" | |
|
21 | 21 | |
|
22 | 22 | echo % there should be only one default branch head |
|
23 | 23 | hg heads . |
|
24 | 24 | |
|
25 | 25 | hg co foo |
|
26 | 26 | hg branch |
|
27 | 27 | echo bleah > a |
|
28 |
hg ci -m "modify a branch" |
|
|
28 | hg ci -m "modify a branch" | |
|
29 | 29 | |
|
30 | 30 | hg merge default |
|
31 | 31 | hg branch |
|
32 |
hg ci -m "merge" |
|
|
32 | hg ci -m "merge" | |
|
33 | 33 | hg log |
|
34 | 34 | |
|
35 | 35 | hg branches |
|
36 | 36 | hg branches -q |
|
37 | 37 | |
|
38 | 38 | echo % test for invalid branch cache |
|
39 | 39 | hg rollback |
|
40 | 40 | cp $branchcache .hg/bc-invalid |
|
41 | 41 | hg log -r foo |
|
42 | 42 | cp .hg/bc-invalid $branchcache |
|
43 | 43 | hg --debug log -r foo |
|
44 | 44 | rm $branchcache |
|
45 | 45 | echo corrupted > $branchcache |
|
46 | 46 | hg log -qr foo |
|
47 | 47 | cat $branchcache |
|
48 | 48 | |
|
49 | 49 | echo % push should update the branch cache |
|
50 | 50 | hg init ../target |
|
51 | 51 | echo % pushing just rev 0 |
|
52 | 52 | hg push -qr 0 ../target |
|
53 | 53 | cat ../target/$branchcache |
|
54 | 54 | echo % pushing everything |
|
55 | 55 | hg push -qf ../target |
|
56 | 56 | cat ../target/$branchcache |
|
57 | 57 | |
|
58 | 58 | echo % update with no arguments: tipmost revision of the current branch |
|
59 | 59 | hg up -q -C 0 |
|
60 | 60 | hg up -q |
|
61 | 61 | hg id |
|
62 | 62 | hg up -q 1 |
|
63 | 63 | hg up -q |
|
64 | 64 | hg id |
|
65 | 65 | hg branch foobar |
|
66 | 66 | hg up |
|
67 | 67 | |
|
68 | 68 | echo % fastforward merge |
|
69 | 69 | hg branch ff |
|
70 | 70 | echo ff > ff |
|
71 |
hg ci -Am'fast forward' |
|
|
71 | hg ci -Am'fast forward' | |
|
72 | 72 | hg up foo |
|
73 | 73 | hg merge ff |
|
74 | 74 | hg branch |
|
75 |
hg commit -m'Merge ff into foo' |
|
|
75 | hg commit -m'Merge ff into foo' | |
|
76 | 76 | hg parents |
|
77 | 77 | hg manifest |
|
78 | 78 | |
|
79 | 79 | echo % test merging, add 3 default heads and one test head |
|
80 | 80 | cd .. |
|
81 | 81 | hg init merges |
|
82 | 82 | cd merges |
|
83 | 83 | echo a > a |
|
84 | 84 | hg ci -Ama |
|
85 | 85 | |
|
86 | 86 | echo b > b |
|
87 | 87 | hg ci -Amb |
|
88 | 88 | |
|
89 | 89 | hg up 0 |
|
90 | 90 | echo c > c |
|
91 | 91 | hg ci -Amc |
|
92 | 92 | |
|
93 | 93 | hg up 0 |
|
94 | 94 | echo d > d |
|
95 | 95 | hg ci -Amd |
|
96 | 96 | |
|
97 | 97 | hg up 0 |
|
98 | 98 | hg branch test |
|
99 | 99 | echo e >> e |
|
100 | 100 | hg ci -Ame |
|
101 | 101 | |
|
102 | 102 | hg log |
|
103 | 103 | |
|
104 | 104 | echo % implicit merge with test branch as parent |
|
105 | 105 | hg merge |
|
106 | 106 | hg up -C default |
|
107 | 107 | echo % implicit merge with default branch as parent |
|
108 | 108 | hg merge |
|
109 | 109 | echo % 3 branch heads, explicit merge required |
|
110 | 110 | hg merge 2 |
|
111 | 111 | hg ci -m merge |
|
112 | 112 | echo % 2 branch heads, implicit merge works |
|
113 | 113 | hg merge |
@@ -1,180 +1,180 b'' | |||
|
1 | 1 | marked working directory as branch foo |
|
2 | 2 | foo |
|
3 | 3 | marked working directory as branch bar |
|
4 | 4 | % branch shadowing |
|
5 | 5 | abort: a branch of the same name already exists (use 'hg update' to switch to it) |
|
6 | 6 | marked working directory as branch default |
|
7 | 7 | created new head |
|
8 | 8 | % there should be only one default branch head |
|
9 |
changeset: 3: |
|
|
9 | changeset: 3:9d567d0b51f9 | |
|
10 | 10 | tag: tip |
|
11 | 11 | user: test |
|
12 |
date: |
|
|
12 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
13 | 13 | summary: clear branch name |
|
14 | 14 | |
|
15 | 15 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
16 | 16 | foo |
|
17 | 17 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
18 | 18 | (branch merge, don't forget to commit) |
|
19 | 19 | foo |
|
20 |
changeset: 5: |
|
|
20 | changeset: 5:dc140083783b | |
|
21 | 21 | branch: foo |
|
22 | 22 | tag: tip |
|
23 |
parent: 4: |
|
|
24 |
parent: 3: |
|
|
23 | parent: 4:98d14f698afe | |
|
24 | parent: 3:9d567d0b51f9 | |
|
25 | 25 | user: test |
|
26 |
date: |
|
|
26 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
27 | 27 | summary: merge |
|
28 | 28 | |
|
29 |
changeset: 4: |
|
|
29 | changeset: 4:98d14f698afe | |
|
30 | 30 | branch: foo |
|
31 |
parent: 1: |
|
|
31 | parent: 1:0079f24813e2 | |
|
32 | 32 | user: test |
|
33 |
date: |
|
|
33 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
34 | 34 | summary: modify a branch |
|
35 | 35 | |
|
36 |
changeset: 3: |
|
|
36 | changeset: 3:9d567d0b51f9 | |
|
37 | 37 | user: test |
|
38 |
date: |
|
|
38 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
39 | 39 | summary: clear branch name |
|
40 | 40 | |
|
41 |
changeset: 2: |
|
|
41 | changeset: 2:ed2bbf4e0102 | |
|
42 | 42 | branch: bar |
|
43 | 43 | user: test |
|
44 |
date: |
|
|
44 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
45 | 45 | summary: change branch name |
|
46 | 46 | |
|
47 |
changeset: 1: |
|
|
47 | changeset: 1:0079f24813e2 | |
|
48 | 48 | branch: foo |
|
49 | 49 | user: test |
|
50 |
date: |
|
|
50 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
51 | 51 | summary: add branch name |
|
52 | 52 | |
|
53 |
changeset: 0: |
|
|
53 | changeset: 0:db01e8ea3388 | |
|
54 | 54 | user: test |
|
55 |
date: |
|
|
55 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
56 | 56 | summary: initial |
|
57 | 57 | |
|
58 |
foo 5: |
|
|
59 |
default 3: |
|
|
60 |
bar 2: |
|
|
58 | foo 5:dc140083783b | |
|
59 | default 3:9d567d0b51f9 (inactive) | |
|
60 | bar 2:ed2bbf4e0102 (inactive) | |
|
61 | 61 | foo |
|
62 | 62 | default |
|
63 | 63 | bar |
|
64 | 64 | % test for invalid branch cache |
|
65 | 65 | rolling back to revision 4 (undo commit) |
|
66 |
changeset: 4: |
|
|
66 | changeset: 4:98d14f698afe | |
|
67 | 67 | branch: foo |
|
68 | 68 | tag: tip |
|
69 |
parent: 1: |
|
|
69 | parent: 1:0079f24813e2 | |
|
70 | 70 | user: test |
|
71 |
date: |
|
|
71 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
72 | 72 | summary: modify a branch |
|
73 | 73 | |
|
74 | 74 | invalidating branch cache (tip differs) |
|
75 | changeset: 4:4909a3732169c0c20011c4f4b8fdff4e3d89b23f | |
|
75 | changeset: 4:98d14f698afeaff8cb612dcf215ce95e639effc3 | |
|
76 | 76 | branch: foo |
|
77 | 77 | tag: tip |
|
78 | parent: 1:b699b1cec9c2966b3700de4fef0dc123cd754c31 | |
|
78 | parent: 1:0079f24813e2b73a891577c243684c5066347bc8 | |
|
79 | 79 | parent: -1:0000000000000000000000000000000000000000 |
|
80 | 80 | manifest: 4:d01b250baaa05909152f7ae07d7a649deea0df9a |
|
81 | 81 | user: test |
|
82 |
date: |
|
|
82 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
83 | 83 | files: a |
|
84 | 84 | extra: branch=foo |
|
85 | 85 | description: |
|
86 | 86 | modify a branch |
|
87 | 87 | |
|
88 | 88 | |
|
89 | 4:4909a3732169 | |
|
90 | 4909a3732169c0c20011c4f4b8fdff4e3d89b23f 4 | |
|
91 | bf1bc2f45e834c75404d0ddab57d53beab56e2f8 default | |
|
92 | 4909a3732169c0c20011c4f4b8fdff4e3d89b23f foo | |
|
93 | 67ec16bde7f1575d523313b9bca000f6a6f12dca bar | |
|
89 | 4:98d14f698afe | |
|
90 | 98d14f698afeaff8cb612dcf215ce95e639effc3 4 | |
|
91 | 9d567d0b51f9e2068b054e1948e1a927f99b5874 default | |
|
92 | 98d14f698afeaff8cb612dcf215ce95e639effc3 foo | |
|
93 | ed2bbf4e01029020711be82ca905283e883f0e11 bar | |
|
94 | 94 | % push should update the branch cache |
|
95 | 95 | % pushing just rev 0 |
|
96 | be8523e69bf892e25817fc97187516b3c0804ae4 0 | |
|
97 | be8523e69bf892e25817fc97187516b3c0804ae4 default | |
|
96 | db01e8ea3388fd3c7c94e1436ea2bd6a53d581c5 0 | |
|
97 | db01e8ea3388fd3c7c94e1436ea2bd6a53d581c5 default | |
|
98 | 98 | % pushing everything |
|
99 | 4909a3732169c0c20011c4f4b8fdff4e3d89b23f 4 | |
|
100 | bf1bc2f45e834c75404d0ddab57d53beab56e2f8 default | |
|
101 | 4909a3732169c0c20011c4f4b8fdff4e3d89b23f foo | |
|
102 | 67ec16bde7f1575d523313b9bca000f6a6f12dca bar | |
|
99 | 98d14f698afeaff8cb612dcf215ce95e639effc3 4 | |
|
100 | 9d567d0b51f9e2068b054e1948e1a927f99b5874 default | |
|
101 | 98d14f698afeaff8cb612dcf215ce95e639effc3 foo | |
|
102 | ed2bbf4e01029020711be82ca905283e883f0e11 bar | |
|
103 | 103 | % update with no arguments: tipmost revision of the current branch |
|
104 | bf1bc2f45e83 | |
|
105 | 4909a3732169 (foo) tip | |
|
104 | 9d567d0b51f9 | |
|
105 | 98d14f698afe (foo) tip | |
|
106 | 106 | marked working directory as branch foobar |
|
107 | 107 | abort: branch foobar not found |
|
108 | 108 | % fastforward merge |
|
109 | 109 | marked working directory as branch ff |
|
110 | 110 | adding ff |
|
111 | 111 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
112 | 112 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
113 | 113 | (branch merge, don't forget to commit) |
|
114 | 114 | foo |
|
115 |
changeset: 6: |
|
|
115 | changeset: 6:917eb54e1b4b | |
|
116 | 116 | branch: foo |
|
117 | 117 | tag: tip |
|
118 |
parent: 4: |
|
|
119 |
parent: 5: |
|
|
118 | parent: 4:98d14f698afe | |
|
119 | parent: 5:6683a60370cb | |
|
120 | 120 | user: test |
|
121 |
date: |
|
|
121 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
122 | 122 | summary: Merge ff into foo |
|
123 | 123 | |
|
124 | 124 | a |
|
125 | 125 | ff |
|
126 | 126 | % test merging, add 3 default heads and one test head |
|
127 | 127 | adding a |
|
128 | 128 | adding b |
|
129 | 129 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
130 | 130 | adding c |
|
131 | 131 | created new head |
|
132 | 132 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
133 | 133 | adding d |
|
134 | 134 | created new head |
|
135 | 135 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
136 | 136 | marked working directory as branch test |
|
137 | 137 | adding e |
|
138 | 138 | changeset: 4:3a1e01ed1df4 |
|
139 | 139 | branch: test |
|
140 | 140 | tag: tip |
|
141 | 141 | parent: 0:cb9a9f314b8b |
|
142 | 142 | user: test |
|
143 | 143 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
144 | 144 | summary: e |
|
145 | 145 | |
|
146 | 146 | changeset: 3:980f7dc84c29 |
|
147 | 147 | parent: 0:cb9a9f314b8b |
|
148 | 148 | user: test |
|
149 | 149 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
150 | 150 | summary: d |
|
151 | 151 | |
|
152 | 152 | changeset: 2:d36c0562f908 |
|
153 | 153 | parent: 0:cb9a9f314b8b |
|
154 | 154 | user: test |
|
155 | 155 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
156 | 156 | summary: c |
|
157 | 157 | |
|
158 | 158 | changeset: 1:d2ae7f538514 |
|
159 | 159 | user: test |
|
160 | 160 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
161 | 161 | summary: b |
|
162 | 162 | |
|
163 | 163 | changeset: 0:cb9a9f314b8b |
|
164 | 164 | user: test |
|
165 | 165 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
166 | 166 | summary: a |
|
167 | 167 | |
|
168 | 168 | % implicit merge with test branch as parent |
|
169 | 169 | abort: branch 'test' has one head - please merge with an explicit rev |
|
170 | 170 | (run 'hg heads' to see all heads) |
|
171 | 171 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
172 | 172 | % implicit merge with default branch as parent |
|
173 | 173 | abort: branch 'default' has 3 heads - please merge with an explicit rev |
|
174 | 174 | (run 'hg heads .' to see heads) |
|
175 | 175 | % 3 branch heads, explicit merge required |
|
176 | 176 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
177 | 177 | (branch merge, don't forget to commit) |
|
178 | 178 | % 2 branch heads, implicit merge works |
|
179 | 179 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
180 | 180 | (branch merge, don't forget to commit) |
@@ -1,52 +1,52 b'' | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | # |
|
3 | 3 | # revlog.parseindex must be able to parse the index file even if |
|
4 | 4 | # an index entry is split between two 64k blocks. The ideal test |
|
5 | 5 | # would be to create an index file with inline data where |
|
6 | 6 | # 64k < size < 64k + 64 (64k is the size of the read buffer, 64 is |
|
7 | 7 | # the size of an index entry) and with an index entry starting right |
|
8 | 8 | # before the 64k block boundary, and try to read it. |
|
9 | 9 | # |
|
10 | 10 | # We approximate that by reducing the read buffer to 1 byte. |
|
11 | 11 | # |
|
12 | 12 | |
|
13 | 13 | hg init a |
|
14 | 14 | cd a |
|
15 | 15 | echo abc > foo |
|
16 | 16 | hg add foo |
|
17 |
hg commit -m 'add foo' |
|
|
17 | hg commit -m 'add foo' | |
|
18 | 18 | |
|
19 | 19 | echo >> foo |
|
20 |
hg commit -m 'change foo' |
|
|
20 | hg commit -m 'change foo' | |
|
21 | 21 | hg log -r 0: |
|
22 | 22 | |
|
23 | 23 | cat >> test.py << EOF |
|
24 | 24 | from mercurial import changelog, util |
|
25 | 25 | from mercurial.node import * |
|
26 | 26 | |
|
27 | 27 | class singlebyteread(object): |
|
28 | 28 | def __init__(self, real): |
|
29 | 29 | self.real = real |
|
30 | 30 | |
|
31 | 31 | def read(self, size=-1): |
|
32 | 32 | if size == 65536: |
|
33 | 33 | size = 1 |
|
34 | 34 | return self.real.read(size) |
|
35 | 35 | |
|
36 | 36 | def __getattr__(self, key): |
|
37 | 37 | return getattr(self.real, key) |
|
38 | 38 | |
|
39 | 39 | def opener(*args): |
|
40 | 40 | o = util.opener(*args) |
|
41 | 41 | def wrapper(*a): |
|
42 | 42 | f = o(*a) |
|
43 | 43 | return singlebyteread(f) |
|
44 | 44 | return wrapper |
|
45 | 45 | |
|
46 | 46 | cl = changelog.changelog(opener('.hg/store')) |
|
47 | 47 | print len(cl), 'revisions:' |
|
48 | 48 | for r in cl: |
|
49 | 49 | print short(cl.node(r)) |
|
50 | 50 | EOF |
|
51 | 51 | |
|
52 | 52 | python test.py |
@@ -1,14 +1,14 b'' | |||
|
1 |
changeset: 0: |
|
|
1 | changeset: 0:7c31755bf9b5 | |
|
2 | 2 | user: test |
|
3 |
date: |
|
|
3 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
4 | 4 | summary: add foo |
|
5 | 5 | |
|
6 |
changeset: 1: |
|
|
6 | changeset: 1:26333235a41c | |
|
7 | 7 | tag: tip |
|
8 | 8 | user: test |
|
9 |
date: |
|
|
9 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
10 | 10 | summary: change foo |
|
11 | 11 | |
|
12 | 12 | 2 revisions: |
|
13 | 9c2cf2b35aa7 | |
|
14 | 3756a9556b89 | |
|
13 | 7c31755bf9b5 | |
|
14 | 26333235a41c |
@@ -1,37 +1,37 b'' | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | 3 | echo '% hg init t' |
|
4 | 4 | hg init t |
|
5 | 5 | cd t |
|
6 | 6 | echo foo > a |
|
7 | 7 | echo '% hg add a' |
|
8 | 8 | hg add a |
|
9 | 9 | echo '% hg commit' |
|
10 |
hg commit -m "1" |
|
|
10 | hg commit -m "1" | |
|
11 | 11 | echo '% hg verify' |
|
12 | 12 | hg verify |
|
13 | 13 | chmod -r .hg/store/data/a.i |
|
14 | 14 | echo '% hg verify' |
|
15 | 15 | hg verify 2>/dev/null || echo verify failed |
|
16 | 16 | chmod +r .hg/store/data/a.i |
|
17 | 17 | echo '% hg verify' |
|
18 | 18 | hg verify 2>/dev/null || echo verify failed |
|
19 | 19 | chmod -w .hg/store/data/a.i |
|
20 | 20 | echo barber > a |
|
21 | 21 | echo '% hg commit' |
|
22 |
hg commit -m "2" |
|
|
22 | hg commit -m "2" 2>/dev/null || echo commit failed | |
|
23 | 23 | chmod -w . |
|
24 | 24 | echo '% hg diff' |
|
25 | 25 | hg diff --nodates |
|
26 | 26 | chmod +w . |
|
27 | 27 | |
|
28 | 28 | chmod +w .hg/store/data/a.i |
|
29 | 29 | mkdir dir |
|
30 | 30 | touch dir/a |
|
31 | 31 | echo '% hg status' |
|
32 | 32 | hg status |
|
33 | 33 | chmod -rx dir |
|
34 | 34 | echo '% hg status' |
|
35 | 35 | hg status |
|
36 | 36 | # reenable perm to allow deletion |
|
37 | 37 | chmod +rx dir |
@@ -1,36 +1,36 b'' | |||
|
1 | 1 | % hg init t |
|
2 | 2 | % hg add a |
|
3 | 3 | % hg commit |
|
4 | 4 | % hg verify |
|
5 | 5 | checking changesets |
|
6 | 6 | checking manifests |
|
7 | 7 | crosschecking files in changesets and manifests |
|
8 | 8 | checking files |
|
9 | 9 | 1 files, 1 changesets, 1 total revisions |
|
10 | 10 | % hg verify |
|
11 | 11 | checking changesets |
|
12 | 12 | checking manifests |
|
13 | 13 | crosschecking files in changesets and manifests |
|
14 | 14 | checking files |
|
15 | 15 | verify failed |
|
16 | 16 | % hg verify |
|
17 | 17 | checking changesets |
|
18 | 18 | checking manifests |
|
19 | 19 | crosschecking files in changesets and manifests |
|
20 | 20 | checking files |
|
21 | 21 | 1 files, 1 changesets, 1 total revisions |
|
22 | 22 | % hg commit |
|
23 | 23 | commit failed |
|
24 | 24 | % hg diff |
|
25 | diff -r c1fab96507ef a | |
|
25 | diff -r 2a18120dc1c9 a | |
|
26 | 26 | --- a/a |
|
27 | 27 | +++ b/a |
|
28 | 28 | @@ -1,1 +1,1 @@ |
|
29 | 29 | -foo |
|
30 | 30 | +barber |
|
31 | 31 | % hg status |
|
32 | 32 | M a |
|
33 | 33 | ? dir/a |
|
34 | 34 | % hg status |
|
35 | 35 | dir: Permission denied |
|
36 | 36 | M a |
@@ -1,19 +1,19 b'' | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | 3 | mkdir a |
|
4 | 4 | cd a |
|
5 | 5 | hg init |
|
6 | 6 | echo foo > b |
|
7 | 7 | hg add b |
|
8 |
hg ci -m "b" |
|
|
8 | hg ci -m "b" | |
|
9 | 9 | |
|
10 | 10 | chmod -w .hg/store |
|
11 | 11 | |
|
12 | 12 | cd .. |
|
13 | 13 | |
|
14 | 14 | hg clone a b |
|
15 | 15 | |
|
16 | 16 | chmod +w a/.hg/store # let test clean up |
|
17 | 17 | |
|
18 | 18 | cd b |
|
19 | 19 | hg verify |
@@ -1,317 +1,317 b'' | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | 3 | echo "[extensions]" >> $HGRCPATH |
|
4 | 4 | echo "graphlog=" >> $HGRCPATH |
|
5 | 5 | |
|
6 | 6 | mkdir a |
|
7 | 7 | cd a |
|
8 | 8 | hg init |
|
9 | 9 | echo foo > t1 |
|
10 | 10 | hg add t1 |
|
11 |
hg commit -m "1" |
|
|
11 | hg commit -m "1" | |
|
12 | 12 | |
|
13 | 13 | cd .. |
|
14 | 14 | hg clone a b |
|
15 | 15 | |
|
16 | 16 | cd a |
|
17 | 17 | echo foo > t2 |
|
18 | 18 | hg add t2 |
|
19 |
hg commit -m "2" |
|
|
19 | hg commit -m "2" | |
|
20 | 20 | |
|
21 | 21 | cd ../b |
|
22 | 22 | echo foo > t3 |
|
23 | 23 | hg add t3 |
|
24 |
hg commit -m "3" |
|
|
24 | hg commit -m "3" | |
|
25 | 25 | |
|
26 | 26 | hg push ../a |
|
27 | 27 | hg pull ../a |
|
28 | 28 | hg push ../a |
|
29 | 29 | hg merge |
|
30 |
hg commit -m "4" |
|
|
30 | hg commit -m "4" | |
|
31 | 31 | hg push ../a |
|
32 | 32 | cd .. |
|
33 | 33 | |
|
34 | 34 | hg init c |
|
35 | 35 | cd c |
|
36 | 36 | for i in 0 1 2; do |
|
37 | 37 | echo $i >> foo |
|
38 |
hg ci -Am $i |
|
|
38 | hg ci -Am $i | |
|
39 | 39 | done |
|
40 | 40 | cd .. |
|
41 | 41 | |
|
42 | 42 | hg clone c d |
|
43 | 43 | cd d |
|
44 | 44 | for i in 0 1; do |
|
45 | 45 | hg co -C $i |
|
46 | 46 | echo d-$i >> foo |
|
47 |
hg ci -m d-$i |
|
|
47 | hg ci -m d-$i | |
|
48 | 48 | done |
|
49 | 49 | |
|
50 | 50 | HGMERGE=true hg merge 3 |
|
51 |
hg ci -m c-d |
|
|
51 | hg ci -m c-d | |
|
52 | 52 | |
|
53 | 53 | hg push ../c; echo $? |
|
54 | 54 | hg push -r 2 ../c; echo $? |
|
55 | 55 | hg push -r 3 ../c; echo $? |
|
56 | 56 | hg push -r 3 -r 4 ../c; echo $? |
|
57 | 57 | hg push -f -r 3 -r 4 ../c; echo $? |
|
58 | 58 | hg push -r 5 ../c; echo $? |
|
59 | 59 | hg in ../c |
|
60 | 60 | |
|
61 | 61 | echo % issue 450 |
|
62 | 62 | hg init ../e |
|
63 | 63 | hg push -r 0 ../e ; echo $? |
|
64 | 64 | hg push -r 1 ../e ; echo $? |
|
65 | 65 | |
|
66 | 66 | cd .. |
|
67 | 67 | |
|
68 | 68 | echo % issue 736 |
|
69 | 69 | hg init f |
|
70 | 70 | cd f |
|
71 | 71 | hg -q branch a |
|
72 | 72 | echo 0 > foo |
|
73 |
hg -q ci - |
|
|
73 | hg -q ci -Am 0 | |
|
74 | 74 | echo 1 > foo |
|
75 |
hg -q ci - |
|
|
75 | hg -q ci -m 1 | |
|
76 | 76 | hg -q up 0 |
|
77 | 77 | echo 2 > foo |
|
78 |
hg -q ci - |
|
|
78 | hg -q ci -m 2 | |
|
79 | 79 | hg -q up 0 |
|
80 | 80 | hg -q branch b |
|
81 | 81 | echo 3 > foo |
|
82 |
hg -q ci - |
|
|
82 | hg -q ci -m 3 | |
|
83 | 83 | cd .. |
|
84 | 84 | |
|
85 | 85 | hg -q clone f g |
|
86 | 86 | cd g |
|
87 | 87 | |
|
88 | 88 | echo % push on existing branch and new branch |
|
89 | 89 | hg -q up 1 |
|
90 | 90 | echo 4 > foo |
|
91 |
hg -q ci - |
|
|
91 | hg -q ci -m 4 | |
|
92 | 92 | hg -q up 0 |
|
93 | 93 | echo 5 > foo |
|
94 | 94 | hg -q branch c |
|
95 |
hg -q ci - |
|
|
95 | hg -q ci -m 5 | |
|
96 | 96 | hg push ../f; echo $? |
|
97 | 97 | hg push -r 4 -r 5 ../f; echo $? |
|
98 | 98 | |
|
99 | 99 | echo % multiple new branches |
|
100 | 100 | hg -q branch d |
|
101 | 101 | echo 6 > foo |
|
102 |
hg -q ci - |
|
|
102 | hg -q ci -m 6 | |
|
103 | 103 | hg push ../f; echo $? |
|
104 | 104 | hg push -r 4 -r 6 ../f; echo $? |
|
105 | 105 | cd ../g |
|
106 | 106 | |
|
107 | 107 | echo % fail on multiple head push |
|
108 | 108 | hg -q up 1 |
|
109 | 109 | echo 7 > foo |
|
110 |
hg -q ci - |
|
|
110 | hg -q ci -m 7 | |
|
111 | 111 | hg push -r 4 -r 7 ../f; echo $? |
|
112 | 112 | |
|
113 | 113 | echo % push replacement head on existing branches |
|
114 | 114 | hg -q up 3 |
|
115 | 115 | echo 8 > foo |
|
116 |
hg -q ci - |
|
|
116 | hg -q ci -m 8 | |
|
117 | 117 | hg push -r 7 -r 8 ../f; echo $? |
|
118 | 118 | |
|
119 | 119 | echo % merge of branch a to other branch b followed by unrelated push on branch a |
|
120 | 120 | hg -q up 7 |
|
121 | 121 | HGMERGE=true hg -q merge 8 |
|
122 |
hg -q ci - |
|
|
122 | hg -q ci -m 9 | |
|
123 | 123 | hg -q up 8 |
|
124 | 124 | echo 10 > foo |
|
125 |
hg -q ci - |
|
|
125 | hg -q ci -m 10 | |
|
126 | 126 | hg push -r 9 ../f; echo $? |
|
127 | 127 | hg push -r 10 ../f; echo $? |
|
128 | 128 | |
|
129 | 129 | echo % cheating the counting algorithm |
|
130 | 130 | hg -q up 9 |
|
131 | 131 | HGMERGE=true hg -q merge 2 |
|
132 |
hg -q ci - |
|
|
132 | hg -q ci -m 11 | |
|
133 | 133 | hg -q up 1 |
|
134 | 134 | echo 12 > foo |
|
135 |
hg -q ci - |
|
|
135 | hg -q ci -m 12 | |
|
136 | 136 | hg push -r 11 -r 12 ../f; echo $? |
|
137 | 137 | |
|
138 | 138 | echo % failed push of new named branch |
|
139 | 139 | echo 12 > foo |
|
140 |
hg -q ci - |
|
|
140 | hg -q ci -m 12a | |
|
141 | 141 | hg -q up 11 |
|
142 | 142 | echo 13 > foo |
|
143 | 143 | hg -q branch e |
|
144 |
hg -q ci - |
|
|
144 | hg -q ci -m 13d | |
|
145 | 145 | hg push -r 12 -r 13 ../f; echo $? |
|
146 | 146 | |
|
147 | 147 | echo % using --new-branch to push new named branch |
|
148 | 148 | hg push --new-branch -r 12 -r 13 ../f; echo $? |
|
149 | 149 | |
|
150 | 150 | echo % checking prepush logic does not allow silently pushing multiple new heads |
|
151 | 151 | cd .. |
|
152 | 152 | hg init h |
|
153 | 153 | echo init > h/init |
|
154 | 154 | hg -R h ci -Am init |
|
155 | 155 | echo a > h/a |
|
156 | 156 | hg -R h ci -Am a |
|
157 | 157 | hg clone h i |
|
158 | 158 | hg -R h up 0 |
|
159 | 159 | echo b > h/b |
|
160 | 160 | hg -R h ci -Am b |
|
161 | 161 | hg -R i up 0 |
|
162 | 162 | echo c > i/c |
|
163 | 163 | hg -R i ci -Am c |
|
164 | 164 | hg -R i push h |
|
165 | 165 | echo |
|
166 | 166 | |
|
167 | 167 | echo % check prepush logic with merged branches |
|
168 | 168 | hg init j |
|
169 | 169 | hg -R j branch a |
|
170 | 170 | echo init > j/foo |
|
171 | 171 | hg -R j ci -Am init |
|
172 | 172 | hg clone j k |
|
173 | 173 | echo a1 > j/foo |
|
174 | 174 | hg -R j ci -m a1 |
|
175 | 175 | hg -R k branch b |
|
176 | 176 | echo b > k/foo |
|
177 | 177 | hg -R k ci -m b |
|
178 | 178 | hg -R k up 0 |
|
179 | 179 | hg -R k merge b |
|
180 | 180 | hg -R k ci -m merge |
|
181 | 181 | hg -R k push -r a j |
|
182 | 182 | echo |
|
183 | 183 | |
|
184 | 184 | echo % prepush -r should not allow you to sneak in new heads |
|
185 | 185 | hg init l |
|
186 | 186 | cd l |
|
187 | 187 | echo a >> foo |
|
188 | 188 | hg -q add foo |
|
189 | 189 | hg -q branch a |
|
190 |
hg -q ci - |
|
|
190 | hg -q ci -ma | |
|
191 | 191 | hg -q up null |
|
192 | 192 | echo a >> foo |
|
193 | 193 | hg -q add foo |
|
194 | 194 | hg -q branch b |
|
195 |
hg -q ci - |
|
|
195 | hg -q ci -mb | |
|
196 | 196 | cd .. |
|
197 | 197 | hg -q clone l m -u a |
|
198 | 198 | cd m |
|
199 | 199 | hg -q merge b |
|
200 |
hg -q ci - |
|
|
200 | hg -q ci -mmb | |
|
201 | 201 | hg -q up 0 |
|
202 | 202 | echo a >> foo |
|
203 | 203 | hg -q ci -ma2 |
|
204 | 204 | hg -q up 2 |
|
205 | 205 | echo a >> foo |
|
206 | 206 | hg -q branch -f b |
|
207 |
hg -q ci - |
|
|
207 | hg -q ci -mb2 | |
|
208 | 208 | hg -q merge 3 |
|
209 |
hg -q ci - |
|
|
209 | hg -q ci -mma | |
|
210 | 210 | hg push ../l -b b |
|
211 | 211 | cd .. |
|
212 | 212 | |
|
213 | 213 | echo % check prepush with new branch head on former topo non-head |
|
214 | 214 | hg init n |
|
215 | 215 | cd n |
|
216 | 216 | hg branch A |
|
217 | 217 | echo a >a |
|
218 | 218 | hg ci -Ama |
|
219 | 219 | hg branch B |
|
220 | 220 | echo b >b |
|
221 | 221 | hg ci -Amb |
|
222 | 222 | # b is now branch head of B, and a topological head |
|
223 | 223 | # a is now branch head of A, but not a topological head |
|
224 | 224 | hg clone . inner |
|
225 | 225 | cd inner |
|
226 | 226 | hg up B |
|
227 | 227 | echo b1 >b1 |
|
228 | 228 | hg ci -Amb1 |
|
229 | 229 | # in the clone b1 is now the head of B |
|
230 | 230 | cd .. |
|
231 | 231 | hg up 0 |
|
232 | 232 | echo a2 >a2 |
|
233 | 233 | hg ci -Ama2 |
|
234 | 234 | # a2 is now the new branch head of A, and a new topological head |
|
235 | 235 | # it replaces a former inner branch head, so it should at most warn about A, not B |
|
236 | 236 | echo %% glog of local |
|
237 | 237 | hg glog --template "{rev}: {branches} {desc}\n" |
|
238 | 238 | echo %% glog of remote |
|
239 | 239 | hg glog -R inner --template "{rev}: {branches} {desc}\n" |
|
240 | 240 | echo %% outgoing |
|
241 | 241 | hg out inner --template "{rev}: {branches} {desc}\n" |
|
242 | 242 | hg push inner |
|
243 | 243 | cd .. |
|
244 | 244 | |
|
245 | 245 | echo % check prepush with new branch head on former topo head |
|
246 | 246 | hg init o |
|
247 | 247 | cd o |
|
248 | 248 | hg branch A |
|
249 | 249 | echo a >a |
|
250 | 250 | hg ci -Ama |
|
251 | 251 | hg branch B |
|
252 | 252 | echo b >b |
|
253 | 253 | hg ci -Amb |
|
254 | 254 | # b is now branch head of B, and a topological head |
|
255 | 255 | hg up 0 |
|
256 | 256 | echo a1 >a1 |
|
257 | 257 | hg ci -Ama1 |
|
258 | 258 | # a1 is now branch head of A, and a topological head |
|
259 | 259 | hg clone . inner |
|
260 | 260 | cd inner |
|
261 | 261 | hg up B |
|
262 | 262 | echo b1 >b1 |
|
263 | 263 | hg ci -Amb1 |
|
264 | 264 | # in the clone b1 is now the head of B |
|
265 | 265 | cd .. |
|
266 | 266 | echo a2 >a2 |
|
267 | 267 | hg ci -Ama2 |
|
268 | 268 | # a2 is now the new branch head of A, and a topological head |
|
269 | 269 | # it replaces a former topological and branch head, so this should not warn |
|
270 | 270 | echo %% glog of local |
|
271 | 271 | hg glog --template "{rev}: {branches} {desc}\n" |
|
272 | 272 | echo %% glog of remote |
|
273 | 273 | hg glog -R inner --template "{rev}: {branches} {desc}\n" |
|
274 | 274 | echo %% outgoing |
|
275 | 275 | hg out inner --template "{rev}: {branches} {desc}\n" |
|
276 | 276 | hg push inner |
|
277 | 277 | cd .. |
|
278 | 278 | |
|
279 | 279 | echo % check prepush with new branch head and new child of former branch head |
|
280 | 280 | echo % but child is on different branch |
|
281 | 281 | hg init p |
|
282 | 282 | cd p |
|
283 | 283 | hg branch A |
|
284 | 284 | echo a0 >a |
|
285 | 285 | hg ci -Ama0 |
|
286 | 286 | echo a1 >a |
|
287 | 287 | hg ci -ma1 |
|
288 | 288 | hg up null |
|
289 | 289 | hg branch B |
|
290 | 290 | echo b0 >b |
|
291 | 291 | hg ci -Amb0 |
|
292 | 292 | echo b1 >b |
|
293 | 293 | hg ci -mb1 |
|
294 | 294 | |
|
295 | 295 | hg clone . inner |
|
296 | 296 | |
|
297 | 297 | hg up A |
|
298 | 298 | hg branch -f B |
|
299 | 299 | echo a3 >a |
|
300 | 300 | hg ci -ma3 |
|
301 | 301 | hg up 3 |
|
302 | 302 | hg branch -f A |
|
303 | 303 | echo b3 >b |
|
304 | 304 | hg ci -mb3 |
|
305 | 305 | |
|
306 | 306 | echo %% glog of local |
|
307 | 307 | hg glog --template "{rev}: {branches} {desc}\n" |
|
308 | 308 | echo %% glog of remote |
|
309 | 309 | hg glog -R inner --template "{rev}: {branches} {desc}\n" |
|
310 | 310 | echo %% outgoing |
|
311 | 311 | hg out inner --template "{rev}: {branches} {desc}\n" |
|
312 | 312 | hg push inner |
|
313 | 313 | hg push inner -r4 -r5 |
|
314 | 314 | hg in inner |
|
315 | 315 | cd .. |
|
316 | 316 | |
|
317 | 317 | exit 0 |
@@ -1,13 +1,13 b'' | |||
|
1 | 1 | test that 'hg commit' does not crash if the user removes a newly added file |
|
2 | 2 | |
|
3 | 3 | $ hg init |
|
4 | 4 | $ echo This is file a1 > a |
|
5 | 5 | $ hg add a |
|
6 |
$ hg commit -m "commit #0" |
|
|
6 | $ hg commit -m "commit #0" | |
|
7 | 7 | $ touch b |
|
8 | 8 | $ hg add b |
|
9 | 9 | $ rm b |
|
10 |
$ hg commit -A -m"comment #1" |
|
|
10 | $ hg commit -A -m"comment #1" | |
|
11 | 11 | removing b |
|
12 | 12 | nothing changed |
|
13 | 13 | $ exit 0 |
@@ -1,599 +1,599 b'' | |||
|
1 | 1 | $ hg init |
|
2 | 2 | $ mkdir d1 d1/d11 d2 |
|
3 | 3 | $ echo d1/a > d1/a |
|
4 | 4 | $ echo d1/ba > d1/ba |
|
5 | 5 | $ echo d1/a1 > d1/d11/a1 |
|
6 | 6 | $ echo d1/b > d1/b |
|
7 | 7 | $ echo d2/b > d2/b |
|
8 | 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 | 11 | rename a single file |
|
12 | 12 | |
|
13 | 13 | $ hg rename d1/d11/a1 d2/c |
|
14 | 14 | $ hg sum |
|
15 |
parent: 0: |
|
|
15 | parent: 0:9b4b6e7b2c26 tip | |
|
16 | 16 | 1 |
|
17 | 17 | branch: default |
|
18 | 18 | commit: 1 renamed |
|
19 | 19 | update: (current) |
|
20 | 20 | $ hg status -C |
|
21 | 21 | A d2/c |
|
22 | 22 | d1/d11/a1 |
|
23 | 23 | R d1/d11/a1 |
|
24 | 24 | $ hg update -C |
|
25 | 25 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
26 | 26 | $ rm d2/c |
|
27 | 27 | |
|
28 | 28 | rename --after a single file |
|
29 | 29 | |
|
30 | 30 | $ mv d1/d11/a1 d2/c |
|
31 | 31 | $ hg rename --after d1/d11/a1 d2/c |
|
32 | 32 | $ hg status -C |
|
33 | 33 | A d2/c |
|
34 | 34 | d1/d11/a1 |
|
35 | 35 | R d1/d11/a1 |
|
36 | 36 | $ hg update -C |
|
37 | 37 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
38 | 38 | $ rm d2/c |
|
39 | 39 | |
|
40 | 40 | rename --after a single file when src and tgt already tracked |
|
41 | 41 | |
|
42 | 42 | $ mv d1/d11/a1 d2/c |
|
43 | 43 | $ hg addrem -s 0 |
|
44 | 44 | removing d1/d11/a1 |
|
45 | 45 | adding d2/c |
|
46 | 46 | $ hg rename --after d1/d11/a1 d2/c |
|
47 | 47 | $ hg status -C |
|
48 | 48 | A d2/c |
|
49 | 49 | d1/d11/a1 |
|
50 | 50 | R d1/d11/a1 |
|
51 | 51 | $ hg update -C |
|
52 | 52 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
53 | 53 | $ rm d2/c |
|
54 | 54 | |
|
55 | 55 | rename --after a single file to a nonexistant target filename |
|
56 | 56 | |
|
57 | 57 | $ hg rename --after d1/a dummy |
|
58 | 58 | d1/a: not recording move - dummy does not exist |
|
59 | 59 | |
|
60 | 60 | move a single file to an existing directory |
|
61 | 61 | |
|
62 | 62 | $ hg rename d1/d11/a1 d2 |
|
63 | 63 | $ hg status -C |
|
64 | 64 | A d2/a1 |
|
65 | 65 | d1/d11/a1 |
|
66 | 66 | R d1/d11/a1 |
|
67 | 67 | $ hg update -C |
|
68 | 68 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
69 | 69 | $ rm d2/a1 |
|
70 | 70 | |
|
71 | 71 | move --after a single file to an existing directory |
|
72 | 72 | |
|
73 | 73 | $ mv d1/d11/a1 d2 |
|
74 | 74 | $ hg rename --after d1/d11/a1 d2 |
|
75 | 75 | $ hg status -C |
|
76 | 76 | A d2/a1 |
|
77 | 77 | d1/d11/a1 |
|
78 | 78 | R d1/d11/a1 |
|
79 | 79 | $ hg update -C |
|
80 | 80 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
81 | 81 | $ rm d2/a1 |
|
82 | 82 | |
|
83 | 83 | rename a file using a relative path |
|
84 | 84 | |
|
85 | 85 | $ (cd d1/d11; hg rename ../../d2/b e) |
|
86 | 86 | $ hg status -C |
|
87 | 87 | A d1/d11/e |
|
88 | 88 | d2/b |
|
89 | 89 | R d2/b |
|
90 | 90 | $ hg update -C |
|
91 | 91 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
92 | 92 | $ rm d1/d11/e |
|
93 | 93 | |
|
94 | 94 | rename --after a file using a relative path |
|
95 | 95 | |
|
96 | 96 | $ (cd d1/d11; mv ../../d2/b e; hg rename --after ../../d2/b e) |
|
97 | 97 | $ hg status -C |
|
98 | 98 | A d1/d11/e |
|
99 | 99 | d2/b |
|
100 | 100 | R d2/b |
|
101 | 101 | $ hg update -C |
|
102 | 102 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
103 | 103 | $ rm d1/d11/e |
|
104 | 104 | |
|
105 | 105 | rename directory d1 as d3 |
|
106 | 106 | |
|
107 | 107 | $ hg rename d1/ d3 |
|
108 | 108 | moving d1/a to d3/a |
|
109 | 109 | moving d1/b to d3/b |
|
110 | 110 | moving d1/ba to d3/ba |
|
111 | 111 | moving d1/d11/a1 to d3/d11/a1 |
|
112 | 112 | $ hg status -C |
|
113 | 113 | A d3/a |
|
114 | 114 | d1/a |
|
115 | 115 | A d3/b |
|
116 | 116 | d1/b |
|
117 | 117 | A d3/ba |
|
118 | 118 | d1/ba |
|
119 | 119 | A d3/d11/a1 |
|
120 | 120 | d1/d11/a1 |
|
121 | 121 | R d1/a |
|
122 | 122 | R d1/b |
|
123 | 123 | R d1/ba |
|
124 | 124 | R d1/d11/a1 |
|
125 | 125 | $ hg update -C |
|
126 | 126 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
127 | 127 | $ rm -rf d3 |
|
128 | 128 | |
|
129 | 129 | rename --after directory d1 as d3 |
|
130 | 130 | |
|
131 | 131 | $ mv d1 d3 |
|
132 | 132 | $ hg rename --after d1 d3 |
|
133 | 133 | moving d1/a to d3/a |
|
134 | 134 | moving d1/b to d3/b |
|
135 | 135 | moving d1/ba to d3/ba |
|
136 | 136 | moving d1/d11/a1 to d3/d11/a1 |
|
137 | 137 | $ hg status -C |
|
138 | 138 | A d3/a |
|
139 | 139 | d1/a |
|
140 | 140 | A d3/b |
|
141 | 141 | d1/b |
|
142 | 142 | A d3/ba |
|
143 | 143 | d1/ba |
|
144 | 144 | A d3/d11/a1 |
|
145 | 145 | d1/d11/a1 |
|
146 | 146 | R d1/a |
|
147 | 147 | R d1/b |
|
148 | 148 | R d1/ba |
|
149 | 149 | R d1/d11/a1 |
|
150 | 150 | $ hg update -C |
|
151 | 151 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
152 | 152 | $ rm -rf d3 |
|
153 | 153 | |
|
154 | 154 | move a directory using a relative path |
|
155 | 155 | |
|
156 | 156 | $ (cd d2; mkdir d3; hg rename ../d1/d11 d3) |
|
157 | 157 | moving ../d1/d11/a1 to d3/d11/a1 |
|
158 | 158 | $ hg status -C |
|
159 | 159 | A d2/d3/d11/a1 |
|
160 | 160 | d1/d11/a1 |
|
161 | 161 | R d1/d11/a1 |
|
162 | 162 | $ hg update -C |
|
163 | 163 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
164 | 164 | $ rm -rf d2/d3 |
|
165 | 165 | |
|
166 | 166 | move --after a directory using a relative path |
|
167 | 167 | |
|
168 | 168 | $ (cd d2; mkdir d3; mv ../d1/d11 d3; hg rename --after ../d1/d11 d3) |
|
169 | 169 | moving ../d1/d11/a1 to d3/d11/a1 |
|
170 | 170 | $ hg status -C |
|
171 | 171 | A d2/d3/d11/a1 |
|
172 | 172 | d1/d11/a1 |
|
173 | 173 | R d1/d11/a1 |
|
174 | 174 | $ hg update -C |
|
175 | 175 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
176 | 176 | $ rm -rf d2/d3 |
|
177 | 177 | |
|
178 | 178 | move directory d1/d11 to an existing directory d2 (removes empty d1) |
|
179 | 179 | |
|
180 | 180 | $ hg rename d1/d11/ d2 |
|
181 | 181 | moving d1/d11/a1 to d2/d11/a1 |
|
182 | 182 | $ hg status -C |
|
183 | 183 | A d2/d11/a1 |
|
184 | 184 | d1/d11/a1 |
|
185 | 185 | R d1/d11/a1 |
|
186 | 186 | $ hg update -C |
|
187 | 187 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
188 | 188 | $ rm -rf d2/d11 |
|
189 | 189 | |
|
190 | 190 | move directories d1 and d2 to a new directory d3 |
|
191 | 191 | |
|
192 | 192 | $ mkdir d3 |
|
193 | 193 | $ hg rename d1 d2 d3 |
|
194 | 194 | moving d1/a to d3/d1/a |
|
195 | 195 | moving d1/b to d3/d1/b |
|
196 | 196 | moving d1/ba to d3/d1/ba |
|
197 | 197 | moving d1/d11/a1 to d3/d1/d11/a1 |
|
198 | 198 | moving d2/b to d3/d2/b |
|
199 | 199 | $ hg status -C |
|
200 | 200 | A d3/d1/a |
|
201 | 201 | d1/a |
|
202 | 202 | A d3/d1/b |
|
203 | 203 | d1/b |
|
204 | 204 | A d3/d1/ba |
|
205 | 205 | d1/ba |
|
206 | 206 | A d3/d1/d11/a1 |
|
207 | 207 | d1/d11/a1 |
|
208 | 208 | A d3/d2/b |
|
209 | 209 | d2/b |
|
210 | 210 | R d1/a |
|
211 | 211 | R d1/b |
|
212 | 212 | R d1/ba |
|
213 | 213 | R d1/d11/a1 |
|
214 | 214 | R d2/b |
|
215 | 215 | $ hg update -C |
|
216 | 216 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
217 | 217 | $ rm -rf d3 |
|
218 | 218 | |
|
219 | 219 | move --after directories d1 and d2 to a new directory d3 |
|
220 | 220 | |
|
221 | 221 | $ mkdir d3 |
|
222 | 222 | $ mv d1 d2 d3 |
|
223 | 223 | $ hg rename --after d1 d2 d3 |
|
224 | 224 | moving d1/a to d3/d1/a |
|
225 | 225 | moving d1/b to d3/d1/b |
|
226 | 226 | moving d1/ba to d3/d1/ba |
|
227 | 227 | moving d1/d11/a1 to d3/d1/d11/a1 |
|
228 | 228 | moving d2/b to d3/d2/b |
|
229 | 229 | $ hg status -C |
|
230 | 230 | A d3/d1/a |
|
231 | 231 | d1/a |
|
232 | 232 | A d3/d1/b |
|
233 | 233 | d1/b |
|
234 | 234 | A d3/d1/ba |
|
235 | 235 | d1/ba |
|
236 | 236 | A d3/d1/d11/a1 |
|
237 | 237 | d1/d11/a1 |
|
238 | 238 | A d3/d2/b |
|
239 | 239 | d2/b |
|
240 | 240 | R d1/a |
|
241 | 241 | R d1/b |
|
242 | 242 | R d1/ba |
|
243 | 243 | R d1/d11/a1 |
|
244 | 244 | R d2/b |
|
245 | 245 | $ hg update -C |
|
246 | 246 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
247 | 247 | $ rm -rf d3 |
|
248 | 248 | |
|
249 | 249 | move everything under directory d1 to existing directory d2, do not |
|
250 | 250 | overwrite existing files (d2/b) |
|
251 | 251 | |
|
252 | 252 | $ hg rename d1/* d2 |
|
253 | 253 | d2/b: not overwriting - file exists |
|
254 | 254 | moving d1/d11/a1 to d2/d11/a1 |
|
255 | 255 | $ hg status -C |
|
256 | 256 | A d2/a |
|
257 | 257 | d1/a |
|
258 | 258 | A d2/ba |
|
259 | 259 | d1/ba |
|
260 | 260 | A d2/d11/a1 |
|
261 | 261 | d1/d11/a1 |
|
262 | 262 | R d1/a |
|
263 | 263 | R d1/ba |
|
264 | 264 | R d1/d11/a1 |
|
265 | 265 | $ diff -u d1/b d2/b |
|
266 | 266 | --- d1/b .* |
|
267 | 267 | \+\+\+ d2/b .* |
|
268 | 268 | @@ -1 +1 @@ |
|
269 | 269 | -d1/b |
|
270 | 270 | +d2/b |
|
271 | 271 | $ hg update -C |
|
272 | 272 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
273 | 273 | $ rm d2/a d2/ba d2/d11/a1 |
|
274 | 274 | |
|
275 | 275 | attempt to move one file into a non-existent directory |
|
276 | 276 | |
|
277 | 277 | $ hg rename d1/a dx/ |
|
278 | 278 | abort: destination dx/ is not a directory |
|
279 | 279 | $ hg status -C |
|
280 | 280 | $ hg update -C |
|
281 | 281 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
282 | 282 | |
|
283 | 283 | attempt to move potentially more than one file into a non-existent directory |
|
284 | 284 | |
|
285 | 285 | $ hg rename 'glob:d1/**' dx |
|
286 | 286 | abort: with multiple sources, destination must be an existing directory |
|
287 | 287 | |
|
288 | 288 | move every file under d1 to d2/d21 (glob) |
|
289 | 289 | |
|
290 | 290 | $ mkdir d2/d21 |
|
291 | 291 | $ hg rename 'glob:d1/**' d2/d21 |
|
292 | 292 | moving d1/a to d2/d21/a |
|
293 | 293 | moving d1/b to d2/d21/b |
|
294 | 294 | moving d1/ba to d2/d21/ba |
|
295 | 295 | moving d1/d11/a1 to d2/d21/a1 |
|
296 | 296 | $ hg status -C |
|
297 | 297 | A d2/d21/a |
|
298 | 298 | d1/a |
|
299 | 299 | A d2/d21/a1 |
|
300 | 300 | d1/d11/a1 |
|
301 | 301 | A d2/d21/b |
|
302 | 302 | d1/b |
|
303 | 303 | A d2/d21/ba |
|
304 | 304 | d1/ba |
|
305 | 305 | R d1/a |
|
306 | 306 | R d1/b |
|
307 | 307 | R d1/ba |
|
308 | 308 | R d1/d11/a1 |
|
309 | 309 | $ hg update -C |
|
310 | 310 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
311 | 311 | $ rm -rf d2/d21 |
|
312 | 312 | |
|
313 | 313 | move --after some files under d1 to d2/d21 (glob) |
|
314 | 314 | |
|
315 | 315 | $ mkdir d2/d21 |
|
316 | 316 | $ mv d1/a d1/d11/a1 d2/d21 |
|
317 | 317 | $ hg rename --after 'glob:d1/**' d2/d21 |
|
318 | 318 | moving d1/a to d2/d21/a |
|
319 | 319 | d1/b: not recording move - d2/d21/b does not exist |
|
320 | 320 | d1/ba: not recording move - d2/d21/ba does not exist |
|
321 | 321 | moving d1/d11/a1 to d2/d21/a1 |
|
322 | 322 | $ hg status -C |
|
323 | 323 | A d2/d21/a |
|
324 | 324 | d1/a |
|
325 | 325 | A d2/d21/a1 |
|
326 | 326 | d1/d11/a1 |
|
327 | 327 | R d1/a |
|
328 | 328 | R d1/d11/a1 |
|
329 | 329 | $ hg update -C |
|
330 | 330 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
331 | 331 | $ rm -rf d2/d21 |
|
332 | 332 | |
|
333 | 333 | move every file under d1 starting with an 'a' to d2/d21 (regexp) |
|
334 | 334 | |
|
335 | 335 | $ mkdir d2/d21 |
|
336 | 336 | $ hg rename 're:d1/([^a][^/]*/)*a.*' d2/d21 |
|
337 | 337 | moving d1/a to d2/d21/a |
|
338 | 338 | moving d1/d11/a1 to d2/d21/a1 |
|
339 | 339 | $ hg status -C |
|
340 | 340 | A d2/d21/a |
|
341 | 341 | d1/a |
|
342 | 342 | A d2/d21/a1 |
|
343 | 343 | d1/d11/a1 |
|
344 | 344 | R d1/a |
|
345 | 345 | R d1/d11/a1 |
|
346 | 346 | $ hg update -C |
|
347 | 347 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
348 | 348 | $ rm -rf d2/d21 |
|
349 | 349 | |
|
350 | 350 | attempt to overwrite an existing file |
|
351 | 351 | |
|
352 | 352 | $ echo "ca" > d1/ca |
|
353 | 353 | $ hg rename d1/ba d1/ca |
|
354 | 354 | d1/ca: not overwriting - file exists |
|
355 | 355 | $ hg status -C |
|
356 | 356 | ? d1/ca |
|
357 | 357 | $ hg update -C |
|
358 | 358 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
359 | 359 | |
|
360 | 360 | forced overwrite of an existing file |
|
361 | 361 | |
|
362 | 362 | $ echo "ca" > d1/ca |
|
363 | 363 | $ hg rename --force d1/ba d1/ca |
|
364 | 364 | $ hg status -C |
|
365 | 365 | A d1/ca |
|
366 | 366 | d1/ba |
|
367 | 367 | R d1/ba |
|
368 | 368 | $ hg update -C |
|
369 | 369 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
370 | 370 | $ rm d1/ca |
|
371 | 371 | |
|
372 | 372 | replace a symlink with a file |
|
373 | 373 | |
|
374 | 374 | $ ln -s ba d1/ca |
|
375 | 375 | $ hg rename --force d1/ba d1/ca |
|
376 | 376 | $ hg status -C |
|
377 | 377 | A d1/ca |
|
378 | 378 | d1/ba |
|
379 | 379 | R d1/ba |
|
380 | 380 | $ hg update -C |
|
381 | 381 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
382 | 382 | $ rm d1/ca |
|
383 | 383 | |
|
384 | 384 | do not copy more than one source file to the same destination file |
|
385 | 385 | |
|
386 | 386 | $ mkdir d3 |
|
387 | 387 | $ hg rename d1/* d2/* d3 |
|
388 | 388 | moving d1/d11/a1 to d3/d11/a1 |
|
389 | 389 | d3/b: not overwriting - d2/b collides with d1/b |
|
390 | 390 | $ hg status -C |
|
391 | 391 | A d3/a |
|
392 | 392 | d1/a |
|
393 | 393 | A d3/b |
|
394 | 394 | d1/b |
|
395 | 395 | A d3/ba |
|
396 | 396 | d1/ba |
|
397 | 397 | A d3/d11/a1 |
|
398 | 398 | d1/d11/a1 |
|
399 | 399 | R d1/a |
|
400 | 400 | R d1/b |
|
401 | 401 | R d1/ba |
|
402 | 402 | R d1/d11/a1 |
|
403 | 403 | $ hg update -C |
|
404 | 404 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
405 | 405 | $ rm -rf d3 |
|
406 | 406 | |
|
407 | 407 | move a whole subtree with \"hg rename .\" |
|
408 | 408 | |
|
409 | 409 | $ mkdir d3 |
|
410 | 410 | $ (cd d1; hg rename . ../d3) |
|
411 | 411 | moving a to ../d3/d1/a |
|
412 | 412 | moving b to ../d3/d1/b |
|
413 | 413 | moving ba to ../d3/d1/ba |
|
414 | 414 | moving d11/a1 to ../d3/d1/d11/a1 |
|
415 | 415 | $ hg status -C |
|
416 | 416 | A d3/d1/a |
|
417 | 417 | d1/a |
|
418 | 418 | A d3/d1/b |
|
419 | 419 | d1/b |
|
420 | 420 | A d3/d1/ba |
|
421 | 421 | d1/ba |
|
422 | 422 | A d3/d1/d11/a1 |
|
423 | 423 | d1/d11/a1 |
|
424 | 424 | R d1/a |
|
425 | 425 | R d1/b |
|
426 | 426 | R d1/ba |
|
427 | 427 | R d1/d11/a1 |
|
428 | 428 | $ hg update -C |
|
429 | 429 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
430 | 430 | $ rm -rf d3 |
|
431 | 431 | |
|
432 | 432 | move a whole subtree with \"hg rename --after .\" |
|
433 | 433 | |
|
434 | 434 | $ mkdir d3 |
|
435 | 435 | $ mv d1/* d3 |
|
436 | 436 | $ (cd d1; hg rename --after . ../d3) |
|
437 | 437 | moving a to ../d3/a |
|
438 | 438 | moving b to ../d3/b |
|
439 | 439 | moving ba to ../d3/ba |
|
440 | 440 | moving d11/a1 to ../d3/d11/a1 |
|
441 | 441 | $ hg status -C |
|
442 | 442 | A d3/a |
|
443 | 443 | d1/a |
|
444 | 444 | A d3/b |
|
445 | 445 | d1/b |
|
446 | 446 | A d3/ba |
|
447 | 447 | d1/ba |
|
448 | 448 | A d3/d11/a1 |
|
449 | 449 | d1/d11/a1 |
|
450 | 450 | R d1/a |
|
451 | 451 | R d1/b |
|
452 | 452 | R d1/ba |
|
453 | 453 | R d1/d11/a1 |
|
454 | 454 | $ hg update -C |
|
455 | 455 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
456 | 456 | $ rm -rf d3 |
|
457 | 457 | |
|
458 | 458 | move the parent tree with \"hg rename ..\" |
|
459 | 459 | |
|
460 | 460 | $ (cd d1/d11; hg rename .. ../../d3) |
|
461 | 461 | moving ../a to ../../d3/a |
|
462 | 462 | moving ../b to ../../d3/b |
|
463 | 463 | moving ../ba to ../../d3/ba |
|
464 | 464 | moving a1 to ../../d3/d11/a1 |
|
465 | 465 | $ hg status -C |
|
466 | 466 | A d3/a |
|
467 | 467 | d1/a |
|
468 | 468 | A d3/b |
|
469 | 469 | d1/b |
|
470 | 470 | A d3/ba |
|
471 | 471 | d1/ba |
|
472 | 472 | A d3/d11/a1 |
|
473 | 473 | d1/d11/a1 |
|
474 | 474 | R d1/a |
|
475 | 475 | R d1/b |
|
476 | 476 | R d1/ba |
|
477 | 477 | R d1/d11/a1 |
|
478 | 478 | $ hg update -C |
|
479 | 479 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
480 | 480 | $ rm -rf d3 |
|
481 | 481 | |
|
482 | 482 | skip removed files |
|
483 | 483 | |
|
484 | 484 | $ hg remove d1/b |
|
485 | 485 | $ hg rename d1 d3 |
|
486 | 486 | moving d1/a to d3/a |
|
487 | 487 | moving d1/ba to d3/ba |
|
488 | 488 | moving d1/d11/a1 to d3/d11/a1 |
|
489 | 489 | $ hg status -C |
|
490 | 490 | A d3/a |
|
491 | 491 | d1/a |
|
492 | 492 | A d3/ba |
|
493 | 493 | d1/ba |
|
494 | 494 | A d3/d11/a1 |
|
495 | 495 | d1/d11/a1 |
|
496 | 496 | R d1/a |
|
497 | 497 | R d1/b |
|
498 | 498 | R d1/ba |
|
499 | 499 | R d1/d11/a1 |
|
500 | 500 | $ hg update -C |
|
501 | 501 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
502 | 502 | $ rm -rf d3 |
|
503 | 503 | |
|
504 | 504 | transitive rename |
|
505 | 505 | |
|
506 | 506 | $ hg rename d1/b d1/bb |
|
507 | 507 | $ hg rename d1/bb d1/bc |
|
508 | 508 | $ hg status -C |
|
509 | 509 | A d1/bc |
|
510 | 510 | d1/b |
|
511 | 511 | R d1/b |
|
512 | 512 | $ hg update -C |
|
513 | 513 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
514 | 514 | $ rm d1/bc |
|
515 | 515 | |
|
516 | 516 | transitive rename --after |
|
517 | 517 | |
|
518 | 518 | $ hg rename d1/b d1/bb |
|
519 | 519 | $ mv d1/bb d1/bc |
|
520 | 520 | $ hg rename --after d1/bb d1/bc |
|
521 | 521 | $ hg status -C |
|
522 | 522 | A d1/bc |
|
523 | 523 | d1/b |
|
524 | 524 | R d1/b |
|
525 | 525 | $ hg update -C |
|
526 | 526 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
527 | 527 | $ rm d1/bc |
|
528 | 528 | |
|
529 | 529 | $ echo "# idempotent renames (d1/b -> d1/bb followed by d1/bb -> d1/b)" |
|
530 | 530 | # idempotent renames (d1/b -> d1/bb followed by d1/bb -> d1/b) |
|
531 | 531 | $ hg rename d1/b d1/bb |
|
532 | 532 | $ echo "some stuff added to d1/bb" >> d1/bb |
|
533 | 533 | $ hg rename d1/bb d1/b |
|
534 | 534 | $ hg status -C |
|
535 | 535 | M d1/b |
|
536 | 536 | $ hg update -C |
|
537 | 537 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
538 | 538 | |
|
539 | 539 | overwriting with renames (issue1959) |
|
540 | 540 | |
|
541 | 541 | $ hg rename d1/a d1/c |
|
542 | 542 | $ hg rename d1/b d1/a |
|
543 | 543 | $ hg status -C |
|
544 | 544 | A d1/a |
|
545 | 545 | d1/b |
|
546 | 546 | A d1/c |
|
547 | 547 | d1/a |
|
548 | 548 | R d1/b |
|
549 | 549 | $ hg diff --git |
|
550 | 550 | diff --git a/d1/b b/d1/a |
|
551 | 551 | rename from d1/b |
|
552 | 552 | rename to d1/a |
|
553 | 553 | diff --git a/d1/a b/d1/c |
|
554 | 554 | copy from d1/a |
|
555 | 555 | copy to d1/c |
|
556 | 556 | $ hg update -C |
|
557 | 557 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
558 | 558 | |
|
559 | 559 | check illegal path components |
|
560 | 560 | |
|
561 | 561 | $ hg rename d1/d11/a1 .hg/foo |
|
562 | 562 | abort: path contains illegal component: .hg/foo |
|
563 | 563 | $ hg status -C |
|
564 | 564 | $ hg rename d1/d11/a1 ../foo |
|
565 | 565 | abort: ../foo not under root |
|
566 | 566 | $ hg status -C |
|
567 | 567 | |
|
568 | 568 | $ mv d1/d11/a1 .hg/foo |
|
569 | 569 | $ hg rename --after d1/d11/a1 .hg/foo |
|
570 | 570 | abort: path contains illegal component: .hg/foo |
|
571 | 571 | $ hg status -C |
|
572 | 572 | ! d1/d11/a1 |
|
573 | 573 | $ hg update -C |
|
574 | 574 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
575 | 575 | $ rm .hg/foo |
|
576 | 576 | |
|
577 | 577 | $ hg rename d1/d11/a1 .hg |
|
578 | 578 | abort: path contains illegal component: .hg/a1 |
|
579 | 579 | $ hg status -C |
|
580 | 580 | $ hg rename d1/d11/a1 .. |
|
581 | 581 | abort: ../a1 not under root |
|
582 | 582 | $ hg status -C |
|
583 | 583 | |
|
584 | 584 | $ mv d1/d11/a1 .hg |
|
585 | 585 | $ hg rename --after d1/d11/a1 .hg |
|
586 | 586 | abort: path contains illegal component: .hg/a1 |
|
587 | 587 | $ hg status -C |
|
588 | 588 | ! d1/d11/a1 |
|
589 | 589 | $ hg update -C |
|
590 | 590 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
591 | 591 | $ rm .hg/a1 |
|
592 | 592 | |
|
593 | 593 | $ (cd d1/d11; hg rename ../../d2/b ../../.hg/foo) |
|
594 | 594 | abort: path contains illegal component: .hg/foo |
|
595 | 595 | $ hg status -C |
|
596 | 596 | $ (cd d1/d11; hg rename ../../d2/b ../../../foo) |
|
597 | 597 | abort: ../../../foo not under root |
|
598 | 598 | $ hg status -C |
|
599 | 599 |
@@ -1,14 +1,14 b'' | |||
|
1 | 1 | $ mkdir t |
|
2 | 2 | $ cd t |
|
3 | 3 | $ hg init |
|
4 | 4 | $ echo a > a |
|
5 | 5 | $ hg add a |
|
6 |
$ hg commit -m test |
|
|
6 | $ hg commit -m test | |
|
7 | 7 |
$ |
|
8 | 8 |
$ |
|
9 | 9 | abort: index 00changelog.i unknown format 2! |
|
10 | 10 | $ echo indoor-pool > .hg/requires |
|
11 | 11 | $ hg tip |
|
12 | 12 | abort: requirement 'indoor-pool' not supported! |
|
13 | 13 | |
|
14 | 14 | $ true |
@@ -1,29 +1,29 b'' | |||
|
1 | 1 | $ hg init |
|
2 | 2 | $ touch unknown |
|
3 | 3 | |
|
4 | 4 | $ touch a |
|
5 | 5 | $ hg add a |
|
6 |
$ hg ci -m "1" |
|
|
6 | $ hg ci -m "1" | |
|
7 | 7 | |
|
8 | 8 | $ touch b |
|
9 | 9 | $ hg add b |
|
10 |
$ hg ci -m "2" |
|
|
10 | $ hg ci -m "2" | |
|
11 | 11 | |
|
12 | 12 | Should show unknown |
|
13 | 13 | |
|
14 | 14 | $ hg status |
|
15 | 15 | ? unknown |
|
16 | 16 | $ hg revert -r 0 --all |
|
17 | 17 | removing b |
|
18 | 18 | |
|
19 | 19 | Should show unknown and b removed |
|
20 | 20 | |
|
21 | 21 | $ hg status |
|
22 | 22 | R b |
|
23 | 23 | ? unknown |
|
24 | 24 | |
|
25 | 25 | Should show a and unknown |
|
26 | 26 | |
|
27 | 27 | $ ls |
|
28 | 28 | a |
|
29 | 29 | unknown |
@@ -1,263 +1,263 b'' | |||
|
1 | 1 | $ hg init repo |
|
2 | 2 | $ cd repo |
|
3 | 3 | $ echo 123 > a |
|
4 | 4 | $ echo 123 > c |
|
5 | 5 | $ echo 123 > e |
|
6 | 6 | $ hg add a c e |
|
7 |
$ hg commit -m "first" |
|
|
7 | $ hg commit -m "first" a c e | |
|
8 | 8 | $ echo 123 > b |
|
9 | 9 | |
|
10 | 10 | should show b unknown |
|
11 | 11 | |
|
12 | 12 | $ hg status |
|
13 | 13 | ? b |
|
14 | 14 | $ echo 12 > c |
|
15 | 15 | |
|
16 | 16 | should show b unknown and c modified |
|
17 | 17 | |
|
18 | 18 | $ hg status |
|
19 | 19 | M c |
|
20 | 20 | ? b |
|
21 | 21 | $ hg add b |
|
22 | 22 | |
|
23 | 23 | should show b added and c modified |
|
24 | 24 | |
|
25 | 25 | $ hg status |
|
26 | 26 | M c |
|
27 | 27 | A b |
|
28 | 28 | $ hg rm a |
|
29 | 29 | |
|
30 | 30 | should show a removed, b added and c modified |
|
31 | 31 | |
|
32 | 32 | $ hg status |
|
33 | 33 | M c |
|
34 | 34 | A b |
|
35 | 35 | R a |
|
36 | 36 | $ hg revert a |
|
37 | 37 | |
|
38 | 38 | should show b added, copy saved, and c modified |
|
39 | 39 | |
|
40 | 40 | $ hg status |
|
41 | 41 | M c |
|
42 | 42 | A b |
|
43 | 43 | $ hg revert b |
|
44 | 44 | |
|
45 | 45 | should show b unknown, and c modified |
|
46 | 46 | |
|
47 | 47 | $ hg status |
|
48 | 48 | M c |
|
49 | 49 | ? b |
|
50 | 50 | $ hg revert --no-backup c |
|
51 | 51 | |
|
52 | 52 | should show unknown: b |
|
53 | 53 | |
|
54 | 54 | $ hg status |
|
55 | 55 | ? b |
|
56 | 56 | $ hg add b |
|
57 | 57 | |
|
58 | 58 | should show b added |
|
59 | 59 | |
|
60 | 60 | $ hg status b |
|
61 | 61 | A b |
|
62 | 62 | $ rm b |
|
63 | 63 | |
|
64 | 64 | should show b deleted |
|
65 | 65 | |
|
66 | 66 | $ hg status b |
|
67 | 67 | ! b |
|
68 | 68 | $ hg revert -v b |
|
69 | 69 | forgetting b |
|
70 | 70 | |
|
71 | 71 | should not find b |
|
72 | 72 | |
|
73 | 73 | $ hg status b |
|
74 | 74 | b: No such file or directory |
|
75 | 75 | |
|
76 | 76 | should show a c e |
|
77 | 77 | |
|
78 | 78 | $ ls |
|
79 | 79 | a |
|
80 | 80 | c |
|
81 | 81 | e |
|
82 | 82 | |
|
83 | 83 | should verbosely save backup to e.orig |
|
84 | 84 | |
|
85 | 85 | $ echo z > e |
|
86 | 86 | $ hg revert --all -v |
|
87 | 87 | saving current version of e as e.orig |
|
88 | 88 | reverting e |
|
89 | 89 | |
|
90 | 90 | should say no changes needed |
|
91 | 91 | |
|
92 | 92 | $ hg revert a |
|
93 | 93 | no changes needed to a |
|
94 | 94 | |
|
95 | 95 | should say file not managed |
|
96 | 96 | |
|
97 | 97 | $ echo q > q |
|
98 | 98 | $ hg revert q |
|
99 | 99 | file not managed: q |
|
100 | 100 | $ rm q |
|
101 | 101 | |
|
102 | 102 | should say file not found |
|
103 | 103 | |
|
104 | 104 | $ hg revert notfound |
|
105 |
notfound: no such file in rev |
|
|
105 | notfound: no such file in rev 334a9e57682c | |
|
106 | 106 | $ touch d |
|
107 | 107 | $ hg add d |
|
108 | 108 | $ hg rm a |
|
109 |
$ hg commit -m "second" |
|
|
109 | $ hg commit -m "second" | |
|
110 | 110 | $ echo z > z |
|
111 | 111 | $ hg add z |
|
112 | 112 | $ hg st |
|
113 | 113 | A z |
|
114 | 114 | ? e.orig |
|
115 | 115 | |
|
116 | 116 | should add a, remove d, forget z |
|
117 | 117 | |
|
118 | 118 | $ hg revert --all -r0 |
|
119 | 119 | adding a |
|
120 | 120 | removing d |
|
121 | 121 | forgetting z |
|
122 | 122 | |
|
123 | 123 | should forget a, undelete d |
|
124 | 124 | |
|
125 | 125 | $ hg revert --all -rtip |
|
126 | 126 | forgetting a |
|
127 | 127 | undeleting d |
|
128 | 128 | $ rm a *.orig |
|
129 | 129 | |
|
130 | 130 | should silently add a |
|
131 | 131 | |
|
132 | 132 | $ hg revert -r0 a |
|
133 | 133 | $ hg st a |
|
134 | 134 | A a |
|
135 | 135 | $ hg rm d |
|
136 | 136 | $ hg st d |
|
137 | 137 | R d |
|
138 | 138 | |
|
139 | 139 | should silently keep d removed |
|
140 | 140 | |
|
141 | 141 | $ hg revert -r0 d |
|
142 | 142 | $ hg st d |
|
143 | 143 | R d |
|
144 | 144 | |
|
145 | 145 | $ hg update -C |
|
146 | 146 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
147 | 147 | $ chmod +x c |
|
148 | 148 | $ hg revert --all |
|
149 | 149 | reverting c |
|
150 | 150 | |
|
151 | 151 | should print non-executable |
|
152 | 152 | |
|
153 | 153 | $ test -x c || echo non-executable |
|
154 | 154 | non-executable |
|
155 | 155 | |
|
156 | 156 | $ chmod +x c |
|
157 |
$ hg commit - |
|
|
157 | $ hg commit -m exe | |
|
158 | 158 | |
|
159 | 159 | $ chmod -x c |
|
160 | 160 | $ hg revert --all |
|
161 | 161 | reverting c |
|
162 | 162 | |
|
163 | 163 | should print executable |
|
164 | 164 | |
|
165 | 165 | $ test -x c && echo executable |
|
166 | 166 | executable |
|
167 | 167 | |
|
168 | 168 | $ cd .. |
|
169 | 169 | |
|
170 | 170 | |
|
171 | 171 | issue 241 |
|
172 | 172 | |
|
173 | 173 | $ hg init a |
|
174 | 174 | $ cd a |
|
175 | 175 | $ echo a >> a |
|
176 | 176 | $ hg commit -A -d '1 0' -m a |
|
177 | 177 | adding a |
|
178 | 178 | $ echo a >> a |
|
179 | 179 | $ hg commit -d '2 0' -m a |
|
180 | 180 | $ hg update 0 |
|
181 | 181 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
182 | 182 | $ mkdir b |
|
183 | 183 | $ echo b > b/b |
|
184 | 184 | |
|
185 | 185 | should fail - no arguments |
|
186 | 186 | |
|
187 | 187 | $ hg revert -rtip |
|
188 | 188 | abort: no files or directories specified; use --all to revert the whole repo |
|
189 | 189 | |
|
190 | 190 | should succeed |
|
191 | 191 | |
|
192 | 192 | $ hg revert --all -rtip |
|
193 | 193 | reverting a |
|
194 | 194 | |
|
195 | 195 | |
|
196 | 196 | issue332 |
|
197 | 197 | |
|
198 |
$ hg ci -A -m b |
|
|
198 | $ hg ci -A -m b | |
|
199 | 199 | adding b/b |
|
200 | 200 | created new head |
|
201 | 201 | $ echo foobar > b/b |
|
202 | 202 | $ mkdir newdir |
|
203 | 203 | $ echo foo > newdir/newfile |
|
204 | 204 | $ hg add newdir/newfile |
|
205 | 205 | $ hg revert b newdir |
|
206 | 206 | reverting b/b |
|
207 | 207 | forgetting newdir/newfile |
|
208 | 208 | $ echo foobar > b/b |
|
209 | 209 | $ hg revert . |
|
210 | 210 | reverting b/b |
|
211 | 211 | |
|
212 | 212 | |
|
213 | 213 | reverting a rename target should revert the source |
|
214 | 214 | |
|
215 | 215 | $ hg mv a newa |
|
216 | 216 | $ hg revert newa |
|
217 | 217 | $ hg st a newa |
|
218 | 218 | ? newa |
|
219 | 219 | |
|
220 | 220 | $ cd .. |
|
221 | 221 | |
|
222 | 222 | $ hg init ignored |
|
223 | 223 | $ cd ignored |
|
224 | 224 | $ echo '^ignored$' > .hgignore |
|
225 | 225 | $ echo '^ignoreddir$' >> .hgignore |
|
226 | 226 | $ echo '^removed$' >> .hgignore |
|
227 | 227 | |
|
228 | 228 | $ mkdir ignoreddir |
|
229 | 229 | $ touch ignoreddir/file |
|
230 | 230 | $ touch ignoreddir/removed |
|
231 | 231 | $ touch ignored |
|
232 | 232 | $ touch removed |
|
233 | 233 | |
|
234 | 234 | 4 ignored files (we will add/commit everything) |
|
235 | 235 | |
|
236 | 236 | $ hg st -A -X .hgignore |
|
237 | 237 | I ignored |
|
238 | 238 | I ignoreddir/file |
|
239 | 239 | I ignoreddir/removed |
|
240 | 240 | I removed |
|
241 | 241 | $ hg ci -qAm 'add files' ignored ignoreddir/file ignoreddir/removed removed |
|
242 | 242 | |
|
243 | 243 | $ echo >> ignored |
|
244 | 244 | $ echo >> ignoreddir/file |
|
245 | 245 | $ hg rm removed ignoreddir/removed |
|
246 | 246 | |
|
247 | 247 | should revert ignored* and undelete *removed |
|
248 | 248 | |
|
249 | 249 | $ hg revert -a --no-backup |
|
250 | 250 | reverting ignored |
|
251 | 251 | reverting ignoreddir/file |
|
252 | 252 | undeleting ignoreddir/removed |
|
253 | 253 | undeleting removed |
|
254 | 254 | $ hg st -mardi |
|
255 | 255 | |
|
256 | 256 | $ hg up -qC |
|
257 | 257 | $ echo >> ignored |
|
258 | 258 | $ hg rm removed |
|
259 | 259 | |
|
260 | 260 | should silently revert the named files |
|
261 | 261 | |
|
262 | 262 | $ hg revert --no-backup ignored removed |
|
263 | 263 | $ hg st -mardi |
@@ -1,48 +1,48 b'' | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | 3 | mkdir t |
|
4 | 4 | cd t |
|
5 | 5 | hg init |
|
6 | 6 | echo a > a |
|
7 | 7 | hg add a |
|
8 |
hg commit -m "test" |
|
|
8 | hg commit -m "test" | |
|
9 | 9 | hg verify |
|
10 | 10 | hg parents |
|
11 | 11 | hg status |
|
12 | 12 | hg rollback |
|
13 | 13 | hg verify |
|
14 | 14 | hg parents |
|
15 | 15 | hg status |
|
16 | 16 | |
|
17 | 17 | echo % Test issue 902 |
|
18 | 18 | hg commit -m "test2" |
|
19 | 19 | hg branch test |
|
20 | 20 | hg rollback |
|
21 | 21 | hg branch |
|
22 | 22 | |
|
23 | 23 | echo '% Test issue 1635 (commit message saved)' |
|
24 | 24 | echo '.hg/last-message.txt:' |
|
25 | 25 | cat .hg/last-message.txt ; echo |
|
26 | 26 | |
|
27 | 27 | echo % Test rollback of hg before issue 902 was fixed |
|
28 | 28 | hg commit -m "test3" |
|
29 | 29 | hg branch test |
|
30 | 30 | rm .hg/undo.branch |
|
31 | 31 | hg rollback |
|
32 | 32 | hg branch |
|
33 | 33 | |
|
34 | 34 | echo '% rollback by pretxncommit saves commit message (issue 1635)' |
|
35 | 35 | echo a >> a |
|
36 | 36 | hg --config hooks.pretxncommit=false commit -m"precious commit message" 2>&1 | sed 's,exited with status .*,exited ...,g' |
|
37 | 37 | echo '.hg/last-message.txt:' |
|
38 | 38 | cat .hg/last-message.txt ; echo |
|
39 | 39 | |
|
40 | 40 | echo '% same thing, but run $EDITOR' |
|
41 | 41 | cat > $HGTMP/editor <<'__EOF__' |
|
42 | 42 | #!/bin/sh |
|
43 | 43 | echo "another precious commit message" > "$1" |
|
44 | 44 | __EOF__ |
|
45 | 45 | chmod +x "$HGTMP"/editor |
|
46 | 46 | HGEDITOR="'$HGTMP'"/editor hg --config hooks.pretxncommit=false commit 2>&1 | sed 's,exited with status .*,exited ...,g' |
|
47 | 47 | echo '.hg/last-message.txt:' |
|
48 | 48 | cat .hg/last-message.txt |
@@ -1,43 +1,43 b'' | |||
|
1 | 1 | checking changesets |
|
2 | 2 | checking manifests |
|
3 | 3 | crosschecking files in changesets and manifests |
|
4 | 4 | checking files |
|
5 | 5 | 1 files, 1 changesets, 1 total revisions |
|
6 |
changeset: 0: |
|
|
6 | changeset: 0:acb14030fe0a | |
|
7 | 7 | tag: tip |
|
8 | 8 | user: test |
|
9 |
date: |
|
|
9 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
10 | 10 | summary: test |
|
11 | 11 | |
|
12 | 12 | rolling back to revision -1 (undo commit) |
|
13 | 13 | checking changesets |
|
14 | 14 | checking manifests |
|
15 | 15 | crosschecking files in changesets and manifests |
|
16 | 16 | checking files |
|
17 | 17 | 0 files, 0 changesets, 0 total revisions |
|
18 | 18 | A a |
|
19 | 19 | % Test issue 902 |
|
20 | 20 | marked working directory as branch test |
|
21 | 21 | rolling back to revision -1 (undo commit) |
|
22 | 22 | default |
|
23 | 23 | % Test issue 1635 (commit message saved) |
|
24 | 24 | .hg/last-message.txt: |
|
25 | 25 | test2 |
|
26 | 26 | % Test rollback of hg before issue 902 was fixed |
|
27 | 27 | marked working directory as branch test |
|
28 | 28 | rolling back to revision -1 (undo commit) |
|
29 | 29 | Named branch could not be reset, current branch still is: test |
|
30 | 30 | test |
|
31 | 31 | % rollback by pretxncommit saves commit message (issue 1635) |
|
32 | 32 | transaction abort! |
|
33 | 33 | rollback completed |
|
34 | 34 | abort: pretxncommit hook exited ... |
|
35 | 35 | .hg/last-message.txt: |
|
36 | 36 | precious commit message |
|
37 | 37 | % same thing, but run $EDITOR |
|
38 | 38 | transaction abort! |
|
39 | 39 | rollback completed |
|
40 | 40 | note: commit message saved in .hg/last-message.txt |
|
41 | 41 | abort: pretxncommit hook exited ... |
|
42 | 42 | .hg/last-message.txt: |
|
43 | 43 | another precious commit message |
@@ -1,111 +1,111 b'' | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | 3 | cp "$TESTDIR"/printenv.py . |
|
4 | 4 | |
|
5 | 5 | # This test tries to exercise the ssh functionality with a dummy script |
|
6 | 6 | |
|
7 | 7 | cat <<EOF > dummyssh |
|
8 | 8 | import sys |
|
9 | 9 | import os |
|
10 | 10 | |
|
11 | 11 | os.chdir(os.path.dirname(sys.argv[0])) |
|
12 | 12 | if sys.argv[1] != "user@dummy": |
|
13 | 13 | sys.exit(-1) |
|
14 | 14 | |
|
15 | 15 | if not os.path.exists("dummyssh"): |
|
16 | 16 | sys.exit(-1) |
|
17 | 17 | |
|
18 | 18 | os.environ["SSH_CLIENT"] = "127.0.0.1 1 2" |
|
19 | 19 | |
|
20 | 20 | log = open("dummylog", "ab") |
|
21 | 21 | log.write("Got arguments") |
|
22 | 22 | for i, arg in enumerate(sys.argv[1:]): |
|
23 | 23 | log.write(" %d:%s" % (i+1, arg)) |
|
24 | 24 | log.write("\n") |
|
25 | 25 | log.close() |
|
26 | 26 | r = os.system(sys.argv[2]) |
|
27 | 27 | sys.exit(bool(r)) |
|
28 | 28 | EOF |
|
29 | 29 | |
|
30 | 30 | cat <<EOF > badhook |
|
31 | 31 | import sys |
|
32 | 32 | sys.stdout.write("KABOOM\n") |
|
33 | 33 | EOF |
|
34 | 34 | |
|
35 | 35 | echo "# creating 'remote'" |
|
36 | 36 | hg init remote |
|
37 | 37 | cd remote |
|
38 | 38 | echo this > foo |
|
39 | 39 | echo this > fooO |
|
40 |
hg ci -A -m "init" |
|
|
40 | hg ci -A -m "init" foo fooO | |
|
41 | 41 | echo '[server]' > .hg/hgrc |
|
42 | 42 | echo 'uncompressed = True' >> .hg/hgrc |
|
43 | 43 | echo '[hooks]' >> .hg/hgrc |
|
44 | 44 | echo 'changegroup = python ../printenv.py changegroup-in-remote 0 ../dummylog' >> .hg/hgrc |
|
45 | 45 | |
|
46 | 46 | cd .. |
|
47 | 47 | |
|
48 | 48 | echo "# repo not found error" |
|
49 | 49 | hg clone -e "python ./dummyssh" ssh://user@dummy/nonexistent local |
|
50 | 50 | |
|
51 | 51 | echo "# clone remote via stream" |
|
52 | 52 | hg clone -e "python ./dummyssh" --uncompressed ssh://user@dummy/remote local-stream 2>&1 | \ |
|
53 | 53 | sed -e 's/[0-9][0-9.]*/XXX/g' -e 's/[KM]\(B\/sec\)/X\1/' |
|
54 | 54 | cd local-stream |
|
55 | 55 | hg verify |
|
56 | 56 | cd .. |
|
57 | 57 | |
|
58 | 58 | echo "# clone remote via pull" |
|
59 | 59 | hg clone -e "python ./dummyssh" ssh://user@dummy/remote local |
|
60 | 60 | |
|
61 | 61 | echo "# verify" |
|
62 | 62 | cd local |
|
63 | 63 | hg verify |
|
64 | 64 | |
|
65 | 65 | echo '[hooks]' >> .hg/hgrc |
|
66 | 66 | echo 'changegroup = python ../printenv.py changegroup-in-local 0 ../dummylog' >> .hg/hgrc |
|
67 | 67 | |
|
68 | 68 | echo "# empty default pull" |
|
69 | 69 | hg paths |
|
70 | 70 | hg pull -e "python ../dummyssh" |
|
71 | 71 | |
|
72 | 72 | echo "# local change" |
|
73 | 73 | echo bleah > foo |
|
74 |
hg ci -m "add" |
|
|
74 | hg ci -m "add" | |
|
75 | 75 | |
|
76 | 76 | echo "# updating rc" |
|
77 | 77 | echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc |
|
78 | 78 | echo "[ui]" >> .hg/hgrc |
|
79 | 79 | echo "ssh = python ../dummyssh" >> .hg/hgrc |
|
80 | 80 | |
|
81 | 81 | echo "# find outgoing" |
|
82 | 82 | hg out ssh://user@dummy/remote |
|
83 | 83 | |
|
84 | 84 | echo "# find incoming on the remote side" |
|
85 | 85 | hg incoming -R ../remote -e "python ../dummyssh" ssh://user@dummy/local |
|
86 | 86 | |
|
87 | 87 | echo "# push" |
|
88 | 88 | hg push |
|
89 | 89 | |
|
90 | 90 | cd ../remote |
|
91 | 91 | |
|
92 | 92 | echo "# check remote tip" |
|
93 | 93 | hg tip |
|
94 | 94 | hg verify |
|
95 | 95 | hg cat -r tip foo |
|
96 | 96 | |
|
97 | 97 | echo z > z |
|
98 |
hg ci -A -m z |
|
|
98 | hg ci -A -m z z | |
|
99 | 99 | # a bad, evil hook that prints to stdout |
|
100 | 100 | echo 'changegroup.stdout = python ../badhook' >> .hg/hgrc |
|
101 | 101 | |
|
102 | 102 | cd ../local |
|
103 | 103 | echo r > r |
|
104 |
hg ci -A -m z |
|
|
104 | hg ci -A -m z r | |
|
105 | 105 | |
|
106 | 106 | echo "# push should succeed even though it has an unexpected response" |
|
107 | 107 | hg push |
|
108 | 108 | hg -R ../remote heads |
|
109 | 109 | |
|
110 | 110 | cd .. |
|
111 | 111 | cat dummylog |
@@ -1,107 +1,107 b'' | |||
|
1 | 1 | # creating 'remote' |
|
2 | 2 | # repo not found error |
|
3 | 3 | remote: abort: There is no Mercurial repository here (.hg not found)! |
|
4 | 4 | abort: no suitable response from remote hg! |
|
5 | 5 | # clone remote via stream |
|
6 | 6 | streaming all changes |
|
7 | 7 | XXX files to transfer, XXX bytes of data |
|
8 | 8 | transferred XXX bytes in XXX seconds (XXX XB/sec) |
|
9 | 9 | updating to branch default |
|
10 | 10 | XXX files updated, XXX files merged, XXX files removed, XXX files unresolved |
|
11 | 11 | checking changesets |
|
12 | 12 | checking manifests |
|
13 | 13 | crosschecking files in changesets and manifests |
|
14 | 14 | checking files |
|
15 | 15 | 2 files, 1 changesets, 2 total revisions |
|
16 | 16 | # clone remote via pull |
|
17 | 17 | requesting all changes |
|
18 | 18 | adding changesets |
|
19 | 19 | adding manifests |
|
20 | 20 | adding file changes |
|
21 | 21 | added 1 changesets with 2 changes to 2 files |
|
22 | 22 | updating to branch default |
|
23 | 23 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
24 | 24 | # verify |
|
25 | 25 | checking changesets |
|
26 | 26 | checking manifests |
|
27 | 27 | crosschecking files in changesets and manifests |
|
28 | 28 | checking files |
|
29 | 29 | 2 files, 1 changesets, 2 total revisions |
|
30 | 30 | # empty default pull |
|
31 | 31 | default = ssh://user@dummy/remote |
|
32 | 32 | pulling from ssh://user@dummy/remote |
|
33 | 33 | searching for changes |
|
34 | 34 | no changes found |
|
35 | 35 | # local change |
|
36 | 36 | # updating rc |
|
37 | 37 | # find outgoing |
|
38 | 38 | comparing with ssh://user@dummy/remote |
|
39 | 39 | searching for changes |
|
40 |
changeset: 1: |
|
|
40 | changeset: 1:a28a9d1a809c | |
|
41 | 41 | tag: tip |
|
42 | 42 | user: test |
|
43 |
date: |
|
|
43 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
44 | 44 | summary: add |
|
45 | 45 | |
|
46 | 46 | # find incoming on the remote side |
|
47 | 47 | comparing with ssh://user@dummy/local |
|
48 | 48 | searching for changes |
|
49 |
changeset: 1: |
|
|
49 | changeset: 1:a28a9d1a809c | |
|
50 | 50 | tag: tip |
|
51 | 51 | user: test |
|
52 |
date: |
|
|
52 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
53 | 53 | summary: add |
|
54 | 54 | |
|
55 | 55 | # push |
|
56 | 56 | pushing to ssh://user@dummy/remote |
|
57 | 57 | searching for changes |
|
58 | 58 | remote: adding changesets |
|
59 | 59 | remote: adding manifests |
|
60 | 60 | remote: adding file changes |
|
61 | 61 | remote: added 1 changesets with 1 changes to 1 files |
|
62 | 62 | # check remote tip |
|
63 |
changeset: 1: |
|
|
63 | changeset: 1:a28a9d1a809c | |
|
64 | 64 | tag: tip |
|
65 | 65 | user: test |
|
66 |
date: |
|
|
66 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
67 | 67 | summary: add |
|
68 | 68 | |
|
69 | 69 | checking changesets |
|
70 | 70 | checking manifests |
|
71 | 71 | crosschecking files in changesets and manifests |
|
72 | 72 | checking files |
|
73 | 73 | 2 files, 2 changesets, 3 total revisions |
|
74 | 74 | bleah |
|
75 | 75 | created new head |
|
76 | 76 | # push should succeed even though it has an unexpected response |
|
77 | 77 | pushing to ssh://user@dummy/remote |
|
78 | 78 | searching for changes |
|
79 | 79 | note: unsynced remote changes! |
|
80 | 80 | remote: adding changesets |
|
81 | 81 | remote: adding manifests |
|
82 | 82 | remote: adding file changes |
|
83 | 83 | remote: added 1 changesets with 1 changes to 1 files |
|
84 | 84 | remote: KABOOM |
|
85 |
changeset: 3: |
|
|
85 | changeset: 3:1383141674ec | |
|
86 | 86 | tag: tip |
|
87 |
parent: 1: |
|
|
87 | parent: 1:a28a9d1a809c | |
|
88 | 88 | user: test |
|
89 |
date: |
|
|
89 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
90 | 90 | summary: z |
|
91 | 91 | |
|
92 |
changeset: 2: |
|
|
93 |
parent: 0: |
|
|
92 | changeset: 2:6c0482d977a3 | |
|
93 | parent: 0:1160648e36ce | |
|
94 | 94 | user: test |
|
95 |
date: |
|
|
95 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
96 | 96 | summary: z |
|
97 | 97 | |
|
98 | 98 | Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio |
|
99 | 99 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
100 | 100 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
101 | 101 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
102 | 102 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
103 | 103 | Got arguments 1:user@dummy 2:hg -R local serve --stdio |
|
104 | 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 | 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 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | 3 | cp "$TESTDIR"/printenv.py . |
|
4 | 4 | |
|
5 | 5 | hg clone http://localhost:$HGPORT/ copy |
|
6 | 6 | echo $? |
|
7 | 7 | test -d copy || echo copy: No such file or directory |
|
8 | 8 | |
|
9 | 9 | # This server doesn't do range requests so it's basically only good for |
|
10 | 10 | # one pull |
|
11 | 11 | cat > dumb.py <<EOF |
|
12 | 12 | import BaseHTTPServer, SimpleHTTPServer, os, signal |
|
13 | 13 | |
|
14 | 14 | def run(server_class=BaseHTTPServer.HTTPServer, |
|
15 | 15 | handler_class=SimpleHTTPServer.SimpleHTTPRequestHandler): |
|
16 | 16 | server_address = ('localhost', int(os.environ['HGPORT'])) |
|
17 | 17 | httpd = server_class(server_address, handler_class) |
|
18 | 18 | httpd.serve_forever() |
|
19 | 19 | |
|
20 | 20 | signal.signal(signal.SIGTERM, lambda x: sys.exit(0)) |
|
21 | 21 | run() |
|
22 | 22 | EOF |
|
23 | 23 | |
|
24 | 24 | python dumb.py 2>/dev/null & |
|
25 | 25 | echo $! >> $DAEMON_PIDS |
|
26 | 26 | |
|
27 | 27 | mkdir remote |
|
28 | 28 | cd remote |
|
29 | 29 | hg init |
|
30 | 30 | echo foo > bar |
|
31 | 31 | hg add bar |
|
32 |
hg commit -m"test" |
|
|
32 | hg commit -m"test" | |
|
33 | 33 | hg tip |
|
34 | 34 | |
|
35 | 35 | cd .. |
|
36 | 36 | |
|
37 | 37 | hg clone static-http://localhost:$HGPORT/remote local | sed -e "s,:$HGPORT/,:\$HGPORT/," |
|
38 | 38 | |
|
39 | 39 | cd local |
|
40 | 40 | hg verify |
|
41 | 41 | cat bar |
|
42 | 42 | |
|
43 | 43 | cd ../remote |
|
44 | 44 | echo baz > quux |
|
45 |
hg commit -A -mtest2 |
|
|
45 | hg commit -A -mtest2 | |
|
46 | 46 | # check for HTTP opener failures when cachefile does not exist |
|
47 | 47 | rm .hg/*.cache |
|
48 | 48 | |
|
49 | 49 | cd ../local |
|
50 | 50 | echo '[hooks]' >> .hg/hgrc |
|
51 | 51 | echo 'changegroup = python ../printenv.py changegroup' >> .hg/hgrc |
|
52 | 52 | hg pull | sed -e "s,:$HGPORT/,:\$HGPORT/," |
|
53 | 53 | |
|
54 | 54 | echo '% trying to push' |
|
55 | 55 | hg update |
|
56 | 56 | echo more foo >> bar |
|
57 |
hg commit -m"test" |
|
|
57 | hg commit -m"test" | |
|
58 | 58 | hg push | sed -e "s,:$HGPORT/,:\$HGPORT/," |
|
59 | 59 | |
|
60 | 60 | echo '% trying clone -r' |
|
61 | 61 | cd .. |
|
62 | 62 | hg clone -r donotexist static-http://localhost:$HGPORT/remote local0 | sed -e "s,:$HGPORT/,:\$HGPORT/," |
|
63 | 63 | hg clone -r 0 static-http://localhost:$HGPORT/remote local0 | sed -e "s,:$HGPORT/,:\$HGPORT/," |
|
64 | 64 | |
|
65 | 65 | echo '% test with "/" URI (issue 747)' |
|
66 | 66 | hg init |
|
67 | 67 | echo a > a |
|
68 | 68 | hg add a |
|
69 | 69 | hg ci -ma |
|
70 | 70 | |
|
71 | 71 | hg clone static-http://localhost:$HGPORT/ local2 | sed -e "s,:$HGPORT/,:\$HGPORT/," |
|
72 | 72 | |
|
73 | 73 | cd local2 |
|
74 | 74 | hg verify |
|
75 | 75 | cat a |
|
76 | 76 | hg paths | sed -e "s,:$HGPORT/,:\$HGPORT/," |
|
77 | 77 | |
|
78 | 78 | echo '% test with empty repo (issue965)' |
|
79 | 79 | cd .. |
|
80 | 80 | hg init remotempty |
|
81 | 81 | |
|
82 | 82 | hg clone static-http://localhost:$HGPORT/remotempty local3 | sed -e "s,:$HGPORT/,:\$HGPORT/," |
|
83 | 83 | |
|
84 | 84 | cd local3 |
|
85 | 85 | hg verify |
|
86 | 86 | hg paths | sed -e "s,:$HGPORT/,:\$HGPORT/," |
|
87 | 87 | |
|
88 | 88 | echo '% test with non-repo' |
|
89 | 89 | cd .. |
|
90 | 90 | mkdir notarepo |
|
91 | 91 | hg clone static-http://localhost:$HGPORT/notarepo local3 2>&1 | sed -e "s,:$HGPORT/,:\$HGPORT/," |
|
92 | 92 | |
|
93 | 93 | kill $! |
@@ -1,71 +1,71 b'' | |||
|
1 | 1 | abort: error: Connection refused |
|
2 | 2 | 255 |
|
3 | 3 | copy: No such file or directory |
|
4 |
changeset: 0: |
|
|
4 | changeset: 0:61c9426e69fe | |
|
5 | 5 | tag: tip |
|
6 | 6 | user: test |
|
7 |
date: |
|
|
7 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
8 | 8 | summary: test |
|
9 | 9 | |
|
10 | 10 | requesting all changes |
|
11 | 11 | adding changesets |
|
12 | 12 | adding manifests |
|
13 | 13 | adding file changes |
|
14 | 14 | added 1 changesets with 1 changes to 1 files |
|
15 | 15 | updating to branch default |
|
16 | 16 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
17 | 17 | checking changesets |
|
18 | 18 | checking manifests |
|
19 | 19 | crosschecking files in changesets and manifests |
|
20 | 20 | checking files |
|
21 | 21 | 1 files, 1 changesets, 1 total revisions |
|
22 | 22 | foo |
|
23 | 23 | adding quux |
|
24 |
changegroup hook: HG_NODE= |
|
|
24 | changegroup hook: HG_NODE=822d6e31f08b9d6e3b898ce5e52efc0a4bf4905a HG_SOURCE=pull HG_URL=http://localhost:$HGPORT/remote | |
|
25 | 25 | pulling from static-http://localhost:$HGPORT/remote |
|
26 | 26 | searching for changes |
|
27 | 27 | adding changesets |
|
28 | 28 | adding manifests |
|
29 | 29 | adding file changes |
|
30 | 30 | added 1 changesets with 1 changes to 1 files |
|
31 | 31 | (run 'hg update' to get a working copy) |
|
32 | 32 | % trying to push |
|
33 | 33 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
34 | 34 | abort: cannot lock static-http repository |
|
35 | 35 | pushing to static-http://localhost:$HGPORT/remote |
|
36 | 36 | % trying clone -r |
|
37 | 37 | abort: unknown revision 'donotexist'! |
|
38 | 38 | requesting all changes |
|
39 | 39 | adding changesets |
|
40 | 40 | adding manifests |
|
41 | 41 | adding file changes |
|
42 | 42 | added 1 changesets with 1 changes to 1 files |
|
43 | 43 | updating to branch default |
|
44 | 44 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
45 | 45 | % test with "/" URI (issue 747) |
|
46 | 46 | requesting all changes |
|
47 | 47 | adding changesets |
|
48 | 48 | adding manifests |
|
49 | 49 | adding file changes |
|
50 | 50 | added 1 changesets with 1 changes to 1 files |
|
51 | 51 | updating to branch default |
|
52 | 52 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
53 | 53 | checking changesets |
|
54 | 54 | checking manifests |
|
55 | 55 | crosschecking files in changesets and manifests |
|
56 | 56 | checking files |
|
57 | 57 | 1 files, 1 changesets, 1 total revisions |
|
58 | 58 | a |
|
59 | 59 | default = static-http://localhost:$HGPORT/ |
|
60 | 60 | % test with empty repo (issue965) |
|
61 | 61 | no changes found |
|
62 | 62 | updating to branch default |
|
63 | 63 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
64 | 64 | checking changesets |
|
65 | 65 | checking manifests |
|
66 | 66 | crosschecking files in changesets and manifests |
|
67 | 67 | checking files |
|
68 | 68 | 0 files, 0 changesets, 0 total revisions |
|
69 | 69 | default = static-http://localhost:$HGPORT/remotempty |
|
70 | 70 | % test with non-repo |
|
71 | 71 | abort: 'http://localhost:$HGPORT/notarepo' does not appear to be an hg repository! |
@@ -1,277 +1,277 b'' | |||
|
1 | 1 | $ echo "[extensions]" >> $HGRCPATH |
|
2 | 2 | $ echo "color=" >> $HGRCPATH |
|
3 | 3 | $ echo "[color]" >> $HGRCPATH |
|
4 | 4 | $ echo "mode=ansi" >> $HGRCPATH |
|
5 | 5 | |
|
6 | 6 | $ hg init repo1 |
|
7 | 7 | $ cd repo1 |
|
8 | 8 | $ mkdir a b a/1 b/1 b/2 |
|
9 | 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 | 11 | hg status in repo root: |
|
12 | 12 | |
|
13 | 13 | $ hg status --color=always |
|
14 | 14 | [0;35;1;4m? a/1/in_a_1[0m |
|
15 | 15 | [0;35;1;4m? a/in_a[0m |
|
16 | 16 | [0;35;1;4m? b/1/in_b_1[0m |
|
17 | 17 | [0;35;1;4m? b/2/in_b_2[0m |
|
18 | 18 | [0;35;1;4m? b/in_b[0m |
|
19 | 19 | [0;35;1;4m? in_root[0m |
|
20 | 20 | |
|
21 | 21 | hg status . in repo root: |
|
22 | 22 | |
|
23 | 23 | $ hg status --color=always . |
|
24 | 24 | [0;35;1;4m? a/1/in_a_1[0m |
|
25 | 25 | [0;35;1;4m? a/in_a[0m |
|
26 | 26 | [0;35;1;4m? b/1/in_b_1[0m |
|
27 | 27 | [0;35;1;4m? b/2/in_b_2[0m |
|
28 | 28 | [0;35;1;4m? b/in_b[0m |
|
29 | 29 | [0;35;1;4m? in_root[0m |
|
30 | 30 | |
|
31 | 31 | $ hg status --color=always --cwd a |
|
32 | 32 | [0;35;1;4m? a/1/in_a_1[0m |
|
33 | 33 | [0;35;1;4m? a/in_a[0m |
|
34 | 34 | [0;35;1;4m? b/1/in_b_1[0m |
|
35 | 35 | [0;35;1;4m? b/2/in_b_2[0m |
|
36 | 36 | [0;35;1;4m? b/in_b[0m |
|
37 | 37 | [0;35;1;4m? in_root[0m |
|
38 | 38 | $ hg status --color=always --cwd a . |
|
39 | 39 | [0;35;1;4m? 1/in_a_1[0m |
|
40 | 40 | [0;35;1;4m? in_a[0m |
|
41 | 41 | $ hg status --color=always --cwd a .. |
|
42 | 42 | [0;35;1;4m? 1/in_a_1[0m |
|
43 | 43 | [0;35;1;4m? in_a[0m |
|
44 | 44 | [0;35;1;4m? ../b/1/in_b_1[0m |
|
45 | 45 | [0;35;1;4m? ../b/2/in_b_2[0m |
|
46 | 46 | [0;35;1;4m? ../b/in_b[0m |
|
47 | 47 | [0;35;1;4m? ../in_root[0m |
|
48 | 48 | |
|
49 | 49 | $ hg status --color=always --cwd b |
|
50 | 50 | [0;35;1;4m? a/1/in_a_1[0m |
|
51 | 51 | [0;35;1;4m? a/in_a[0m |
|
52 | 52 | [0;35;1;4m? b/1/in_b_1[0m |
|
53 | 53 | [0;35;1;4m? b/2/in_b_2[0m |
|
54 | 54 | [0;35;1;4m? b/in_b[0m |
|
55 | 55 | [0;35;1;4m? in_root[0m |
|
56 | 56 | $ hg status --color=always --cwd b . |
|
57 | 57 | [0;35;1;4m? 1/in_b_1[0m |
|
58 | 58 | [0;35;1;4m? 2/in_b_2[0m |
|
59 | 59 | [0;35;1;4m? in_b[0m |
|
60 | 60 | $ hg status --color=always --cwd b .. |
|
61 | 61 | [0;35;1;4m? ../a/1/in_a_1[0m |
|
62 | 62 | [0;35;1;4m? ../a/in_a[0m |
|
63 | 63 | [0;35;1;4m? 1/in_b_1[0m |
|
64 | 64 | [0;35;1;4m? 2/in_b_2[0m |
|
65 | 65 | [0;35;1;4m? in_b[0m |
|
66 | 66 | [0;35;1;4m? ../in_root[0m |
|
67 | 67 | |
|
68 | 68 | $ hg status --color=always --cwd a/1 |
|
69 | 69 | [0;35;1;4m? a/1/in_a_1[0m |
|
70 | 70 | [0;35;1;4m? a/in_a[0m |
|
71 | 71 | [0;35;1;4m? b/1/in_b_1[0m |
|
72 | 72 | [0;35;1;4m? b/2/in_b_2[0m |
|
73 | 73 | [0;35;1;4m? b/in_b[0m |
|
74 | 74 | [0;35;1;4m? in_root[0m |
|
75 | 75 | $ hg status --color=always --cwd a/1 . |
|
76 | 76 | [0;35;1;4m? in_a_1[0m |
|
77 | 77 | $ hg status --color=always --cwd a/1 .. |
|
78 | 78 | [0;35;1;4m? in_a_1[0m |
|
79 | 79 | [0;35;1;4m? ../in_a[0m |
|
80 | 80 | |
|
81 | 81 | $ hg status --color=always --cwd b/1 |
|
82 | 82 | [0;35;1;4m? a/1/in_a_1[0m |
|
83 | 83 | [0;35;1;4m? a/in_a[0m |
|
84 | 84 | [0;35;1;4m? b/1/in_b_1[0m |
|
85 | 85 | [0;35;1;4m? b/2/in_b_2[0m |
|
86 | 86 | [0;35;1;4m? b/in_b[0m |
|
87 | 87 | [0;35;1;4m? in_root[0m |
|
88 | 88 | $ hg status --color=always --cwd b/1 . |
|
89 | 89 | [0;35;1;4m? in_b_1[0m |
|
90 | 90 | $ hg status --color=always --cwd b/1 .. |
|
91 | 91 | [0;35;1;4m? in_b_1[0m |
|
92 | 92 | [0;35;1;4m? ../2/in_b_2[0m |
|
93 | 93 | [0;35;1;4m? ../in_b[0m |
|
94 | 94 | |
|
95 | 95 | $ hg status --color=always --cwd b/2 |
|
96 | 96 | [0;35;1;4m? a/1/in_a_1[0m |
|
97 | 97 | [0;35;1;4m? a/in_a[0m |
|
98 | 98 | [0;35;1;4m? b/1/in_b_1[0m |
|
99 | 99 | [0;35;1;4m? b/2/in_b_2[0m |
|
100 | 100 | [0;35;1;4m? b/in_b[0m |
|
101 | 101 | [0;35;1;4m? in_root[0m |
|
102 | 102 | $ hg status --color=always --cwd b/2 . |
|
103 | 103 | [0;35;1;4m? in_b_2[0m |
|
104 | 104 | $ hg status --color=always --cwd b/2 .. |
|
105 | 105 | [0;35;1;4m? ../1/in_b_1[0m |
|
106 | 106 | [0;35;1;4m? in_b_2[0m |
|
107 | 107 | [0;35;1;4m? ../in_b[0m |
|
108 | 108 | $ cd .. |
|
109 | 109 | |
|
110 | 110 | $ hg init repo2 |
|
111 | 111 | $ cd repo2 |
|
112 | 112 | $ touch modified removed deleted ignored |
|
113 | 113 | $ echo "^ignored$" > .hgignore |
|
114 |
$ hg ci -A -m 'initial checkin' |
|
|
114 | $ hg ci -A -m 'initial checkin' | |
|
115 | 115 | adding .hgignore |
|
116 | 116 | adding deleted |
|
117 | 117 | adding modified |
|
118 | 118 | adding removed |
|
119 | 119 | $ touch modified added unknown ignored |
|
120 | 120 | $ hg add added |
|
121 | 121 | $ hg remove removed |
|
122 | 122 | $ rm deleted |
|
123 | 123 | |
|
124 | 124 | hg status: |
|
125 | 125 | |
|
126 | 126 | $ hg status --color=always |
|
127 | 127 | [0;32;1mA added[0m |
|
128 | 128 | [0;31;1mR removed[0m |
|
129 | 129 | [0;36;1;4m! deleted[0m |
|
130 | 130 | [0;35;1;4m? unknown[0m |
|
131 | 131 | |
|
132 | 132 | hg status modified added removed deleted unknown never-existed ignored: |
|
133 | 133 | |
|
134 | 134 | $ hg status --color=always modified added removed deleted unknown never-existed ignored |
|
135 | 135 | never-existed: No such file or directory |
|
136 | 136 | [0;32;1mA added[0m |
|
137 | 137 | [0;31;1mR removed[0m |
|
138 | 138 | [0;36;1;4m! deleted[0m |
|
139 | 139 | [0;35;1;4m? unknown[0m |
|
140 | 140 | |
|
141 | 141 | $ hg copy modified copied |
|
142 | 142 | |
|
143 | 143 | hg status -C: |
|
144 | 144 | |
|
145 | 145 | $ hg status --color=always -C |
|
146 | 146 | [0;32;1mA added[0m |
|
147 | 147 | [0;32;1mA copied[0m |
|
148 | 148 | [0;0m modified[0m |
|
149 | 149 | [0;31;1mR removed[0m |
|
150 | 150 | [0;36;1;4m! deleted[0m |
|
151 | 151 | [0;35;1;4m? unknown[0m |
|
152 | 152 | |
|
153 | 153 | hg status -A: |
|
154 | 154 | |
|
155 | 155 | $ hg status --color=always -A |
|
156 | 156 | [0;32;1mA added[0m |
|
157 | 157 | [0;32;1mA copied[0m |
|
158 | 158 | [0;0m modified[0m |
|
159 | 159 | [0;31;1mR removed[0m |
|
160 | 160 | [0;36;1;4m! deleted[0m |
|
161 | 161 | [0;35;1;4m? unknown[0m |
|
162 | 162 | [0;30;1mI ignored[0m |
|
163 | 163 | [0;0mC .hgignore[0m |
|
164 | 164 | [0;0mC modified[0m |
|
165 | 165 | |
|
166 | 166 | |
|
167 | 167 | $ echo "^ignoreddir$" > .hgignore |
|
168 | 168 | $ mkdir ignoreddir |
|
169 | 169 | $ touch ignoreddir/file |
|
170 | 170 | |
|
171 | 171 | hg status ignoreddir/file: |
|
172 | 172 | |
|
173 | 173 | $ hg status --color=always ignoreddir/file |
|
174 | 174 | |
|
175 | 175 | hg status -i ignoreddir/file: |
|
176 | 176 | |
|
177 | 177 | $ hg status --color=always -i ignoreddir/file |
|
178 | 178 | [0;30;1mI ignoreddir/file[0m |
|
179 | 179 | $ cd .. |
|
180 | 180 | |
|
181 | 181 | # check 'status -q' and some combinations |
|
182 | 182 | |
|
183 | 183 | $ hg init repo3 |
|
184 | 184 | $ cd repo3 |
|
185 | 185 | $ touch modified removed deleted ignored |
|
186 | 186 | $ echo "^ignored$" > .hgignore |
|
187 | 187 | $ hg commit -A -m 'initial checkin' |
|
188 | 188 | adding .hgignore |
|
189 | 189 | adding deleted |
|
190 | 190 | adding modified |
|
191 | 191 | adding removed |
|
192 | 192 | $ touch added unknown ignored |
|
193 | 193 | $ hg add added |
|
194 | 194 | $ echo "test" >> modified |
|
195 | 195 | $ hg remove removed |
|
196 | 196 | $ rm deleted |
|
197 | 197 | $ hg copy modified copied |
|
198 | 198 | |
|
199 | 199 | test unknown color |
|
200 | 200 | |
|
201 | 201 | $ hg --config color.status.modified=periwinkle status --color=always |
|
202 | 202 | ignoring unknown color/effect 'periwinkle' (configured in color.status.modified) |
|
203 | 203 | M modified |
|
204 | 204 | [0;32;1mA added[0m |
|
205 | 205 | [0;32;1mA copied[0m |
|
206 | 206 | [0;31;1mR removed[0m |
|
207 | 207 | [0;36;1;4m! deleted[0m |
|
208 | 208 | [0;35;1;4m? unknown[0m |
|
209 | 209 | |
|
210 | 210 | # Run status with 2 different flags. |
|
211 | 211 | # Check if result is the same or different. |
|
212 | 212 | # If result is not as expected, raise error |
|
213 | 213 | $ assert() { |
|
214 | 214 | > hg status --color=always $1 > ../a |
|
215 | 215 | > hg status --color=always $2 > ../b |
|
216 | 216 | > out=`diff ../a ../b` |
|
217 | 217 | > if [ $? -ne 0 ]; then |
|
218 | 218 | > out=1 |
|
219 | 219 | > else |
|
220 | 220 | > out=0 |
|
221 | 221 | > fi |
|
222 | 222 | > if [ $3 -eq 0 ]; then |
|
223 | 223 | > df="same" |
|
224 | 224 | > else |
|
225 | 225 | > df="different" |
|
226 | 226 | > fi |
|
227 | 227 | > if [ $out -ne $3 ]; then |
|
228 | 228 | > echo "Error on $1 and $2, should be $df." |
|
229 | 229 | > fi |
|
230 | 230 | > } |
|
231 | 231 | |
|
232 | 232 | # assert flag1 flag2 [0-same | 1-different] |
|
233 | 233 | |
|
234 | 234 | $ assert "-q" "-mard" 0 |
|
235 | 235 | $ assert "-A" "-marduicC" 0 |
|
236 | 236 | $ assert "-qA" "-mardcC" 0 |
|
237 | 237 | $ assert "-qAui" "-A" 0 |
|
238 | 238 | $ assert "-qAu" "-marducC" 0 |
|
239 | 239 | $ assert "-qAi" "-mardicC" 0 |
|
240 | 240 | $ assert "-qu" "-u" 0 |
|
241 | 241 | $ assert "-q" "-u" 1 |
|
242 | 242 | $ assert "-m" "-a" 1 |
|
243 | 243 | $ assert "-r" "-d" 1 |
|
244 | 244 | $ cd .. |
|
245 | 245 | |
|
246 | 246 | # test 'resolve -l' |
|
247 | 247 | $ hg init repo4 |
|
248 | 248 | $ cd repo4 |
|
249 | 249 | $ echo "file a" > a |
|
250 | 250 | $ echo "file b" > b |
|
251 | 251 | $ hg add a b |
|
252 | 252 | $ hg commit -m "initial" |
|
253 | 253 | $ echo "file a change 1" > a |
|
254 | 254 | $ echo "file b change 1" > b |
|
255 | 255 | $ hg commit -m "head 1" |
|
256 | 256 | $ hg update 0 |
|
257 | 257 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
258 | 258 | $ echo "file a change 2" > a |
|
259 | 259 | $ echo "file b change 2" > b |
|
260 | 260 | $ hg commit -m "head 2" |
|
261 | 261 | created new head |
|
262 | 262 | $ hg merge |
|
263 | 263 | merging a |
|
264 | 264 | warning: conflicts during merge. |
|
265 | 265 | merging a failed! |
|
266 | 266 | merging b |
|
267 | 267 | warning: conflicts during merge. |
|
268 | 268 | merging b failed! |
|
269 | 269 | 0 files updated, 0 files merged, 0 files removed, 2 files unresolved |
|
270 | 270 | use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon |
|
271 | 271 | $ hg resolve -m b |
|
272 | 272 | |
|
273 | 273 | hg resolve with one unresolved, one resolved: |
|
274 | 274 | |
|
275 | 275 | $ hg resolve --color=always -l |
|
276 | 276 | [0;31;1mU a[0m |
|
277 | 277 | [0;32;1mR b[0m |
@@ -1,275 +1,275 b'' | |||
|
1 | 1 | $ hg init repo1 |
|
2 | 2 | $ cd repo1 |
|
3 | 3 | $ mkdir a b a/1 b/1 b/2 |
|
4 | 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 | 6 | hg status in repo root: |
|
7 | 7 | |
|
8 | 8 | $ hg status |
|
9 | 9 | ? a/1/in_a_1 |
|
10 | 10 | ? a/in_a |
|
11 | 11 | ? b/1/in_b_1 |
|
12 | 12 | ? b/2/in_b_2 |
|
13 | 13 | ? b/in_b |
|
14 | 14 | ? in_root |
|
15 | 15 | |
|
16 | 16 | hg status . in repo root: |
|
17 | 17 | |
|
18 | 18 | $ hg status . |
|
19 | 19 | ? a/1/in_a_1 |
|
20 | 20 | ? a/in_a |
|
21 | 21 | ? b/1/in_b_1 |
|
22 | 22 | ? b/2/in_b_2 |
|
23 | 23 | ? b/in_b |
|
24 | 24 | ? in_root |
|
25 | 25 | |
|
26 | 26 | $ hg status --cwd a |
|
27 | 27 | ? a/1/in_a_1 |
|
28 | 28 | ? a/in_a |
|
29 | 29 | ? b/1/in_b_1 |
|
30 | 30 | ? b/2/in_b_2 |
|
31 | 31 | ? b/in_b |
|
32 | 32 | ? in_root |
|
33 | 33 | $ hg status --cwd a . |
|
34 | 34 | ? 1/in_a_1 |
|
35 | 35 | ? in_a |
|
36 | 36 | $ hg status --cwd a .. |
|
37 | 37 | ? 1/in_a_1 |
|
38 | 38 | ? in_a |
|
39 | 39 | ? ../b/1/in_b_1 |
|
40 | 40 | ? ../b/2/in_b_2 |
|
41 | 41 | ? ../b/in_b |
|
42 | 42 | ? ../in_root |
|
43 | 43 | |
|
44 | 44 | $ hg status --cwd b |
|
45 | 45 | ? a/1/in_a_1 |
|
46 | 46 | ? a/in_a |
|
47 | 47 | ? b/1/in_b_1 |
|
48 | 48 | ? b/2/in_b_2 |
|
49 | 49 | ? b/in_b |
|
50 | 50 | ? in_root |
|
51 | 51 | $ hg status --cwd b . |
|
52 | 52 | ? 1/in_b_1 |
|
53 | 53 | ? 2/in_b_2 |
|
54 | 54 | ? in_b |
|
55 | 55 | $ hg status --cwd b .. |
|
56 | 56 | ? ../a/1/in_a_1 |
|
57 | 57 | ? ../a/in_a |
|
58 | 58 | ? 1/in_b_1 |
|
59 | 59 | ? 2/in_b_2 |
|
60 | 60 | ? in_b |
|
61 | 61 | ? ../in_root |
|
62 | 62 | |
|
63 | 63 | $ hg status --cwd a/1 |
|
64 | 64 | ? a/1/in_a_1 |
|
65 | 65 | ? a/in_a |
|
66 | 66 | ? b/1/in_b_1 |
|
67 | 67 | ? b/2/in_b_2 |
|
68 | 68 | ? b/in_b |
|
69 | 69 | ? in_root |
|
70 | 70 | $ hg status --cwd a/1 . |
|
71 | 71 | ? in_a_1 |
|
72 | 72 | $ hg status --cwd a/1 .. |
|
73 | 73 | ? in_a_1 |
|
74 | 74 | ? ../in_a |
|
75 | 75 | |
|
76 | 76 | $ hg status --cwd b/1 |
|
77 | 77 | ? a/1/in_a_1 |
|
78 | 78 | ? a/in_a |
|
79 | 79 | ? b/1/in_b_1 |
|
80 | 80 | ? b/2/in_b_2 |
|
81 | 81 | ? b/in_b |
|
82 | 82 | ? in_root |
|
83 | 83 | $ hg status --cwd b/1 . |
|
84 | 84 | ? in_b_1 |
|
85 | 85 | $ hg status --cwd b/1 .. |
|
86 | 86 | ? in_b_1 |
|
87 | 87 | ? ../2/in_b_2 |
|
88 | 88 | ? ../in_b |
|
89 | 89 | |
|
90 | 90 | $ hg status --cwd b/2 |
|
91 | 91 | ? a/1/in_a_1 |
|
92 | 92 | ? a/in_a |
|
93 | 93 | ? b/1/in_b_1 |
|
94 | 94 | ? b/2/in_b_2 |
|
95 | 95 | ? b/in_b |
|
96 | 96 | ? in_root |
|
97 | 97 | $ hg status --cwd b/2 . |
|
98 | 98 | ? in_b_2 |
|
99 | 99 | $ hg status --cwd b/2 .. |
|
100 | 100 | ? ../1/in_b_1 |
|
101 | 101 | ? in_b_2 |
|
102 | 102 | ? ../in_b |
|
103 | 103 | $ cd .. |
|
104 | 104 | |
|
105 | 105 | $ hg init repo2 |
|
106 | 106 | $ cd repo2 |
|
107 | 107 | $ touch modified removed deleted ignored |
|
108 | 108 | $ echo "^ignored$" > .hgignore |
|
109 |
$ hg ci -A -m 'initial checkin' |
|
|
109 | $ hg ci -A -m 'initial checkin' | |
|
110 | 110 | adding .hgignore |
|
111 | 111 | adding deleted |
|
112 | 112 | adding modified |
|
113 | 113 | adding removed |
|
114 | 114 | $ touch modified added unknown ignored |
|
115 | 115 | $ hg add added |
|
116 | 116 | $ hg remove removed |
|
117 | 117 | $ rm deleted |
|
118 | 118 | |
|
119 | 119 | hg status: |
|
120 | 120 | |
|
121 | 121 | $ hg status |
|
122 | 122 | A added |
|
123 | 123 | R removed |
|
124 | 124 | ! deleted |
|
125 | 125 | ? unknown |
|
126 | 126 | |
|
127 | 127 | hg status modified added removed deleted unknown never-existed ignored: |
|
128 | 128 | |
|
129 | 129 | $ hg status modified added removed deleted unknown never-existed ignored |
|
130 | 130 | never-existed: No such file or directory |
|
131 | 131 | A added |
|
132 | 132 | R removed |
|
133 | 133 | ! deleted |
|
134 | 134 | ? unknown |
|
135 | 135 | |
|
136 | 136 | $ hg copy modified copied |
|
137 | 137 | |
|
138 | 138 | hg status -C: |
|
139 | 139 | |
|
140 | 140 | $ hg status -C |
|
141 | 141 | A added |
|
142 | 142 | A copied |
|
143 | 143 | modified |
|
144 | 144 | R removed |
|
145 | 145 | ! deleted |
|
146 | 146 | ? unknown |
|
147 | 147 | |
|
148 | 148 | hg status -A: |
|
149 | 149 | |
|
150 | 150 | $ hg status -A |
|
151 | 151 | A added |
|
152 | 152 | A copied |
|
153 | 153 | modified |
|
154 | 154 | R removed |
|
155 | 155 | ! deleted |
|
156 | 156 | ? unknown |
|
157 | 157 | I ignored |
|
158 | 158 | C .hgignore |
|
159 | 159 | C modified |
|
160 | 160 | |
|
161 | 161 | |
|
162 | 162 | $ echo "^ignoreddir$" > .hgignore |
|
163 | 163 | $ mkdir ignoreddir |
|
164 | 164 | $ touch ignoreddir/file |
|
165 | 165 | |
|
166 | 166 | hg status ignoreddir/file: |
|
167 | 167 | |
|
168 | 168 | $ hg status ignoreddir/file |
|
169 | 169 | |
|
170 | 170 | hg status -i ignoreddir/file: |
|
171 | 171 | |
|
172 | 172 | $ hg status -i ignoreddir/file |
|
173 | 173 | I ignoreddir/file |
|
174 | 174 | $ cd .. |
|
175 | 175 | |
|
176 | 176 | # check 'status -q' and some combinations |
|
177 | 177 | |
|
178 | 178 | $ hg init repo3 |
|
179 | 179 | $ cd repo3 |
|
180 | 180 | $ touch modified removed deleted ignored |
|
181 | 181 | $ echo "^ignored$" > .hgignore |
|
182 | 182 | $ hg commit -A -m 'initial checkin' |
|
183 | 183 | adding .hgignore |
|
184 | 184 | adding deleted |
|
185 | 185 | adding modified |
|
186 | 186 | adding removed |
|
187 | 187 | $ touch added unknown ignored |
|
188 | 188 | $ hg add added |
|
189 | 189 | $ echo "test" >> modified |
|
190 | 190 | $ hg remove removed |
|
191 | 191 | $ rm deleted |
|
192 | 192 | $ hg copy modified copied |
|
193 | 193 | |
|
194 | 194 | # Run status with 2 different flags. |
|
195 | 195 | # Check if result is the same or different. |
|
196 | 196 | # If result is not as expected, raise error |
|
197 | 197 | |
|
198 | 198 | $ assert() { |
|
199 | 199 | > hg status $1 > ../a |
|
200 | 200 | > hg status $2 > ../b |
|
201 | 201 | > out=`diff ../a ../b` |
|
202 | 202 | > if [ $? -ne 0 ]; then |
|
203 | 203 | > out=1 |
|
204 | 204 | > else |
|
205 | 205 | > out=0 |
|
206 | 206 | > fi |
|
207 | 207 | > if [ $3 -eq 0 ]; then |
|
208 | 208 | > df="same" |
|
209 | 209 | > else |
|
210 | 210 | > df="different" |
|
211 | 211 | > fi |
|
212 | 212 | > if [ $out -ne $3 ]; then |
|
213 | 213 | > echo "Error on $1 and $2, should be $df." |
|
214 | 214 | > fi |
|
215 | 215 | > } |
|
216 | 216 | |
|
217 | 217 | # assert flag1 flag2 [0-same | 1-different] |
|
218 | 218 | |
|
219 | 219 | $ assert "-q" "-mard" 0 |
|
220 | 220 | $ assert "-A" "-marduicC" 0 |
|
221 | 221 | $ assert "-qA" "-mardcC" 0 |
|
222 | 222 | $ assert "-qAui" "-A" 0 |
|
223 | 223 | $ assert "-qAu" "-marducC" 0 |
|
224 | 224 | $ assert "-qAi" "-mardicC" 0 |
|
225 | 225 | $ assert "-qu" "-u" 0 |
|
226 | 226 | $ assert "-q" "-u" 1 |
|
227 | 227 | $ assert "-m" "-a" 1 |
|
228 | 228 | $ assert "-r" "-d" 1 |
|
229 | 229 | $ cd .. |
|
230 | 230 | |
|
231 | 231 | $ hg init repo4 |
|
232 | 232 | $ cd repo4 |
|
233 | 233 | $ touch modified removed deleted |
|
234 |
$ hg ci -q -A -m 'initial checkin' |
|
|
234 | $ hg ci -q -A -m 'initial checkin' | |
|
235 | 235 | $ touch added unknown |
|
236 | 236 | $ hg add added |
|
237 | 237 | $ hg remove removed |
|
238 | 238 | $ rm deleted |
|
239 | 239 | $ echo x > modified |
|
240 | 240 | $ hg copy modified copied |
|
241 | 241 | $ hg ci -m 'test checkin' -d "1000001 0" |
|
242 | 242 | $ rm * |
|
243 | 243 | $ touch unrelated |
|
244 | 244 | $ hg ci -q -A -m 'unrelated checkin' -d "1000002 0" |
|
245 | 245 | |
|
246 | 246 | hg status --change 1: |
|
247 | 247 | |
|
248 | 248 | $ hg status --change 1 |
|
249 | 249 | M modified |
|
250 | 250 | A added |
|
251 | 251 | A copied |
|
252 | 252 | R removed |
|
253 | 253 | |
|
254 | 254 | hg status --change 1 unrelated: |
|
255 | 255 | |
|
256 | 256 | $ hg status --change 1 unrelated |
|
257 | 257 | |
|
258 | 258 | hg status -C --change 1 added modified copied removed deleted: |
|
259 | 259 | |
|
260 | 260 | $ hg status -C --change 1 added modified copied removed deleted |
|
261 | 261 | M modified |
|
262 | 262 | A added |
|
263 | 263 | A copied |
|
264 | 264 | modified |
|
265 | 265 | R removed |
|
266 | 266 | |
|
267 | 267 | hg status -A --change 1: |
|
268 | 268 | |
|
269 | 269 | $ hg status -A --change 1 |
|
270 | 270 | M modified |
|
271 | 271 | A added |
|
272 | 272 | A copied |
|
273 | 273 | modified |
|
274 | 274 | R removed |
|
275 | 275 | C deleted |
@@ -1,194 +1,194 b'' | |||
|
1 | 1 | $ hg init test |
|
2 | 2 | $ cd test |
|
3 | 3 | |
|
4 | 4 | $ echo a > a |
|
5 | 5 | $ hg add a |
|
6 |
$ hg commit -m "test" |
|
|
6 | $ hg commit -m "test" | |
|
7 | 7 | $ hg history |
|
8 |
changeset: 0: |
|
|
8 | changeset: 0:acb14030fe0a | |
|
9 | 9 | tag: tip |
|
10 | 10 | user: test |
|
11 |
date: |
|
|
11 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
12 | 12 | summary: test |
|
13 | 13 | |
|
14 | 14 | |
|
15 | 15 | $ hg tag ' ' |
|
16 | 16 | abort: tag names cannot consist entirely of whitespace |
|
17 | 17 | |
|
18 |
$ hg tag |
|
|
18 | $ hg tag "bleah" | |
|
19 | 19 | $ hg history |
|
20 |
changeset: 1: |
|
|
20 | changeset: 1:d4f0d2909abc | |
|
21 | 21 | tag: tip |
|
22 | 22 | user: test |
|
23 |
date: |
|
|
24 |
summary: Added tag bleah for changeset |
|
|
23 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
24 | summary: Added tag bleah for changeset acb14030fe0a | |
|
25 | 25 | |
|
26 |
changeset: 0: |
|
|
26 | changeset: 0:acb14030fe0a | |
|
27 | 27 | tag: bleah |
|
28 | 28 | user: test |
|
29 |
date: |
|
|
29 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
30 | 30 | summary: test |
|
31 | 31 | |
|
32 | 32 | |
|
33 | 33 | $ echo foo >> .hgtags |
|
34 |
$ hg tag |
|
|
34 | $ hg tag "bleah2" || echo "failed" | |
|
35 | 35 | abort: working copy of .hgtags is changed (please commit .hgtags manually) |
|
36 | 36 | failed |
|
37 | 37 | |
|
38 | 38 | $ hg revert .hgtags |
|
39 |
$ hg tag |
|
|
39 | $ hg tag -r 0 x y z y y z || echo "failed" | |
|
40 | 40 | abort: tag names must be unique |
|
41 | 41 | failed |
|
42 |
$ hg tag |
|
|
42 | $ hg tag tap nada dot tip null . || echo "failed" | |
|
43 | 43 | abort: the name 'tip' is reserved |
|
44 | 44 | failed |
|
45 |
$ hg tag |
|
|
45 | $ hg tag "bleah" || echo "failed" | |
|
46 | 46 | abort: tag 'bleah' already exists (use -f to force) |
|
47 | 47 | failed |
|
48 |
$ hg tag |
|
|
48 | $ hg tag "blecch" "bleah" || echo "failed" | |
|
49 | 49 | abort: tag 'bleah' already exists (use -f to force) |
|
50 | 50 | failed |
|
51 | 51 | |
|
52 |
$ hg tag |
|
|
52 | $ hg tag --remove "blecch" || echo "failed" | |
|
53 | 53 | abort: tag 'blecch' does not exist |
|
54 | 54 | failed |
|
55 |
$ hg tag |
|
|
55 | $ hg tag --remove "bleah" "blecch" "blough" || echo "failed" | |
|
56 | 56 | abort: tag 'blecch' does not exist |
|
57 | 57 | failed |
|
58 | 58 | |
|
59 |
$ hg tag |
|
|
60 |
$ hg tag -l - |
|
|
61 |
$ hg tag |
|
|
62 |
$ hg tag - |
|
|
63 |
$ hg tag |
|
|
59 | $ hg tag -r 0 "bleah0" | |
|
60 | $ hg tag -l -r 1 "bleah1" | |
|
61 | $ hg tag gack gawk gorp | |
|
62 | $ hg tag -f gack | |
|
63 | $ hg tag --remove gack gorp | |
|
64 | 64 | |
|
65 | 65 | $ cat .hgtags |
|
66 | 0acdaf8983679e0aac16e811534eb49d7ee1f2b4 bleah | |
|
67 | 0acdaf8983679e0aac16e811534eb49d7ee1f2b4 bleah0 | |
|
68 | 868cc8fbb43b754ad09fa109885d243fc49adae7 gack | |
|
69 | 868cc8fbb43b754ad09fa109885d243fc49adae7 gawk | |
|
70 | 868cc8fbb43b754ad09fa109885d243fc49adae7 gorp | |
|
71 | 868cc8fbb43b754ad09fa109885d243fc49adae7 gack | |
|
72 | 3807bcf62c5614cb6c16436b514d7764ca5f1631 gack | |
|
73 | 3807bcf62c5614cb6c16436b514d7764ca5f1631 gack | |
|
66 | acb14030fe0a21b60322c440ad2d20cf7685a376 bleah | |
|
67 | acb14030fe0a21b60322c440ad2d20cf7685a376 bleah0 | |
|
68 | 336fccc858a4eb69609a291105009e484a6b6b8d gack | |
|
69 | 336fccc858a4eb69609a291105009e484a6b6b8d gawk | |
|
70 | 336fccc858a4eb69609a291105009e484a6b6b8d gorp | |
|
71 | 336fccc858a4eb69609a291105009e484a6b6b8d gack | |
|
72 | 799667b6f2d9b957f73fa644a918c2df22bab58f gack | |
|
73 | 799667b6f2d9b957f73fa644a918c2df22bab58f gack | |
|
74 | 74 | 0000000000000000000000000000000000000000 gack |
|
75 | 868cc8fbb43b754ad09fa109885d243fc49adae7 gorp | |
|
75 | 336fccc858a4eb69609a291105009e484a6b6b8d gorp | |
|
76 | 76 | 0000000000000000000000000000000000000000 gorp |
|
77 | 77 | $ cat .hg/localtags |
|
78 | 3ecf002a1c572a2f3bb4e665417e60fca65bbd42 bleah1 | |
|
78 | d4f0d2909abc9290e2773c08837d70c1794e3f5a bleah1 | |
|
79 | 79 | |
|
80 | 80 | $ hg update 0 |
|
81 | 81 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
82 |
$ hg tag |
|
|
82 | $ hg tag "foobar" | |
|
83 | 83 | $ cat .hgtags |
|
84 | 0acdaf8983679e0aac16e811534eb49d7ee1f2b4 foobar | |
|
84 | acb14030fe0a21b60322c440ad2d20cf7685a376 foobar | |
|
85 | 85 | $ cat .hg/localtags |
|
86 | 3ecf002a1c572a2f3bb4e665417e60fca65bbd42 bleah1 | |
|
86 | d4f0d2909abc9290e2773c08837d70c1794e3f5a bleah1 | |
|
87 | 87 | |
|
88 | 88 | $ hg tag -l 'xx |
|
89 | 89 | > newline' |
|
90 | 90 | abort: '\n' cannot be used in a tag name |
|
91 | 91 | $ hg tag -l 'xx:xx' |
|
92 | 92 | abort: ':' cannot be used in a tag name |
|
93 | 93 | |
|
94 | 94 | cloning local tags |
|
95 | 95 | |
|
96 | 96 | $ cd .. |
|
97 | 97 | $ hg -R test log -r0:5 |
|
98 |
changeset: 0: |
|
|
98 | changeset: 0:acb14030fe0a | |
|
99 | 99 | tag: bleah |
|
100 | 100 | tag: bleah0 |
|
101 | 101 | tag: foobar |
|
102 | 102 | user: test |
|
103 |
date: |
|
|
103 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
104 | 104 | summary: test |
|
105 | 105 | |
|
106 |
changeset: 1: |
|
|
106 | changeset: 1:d4f0d2909abc | |
|
107 | 107 | tag: bleah1 |
|
108 | 108 | user: test |
|
109 |
date: |
|
|
110 |
summary: Added tag bleah for changeset |
|
|
109 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
110 | summary: Added tag bleah for changeset acb14030fe0a | |
|
111 | 111 | |
|
112 |
changeset: 2: |
|
|
112 | changeset: 2:336fccc858a4 | |
|
113 | 113 | tag: gawk |
|
114 | 114 | user: test |
|
115 |
date: |
|
|
116 |
summary: Added tag bleah0 for changeset |
|
|
115 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
116 | summary: Added tag bleah0 for changeset acb14030fe0a | |
|
117 | 117 | |
|
118 |
changeset: 3: |
|
|
118 | changeset: 3:799667b6f2d9 | |
|
119 | 119 | user: test |
|
120 |
date: |
|
|
121 |
summary: Added tag gack, gawk, gorp for changeset |
|
|
120 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
121 | summary: Added tag gack, gawk, gorp for changeset 336fccc858a4 | |
|
122 | 122 | |
|
123 |
changeset: 4:1 |
|
|
123 | changeset: 4:154eeb7c0138 | |
|
124 | 124 | user: test |
|
125 |
date: |
|
|
126 |
summary: Added tag gack for changeset |
|
|
125 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
126 | summary: Added tag gack for changeset 799667b6f2d9 | |
|
127 | 127 | |
|
128 |
changeset: 5: |
|
|
128 | changeset: 5:b4bb47aaff09 | |
|
129 | 129 | user: test |
|
130 |
date: |
|
|
130 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
131 | 131 | summary: Removed tag gack, gorp |
|
132 | 132 | |
|
133 | 133 | $ hg clone -q -rbleah1 test test1 |
|
134 | 134 | $ hg -R test1 parents --style=compact |
|
135 |
1[tip] |
|
|
136 |
Added tag bleah for changeset |
|
|
135 | 1[tip] d4f0d2909abc 1970-01-01 00:00 +0000 test | |
|
136 | Added tag bleah for changeset acb14030fe0a | |
|
137 | 137 | |
|
138 | 138 | $ hg clone -q -r5 test#bleah1 test2 |
|
139 | 139 | $ hg -R test2 parents --style=compact |
|
140 |
5[tip] |
|
|
140 | 5[tip] b4bb47aaff09 1970-01-01 00:00 +0000 test | |
|
141 | 141 | Removed tag gack, gorp |
|
142 | 142 | |
|
143 | 143 | $ hg clone -q -U test#bleah1 test3 |
|
144 | 144 | $ hg -R test3 parents --style=compact |
|
145 | 145 | |
|
146 | 146 | $ cd test |
|
147 | 147 | |
|
148 | 148 | issue 601 |
|
149 | 149 | |
|
150 | 150 | $ python << EOF |
|
151 | 151 | > f = file('.hg/localtags'); last = f.readlines()[-1][:-1]; f.close() |
|
152 | 152 | > f = file('.hg/localtags', 'w'); f.write(last); f.close() |
|
153 | 153 | > EOF |
|
154 | 154 | $ cat .hg/localtags; echo |
|
155 | 3ecf002a1c572a2f3bb4e665417e60fca65bbd42 bleah1 | |
|
155 | d4f0d2909abc9290e2773c08837d70c1794e3f5a bleah1 | |
|
156 | 156 | $ hg tag -l localnewline |
|
157 | 157 | $ cat .hg/localtags; echo |
|
158 | 3ecf002a1c572a2f3bb4e665417e60fca65bbd42 bleah1 | |
|
159 | f68b039e72eacbb2e68b0543e1f6e50990aa2bb5 localnewline | |
|
158 | d4f0d2909abc9290e2773c08837d70c1794e3f5a bleah1 | |
|
159 | c2899151f4e76890c602a2597a650a72666681bf localnewline | |
|
160 | 160 | |
|
161 | 161 | |
|
162 | 162 | $ python << EOF |
|
163 | 163 | > f = file('.hgtags'); last = f.readlines()[-1][:-1]; f.close() |
|
164 | 164 | > f = file('.hgtags', 'w'); f.write(last); f.close() |
|
165 | 165 | > EOF |
|
166 |
$ hg ci - |
|
|
166 | $ hg ci -m'broken manual edit of .hgtags' | |
|
167 | 167 | $ cat .hgtags; echo |
|
168 | 0acdaf8983679e0aac16e811534eb49d7ee1f2b4 foobar | |
|
169 |
$ hg tag |
|
|
168 | acb14030fe0a21b60322c440ad2d20cf7685a376 foobar | |
|
169 | $ hg tag newline | |
|
170 | 170 | $ cat .hgtags; echo |
|
171 | 0acdaf8983679e0aac16e811534eb49d7ee1f2b4 foobar | |
|
172 | 6ae703d793c8b1f097116869275ecd97b2977a2b newline | |
|
171 | acb14030fe0a21b60322c440ad2d20cf7685a376 foobar | |
|
172 | a0eea09de1eeec777b46f2085260a373b2fbc293 newline | |
|
173 | 173 | |
|
174 | 174 | |
|
175 | 175 | tag and branch using same name |
|
176 | 176 | |
|
177 | 177 | $ hg branch tag-and-branch-same-name |
|
178 | 178 | marked working directory as branch tag-and-branch-same-name |
|
179 | 179 | $ hg ci -m"discouraged" |
|
180 | 180 | $ hg tag tag-and-branch-same-name |
|
181 | 181 | warning: tag tag-and-branch-same-name conflicts with existing branch name |
|
182 | 182 | |
|
183 | 183 | test custom commit messages |
|
184 | 184 | |
|
185 | 185 | $ cat > $HGTMP/editor <<'__EOF__' |
|
186 | 186 | > #!/bin/sh |
|
187 | 187 | > echo "custom tag message" > "$1" |
|
188 | 188 | > echo "second line" >> "$1" |
|
189 | 189 | > __EOF__ |
|
190 | 190 | $ chmod +x "$HGTMP"/editor |
|
191 | 191 | $ HGEDITOR="'$HGTMP'"/editor hg tag custom-tag -e |
|
192 | 192 | $ hg log -l1 --template "{desc}\n" |
|
193 | 193 | custom tag message |
|
194 | 194 | second line |
@@ -1,353 +1,353 b'' | |||
|
1 | 1 | $ cat <<EOF >> $HGRCPATH |
|
2 | 2 | > [extensions] |
|
3 | 3 | > transplant= |
|
4 | 4 | > EOF |
|
5 | 5 | |
|
6 | 6 | $ hg init t |
|
7 | 7 | $ cd t |
|
8 | 8 | $ echo r1 > r1 |
|
9 | 9 | $ hg ci -Amr1 -d'0 0' |
|
10 | 10 | adding r1 |
|
11 | 11 | $ echo r2 > r2 |
|
12 | 12 | $ hg ci -Amr2 -d'1 0' |
|
13 | 13 | adding r2 |
|
14 | 14 | $ hg up 0 |
|
15 | 15 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
16 | 16 | |
|
17 | 17 | $ echo b1 > b1 |
|
18 | 18 | $ hg ci -Amb1 -d '0 0' |
|
19 | 19 | adding b1 |
|
20 | 20 | created new head |
|
21 | 21 | $ echo b2 > b2 |
|
22 | 22 | $ hg ci -Amb2 -d '1 0' |
|
23 | 23 | adding b2 |
|
24 | 24 | $ echo b3 > b3 |
|
25 | 25 | $ hg ci -Amb3 -d '2 0' |
|
26 | 26 | adding b3 |
|
27 | 27 | |
|
28 | 28 | $ hg log --template '{rev} {parents} {desc}\n' |
|
29 | 29 | 4 b3 |
|
30 | 30 | 3 b2 |
|
31 | 31 | 2 0:17ab29e464c6 b1 |
|
32 | 32 | 1 r2 |
|
33 | 33 | 0 r1 |
|
34 | 34 | |
|
35 | 35 | $ hg clone . ../rebase |
|
36 | 36 | updating to branch default |
|
37 | 37 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
38 | 38 | $ cd ../rebase |
|
39 | 39 | |
|
40 | 40 | $ hg up -C 1 |
|
41 | 41 | 1 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
42 | 42 | |
|
43 | 43 | rebase b onto r1 |
|
44 | 44 | |
|
45 | 45 | $ hg transplant -a -b tip |
|
46 | 46 | applying 37a1297eb21b |
|
47 | 47 | 37a1297eb21b transplanted to e234d668f844 |
|
48 | 48 | applying 722f4667af76 |
|
49 | 49 | 722f4667af76 transplanted to 539f377d78df |
|
50 | 50 | applying a53251cdf717 |
|
51 | 51 | a53251cdf717 transplanted to ffd6818a3975 |
|
52 | 52 | $ hg log --template '{rev} {parents} {desc}\n' |
|
53 | 53 | 7 b3 |
|
54 | 54 | 6 b2 |
|
55 | 55 | 5 1:d11e3596cc1a b1 |
|
56 | 56 | 4 b3 |
|
57 | 57 | 3 b2 |
|
58 | 58 | 2 0:17ab29e464c6 b1 |
|
59 | 59 | 1 r2 |
|
60 | 60 | 0 r1 |
|
61 | 61 | |
|
62 | 62 | $ hg clone ../t ../prune |
|
63 | 63 | updating to branch default |
|
64 | 64 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
65 | 65 | $ cd ../prune |
|
66 | 66 | |
|
67 | 67 | $ hg up -C 1 |
|
68 | 68 | 1 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
69 | 69 | |
|
70 | 70 | rebase b onto r1, skipping b2 |
|
71 | 71 | |
|
72 | 72 | $ hg transplant -a -b tip -p 3 |
|
73 | 73 | applying 37a1297eb21b |
|
74 | 74 | 37a1297eb21b transplanted to e234d668f844 |
|
75 | 75 | applying a53251cdf717 |
|
76 | 76 | a53251cdf717 transplanted to 7275fda4d04f |
|
77 | 77 | $ hg log --template '{rev} {parents} {desc}\n' |
|
78 | 78 | 6 b3 |
|
79 | 79 | 5 1:d11e3596cc1a b1 |
|
80 | 80 | 4 b3 |
|
81 | 81 | 3 b2 |
|
82 | 82 | 2 0:17ab29e464c6 b1 |
|
83 | 83 | 1 r2 |
|
84 | 84 | 0 r1 |
|
85 | 85 | |
|
86 | 86 | |
|
87 | 87 | remote transplant |
|
88 | 88 | |
|
89 | 89 | $ hg clone -r 1 ../t ../remote |
|
90 | 90 | requesting all changes |
|
91 | 91 | adding changesets |
|
92 | 92 | adding manifests |
|
93 | 93 | adding file changes |
|
94 | 94 | added 2 changesets with 2 changes to 2 files |
|
95 | 95 | updating to branch default |
|
96 | 96 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
97 | 97 | $ cd ../remote |
|
98 | 98 | $ hg transplant --log -s ../t 2 4 |
|
99 | 99 | searching for changes |
|
100 | 100 | applying 37a1297eb21b |
|
101 | 101 | 37a1297eb21b transplanted to c19cf0ccb069 |
|
102 | 102 | applying a53251cdf717 |
|
103 | 103 | a53251cdf717 transplanted to f7fe5bf98525 |
|
104 | 104 | $ hg log --template '{rev} {parents} {desc}\n' |
|
105 | 105 | 3 b3 |
|
106 | 106 | (transplanted from a53251cdf717679d1907b289f991534be05c997a) |
|
107 | 107 | 2 b1 |
|
108 | 108 | (transplanted from 37a1297eb21b3ef5c5d2ffac22121a0988ed9f21) |
|
109 | 109 | 1 r2 |
|
110 | 110 | 0 r1 |
|
111 | 111 | |
|
112 | 112 | skip previous transplants |
|
113 | 113 | |
|
114 | 114 | $ hg transplant -s ../t -a -b 4 |
|
115 | 115 | searching for changes |
|
116 | 116 | applying 722f4667af76 |
|
117 | 117 | 722f4667af76 transplanted to 47156cd86c0b |
|
118 | 118 | $ hg log --template '{rev} {parents} {desc}\n' |
|
119 | 119 | 4 b2 |
|
120 | 120 | 3 b3 |
|
121 | 121 | (transplanted from a53251cdf717679d1907b289f991534be05c997a) |
|
122 | 122 | 2 b1 |
|
123 | 123 | (transplanted from 37a1297eb21b3ef5c5d2ffac22121a0988ed9f21) |
|
124 | 124 | 1 r2 |
|
125 | 125 | 0 r1 |
|
126 | 126 | |
|
127 | 127 | skip local changes transplanted to the source |
|
128 | 128 | |
|
129 | 129 | $ echo b4 > b4 |
|
130 | 130 | $ hg ci -Amb4 -d '3 0' |
|
131 | 131 | adding b4 |
|
132 | 132 | $ hg clone ../t ../pullback |
|
133 | 133 | updating to branch default |
|
134 | 134 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
135 | 135 | $ cd ../pullback |
|
136 | 136 | $ hg transplant -s ../remote -a -b tip |
|
137 | 137 | searching for changes |
|
138 | 138 | applying 4333daefcb15 |
|
139 | 139 | 4333daefcb15 transplanted to 5f42c04e07cc |
|
140 | 140 | |
|
141 | 141 | |
|
142 | 142 | remote transplant with pull |
|
143 | 143 | |
|
144 | 144 | $ hg -R ../t serve -p $HGPORT -d --pid-file=../t.pid |
|
145 | 145 | $ cat ../t.pid >> $DAEMON_PIDS |
|
146 | 146 | |
|
147 | 147 | $ hg clone -r 0 ../t ../rp |
|
148 | 148 | requesting all changes |
|
149 | 149 | adding changesets |
|
150 | 150 | adding manifests |
|
151 | 151 | adding file changes |
|
152 | 152 | added 1 changesets with 1 changes to 1 files |
|
153 | 153 | updating to branch default |
|
154 | 154 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
155 | 155 | $ cd ../rp |
|
156 | 156 | $ hg transplant -s http://localhost:$HGPORT/ 2 4 |
|
157 | 157 | searching for changes |
|
158 | 158 | searching for changes |
|
159 | 159 | adding changesets |
|
160 | 160 | adding manifests |
|
161 | 161 | adding file changes |
|
162 | 162 | added 1 changesets with 1 changes to 1 files |
|
163 | 163 | applying a53251cdf717 |
|
164 | 164 | a53251cdf717 transplanted to 8d9279348abb |
|
165 | 165 | $ hg log --template '{rev} {parents} {desc}\n' |
|
166 | 166 | 2 b3 |
|
167 | 167 | 1 b1 |
|
168 | 168 | 0 r1 |
|
169 | 169 | |
|
170 | 170 | transplant --continue |
|
171 | 171 | |
|
172 | 172 | $ hg init ../tc |
|
173 | 173 | $ cd ../tc |
|
174 | 174 | $ cat <<EOF > foo |
|
175 | 175 | > foo |
|
176 | 176 | > bar |
|
177 | 177 | > baz |
|
178 | 178 | > EOF |
|
179 | 179 | $ echo toremove > toremove |
|
180 | 180 | $ hg ci -Amfoo |
|
181 | 181 | adding foo |
|
182 | 182 | adding toremove |
|
183 | 183 | $ cat <<EOF > foo |
|
184 | 184 | > foo2 |
|
185 | 185 | > bar2 |
|
186 | 186 | > baz2 |
|
187 | 187 | > EOF |
|
188 | 188 | $ rm toremove |
|
189 | 189 | $ echo added > added |
|
190 | 190 | $ hg ci -Amfoo2 |
|
191 | 191 | adding added |
|
192 | 192 | removing toremove |
|
193 | 193 | $ echo bar > bar |
|
194 | 194 | $ hg ci -Ambar |
|
195 | 195 | adding bar |
|
196 | 196 | $ echo bar2 >> bar |
|
197 | 197 | $ hg ci -mbar2 |
|
198 | 198 | $ hg up 0 |
|
199 | 199 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
200 | 200 | $ echo foobar > foo |
|
201 | 201 | $ hg ci -mfoobar |
|
202 | 202 | created new head |
|
203 | 203 | $ hg transplant 1:3 |
|
204 | 204 | applying a1e30dd1b8e7 |
|
205 | 205 | patching file foo |
|
206 | 206 | Hunk #1 FAILED at 0 |
|
207 | 207 | 1 out of 1 hunks FAILED -- saving rejects to file foo.rej |
|
208 | 208 | patch failed to apply |
|
209 | 209 | abort: fix up the merge and run hg transplant --continue |
|
210 | 210 | |
|
211 | 211 | transplant -c shouldn't use an old changeset |
|
212 | 212 | |
|
213 | 213 | $ hg up -C |
|
214 | 214 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
215 | 215 | $ rm added |
|
216 | 216 | $ hg transplant 1 |
|
217 | 217 | applying a1e30dd1b8e7 |
|
218 | 218 | patching file foo |
|
219 | 219 | Hunk #1 FAILED at 0 |
|
220 | 220 | 1 out of 1 hunks FAILED -- saving rejects to file foo.rej |
|
221 | 221 | patch failed to apply |
|
222 | 222 | abort: fix up the merge and run hg transplant --continue |
|
223 | 223 | $ hg transplant --continue |
|
224 | 224 | a1e30dd1b8e7 transplanted as f1563cf27039 |
|
225 | 225 | $ hg transplant 1:3 |
|
226 | 226 | skipping already applied revision 1:a1e30dd1b8e7 |
|
227 | 227 | applying 1739ac5f6139 |
|
228 | 228 | 1739ac5f6139 transplanted to d649c221319f |
|
229 | 229 | applying 0282d5fbbe02 |
|
230 | 230 | 0282d5fbbe02 transplanted to 77418277ccb3 |
|
231 | 231 | $ hg locate |
|
232 | 232 | added |
|
233 | 233 | bar |
|
234 | 234 | foo |
|
235 | 235 | $ cd .. |
|
236 | 236 | |
|
237 | 237 | Test transplant --merge (issue 1111) |
|
238 | 238 | test transplant merge |
|
239 | 239 | |
|
240 | 240 | $ hg init t1111 |
|
241 | 241 | $ cd t1111 |
|
242 | 242 | $ echo a > a |
|
243 | 243 | $ hg ci -Am adda |
|
244 | 244 | adding a |
|
245 | 245 | $ echo b >> a |
|
246 | 246 | $ hg ci -m appendb |
|
247 | 247 | $ echo c >> a |
|
248 | 248 | $ hg ci -m appendc |
|
249 | 249 | $ hg up -C 0 |
|
250 | 250 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
251 | 251 | $ echo d >> a |
|
252 | 252 | $ hg ci -m appendd |
|
253 | 253 | created new head |
|
254 | 254 | |
|
255 | 255 | tranplant |
|
256 | 256 | |
|
257 | 257 | $ hg transplant -m 1 |
|
258 | 258 | applying 42dc4432fd35 |
|
259 | 259 | 1:42dc4432fd35 merged at a9f4acbac129 |
|
260 | 260 | $ cd .. |
|
261 | 261 | |
|
262 | 262 | test transplant into empty repository |
|
263 | 263 | |
|
264 | 264 | $ hg init empty |
|
265 | 265 | $ cd empty |
|
266 | 266 | $ hg transplant -s ../t -b tip -a |
|
267 | 267 | requesting all changes |
|
268 | 268 | adding changesets |
|
269 | 269 | adding manifests |
|
270 | 270 | adding file changes |
|
271 | 271 | added 4 changesets with 4 changes to 4 files |
|
272 | 272 | $ cd .. |
|
273 | 273 | |
|
274 | 274 | |
|
275 | 275 | test filter |
|
276 | 276 | |
|
277 | 277 | $ hg init filter |
|
278 | 278 | $ cd filter |
|
279 | 279 | $ cat <<'EOF' >test-filter |
|
280 | 280 | > #!/bin/sh |
|
281 | 281 | > sed 's/r1/r2/' $1 > $1.new |
|
282 | 282 | > mv $1.new $1 |
|
283 | 283 | > EOF |
|
284 | 284 | $ chmod +x test-filter |
|
285 | 285 | $ hg transplant -s ../t -b tip -a --filter ./test-filter |
|
286 | 286 | filtering .* |
|
287 | 287 | applying 17ab29e464c6 |
|
288 | 288 | 17ab29e464c6 transplanted to e9ffc54ea104 |
|
289 | 289 | filtering .* |
|
290 | 290 | applying 37a1297eb21b |
|
291 | 291 | 37a1297eb21b transplanted to 348b36d0b6a5 |
|
292 | 292 | filtering .* |
|
293 | 293 | applying 722f4667af76 |
|
294 | 294 | 722f4667af76 transplanted to 0aa6979afb95 |
|
295 | 295 | filtering .* |
|
296 | 296 | applying a53251cdf717 |
|
297 | 297 | a53251cdf717 transplanted to 14f8512272b5 |
|
298 | 298 | $ hg log --template '{rev} {parents} {desc}\n' |
|
299 | 299 | 3 b3 |
|
300 | 300 | 2 b2 |
|
301 | 301 | 1 b1 |
|
302 | 302 | 0 r2 |
|
303 | 303 | $ cd .. |
|
304 | 304 | |
|
305 | 305 | |
|
306 | 306 | test filter with failed patch |
|
307 | 307 | |
|
308 | 308 | $ cd filter |
|
309 | 309 | $ hg up 0 |
|
310 | 310 | 0 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
311 | 311 | $ echo foo > b1 |
|
312 |
$ hg ci - |
|
|
312 | $ hg ci -Am foo | |
|
313 | 313 | adding b1 |
|
314 | 314 | adding test-filter |
|
315 | 315 | created new head |
|
316 | 316 | $ hg transplant 1 --filter ./test-filter |
|
317 | 317 | filtering .* |
|
318 | 318 | applying 348b36d0b6a5 |
|
319 | 319 | file b1 already exists |
|
320 | 320 | 1 out of 1 hunks FAILED -- saving rejects to file b1.rej |
|
321 | 321 | patch failed to apply |
|
322 | 322 | abort: fix up the merge and run hg transplant --continue |
|
323 | 323 | $ cd .. |
|
324 | 324 | |
|
325 | 325 | |
|
326 | 326 | test with a win32ext like setup (differing EOLs) |
|
327 | 327 | |
|
328 | 328 | $ hg init twin1 |
|
329 | 329 | $ cd twin1 |
|
330 | 330 | $ echo a > a |
|
331 | 331 | $ echo b > b |
|
332 | 332 | $ echo b >> b |
|
333 | 333 | $ hg ci -Am t |
|
334 | 334 | adding a |
|
335 | 335 | adding b |
|
336 | 336 | $ echo a > b |
|
337 | 337 | $ echo b >> b |
|
338 | 338 | $ hg ci -m changeb |
|
339 | 339 | $ cd .. |
|
340 | 340 | |
|
341 | 341 | $ hg init twin2 |
|
342 | 342 | $ cd twin2 |
|
343 | 343 | $ echo '[patch]' >> .hg/hgrc |
|
344 | 344 | $ echo 'eol = crlf' >> .hg/hgrc |
|
345 | 345 | $ python -c "file('b', 'wb').write('b\r\nb\r\n')" |
|
346 | 346 | $ hg ci -m addb |
|
347 | 347 | nothing changed |
|
348 | 348 | $ hg transplant -s ../twin1 tip |
|
349 | 349 | applying 2e849d776c17 |
|
350 | 350 | 2e849d776c17 transplanted to 589cea8ba85b |
|
351 | 351 | $ python -c "print repr(file('b', 'rb').read())" |
|
352 | 352 | 'a\r\nb\r\n' |
|
353 | 353 | $ cd .. |
@@ -1,20 +1,20 b'' | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | 3 | mkdir a |
|
4 | 4 | cd a |
|
5 | 5 | hg init |
|
6 | 6 | echo 123 > a |
|
7 | 7 | hg add a |
|
8 |
hg commit -m "a" -u a |
|
|
8 | hg commit -m "a" -u a | |
|
9 | 9 | |
|
10 | 10 | cd .. |
|
11 | 11 | mkdir b |
|
12 | 12 | cd b |
|
13 | 13 | hg init |
|
14 | 14 | echo 321 > b |
|
15 | 15 | hg add b |
|
16 |
hg commit -m "b" -u b |
|
|
16 | hg commit -m "b" -u b | |
|
17 | 17 | |
|
18 | 18 | hg pull ../a |
|
19 | 19 | hg pull -f ../a |
|
20 | 20 | hg heads |
@@ -1,23 +1,23 b'' | |||
|
1 | 1 | pulling from ../a |
|
2 | 2 | searching for changes |
|
3 | 3 | abort: repository is unrelated |
|
4 | 4 | pulling from ../a |
|
5 | 5 | searching for changes |
|
6 | 6 | warning: repository is unrelated |
|
7 | 7 | adding changesets |
|
8 | 8 | adding manifests |
|
9 | 9 | adding file changes |
|
10 | 10 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
11 | 11 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
12 | changeset: 1:bdcee5d51fa6 | |
|
12 | changeset: 1:9a79c33a9db3 | |
|
13 | 13 | tag: tip |
|
14 | 14 | parent: -1:000000000000 |
|
15 | 15 | user: a |
|
16 |
date: |
|
|
16 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
17 | 17 | summary: a |
|
18 | 18 | |
|
19 |
changeset: 0: |
|
|
19 | changeset: 0:01f8062b2de5 | |
|
20 | 20 | user: b |
|
21 |
date: |
|
|
21 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
22 | 22 | summary: b |
|
23 | 23 |
@@ -1,235 +1,235 b'' | |||
|
1 | 1 | $ HGMERGE=true; export HGMERGE |
|
2 | 2 | |
|
3 | 3 | $ mkdir r1 |
|
4 | 4 | $ cd r1 |
|
5 | 5 | $ hg init |
|
6 | 6 | $ echo a > a |
|
7 | 7 | $ hg addremove |
|
8 | 8 | adding a |
|
9 |
$ hg commit -m "1" |
|
|
9 | $ hg commit -m "1" | |
|
10 | 10 | |
|
11 | 11 | $ hg clone . ../r2 |
|
12 | 12 | updating to branch default |
|
13 | 13 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
14 | 14 | $ cd ../r2 |
|
15 | 15 | $ hg up |
|
16 | 16 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
17 | 17 | $ echo abc > a |
|
18 | 18 | $ hg diff --nodates |
|
19 | diff -r 33aaa84a386b a | |
|
19 | diff -r c19d34741b0a a | |
|
20 | 20 | --- a/a |
|
21 | 21 | +++ b/a |
|
22 | 22 | @@ -1,1 +1,1 @@ |
|
23 | 23 | -a |
|
24 | 24 | +abc |
|
25 | 25 | |
|
26 | 26 | $ cd ../r1 |
|
27 | 27 | $ echo b > b |
|
28 | 28 | $ echo a2 > a |
|
29 | 29 | $ hg addremove |
|
30 | 30 | adding b |
|
31 |
$ hg commit -m "2" |
|
|
31 | $ hg commit -m "2" | |
|
32 | 32 | |
|
33 | 33 | $ cd ../r2 |
|
34 | 34 | $ hg -q pull ../r1 |
|
35 | 35 | $ hg status |
|
36 | 36 | M a |
|
37 | 37 | $ hg parents |
|
38 |
changeset: 0: |
|
|
38 | changeset: 0:c19d34741b0a | |
|
39 | 39 | user: test |
|
40 |
date: |
|
|
40 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
41 | 41 | summary: 1 |
|
42 | 42 | |
|
43 | 43 | $ hg --debug up |
|
44 | 44 | searching for copies back to rev 1 |
|
45 | 45 | unmatched files in other: |
|
46 | 46 | b |
|
47 | 47 | resolving manifests |
|
48 | 48 | overwrite False partial False |
|
49 | ancestor 33aaa84a386b local 33aaa84a386b+ remote 802f095af299 | |
|
49 | ancestor c19d34741b0a local c19d34741b0a+ remote 1e71731e6fbb | |
|
50 | 50 | a: versions differ -> m |
|
51 | 51 | b: remote created -> g |
|
52 | 52 | preserving a for resolve of a |
|
53 | 53 | updating: a 1/2 files (50.00%) |
|
54 | 54 | picked tool 'true' for a (binary False symlink False) |
|
55 | 55 | merging a |
|
56 | my a@33aaa84a386b+ other a@802f095af299 ancestor a@33aaa84a386b | |
|
56 | my a@c19d34741b0a+ other a@1e71731e6fbb ancestor a@c19d34741b0a | |
|
57 | 57 | updating: b 2/2 files (100.00%) |
|
58 | 58 | getting b |
|
59 | 59 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
60 | 60 | $ hg parents |
|
61 |
changeset: 1: |
|
|
61 | changeset: 1:1e71731e6fbb | |
|
62 | 62 | tag: tip |
|
63 | 63 | user: test |
|
64 |
date: |
|
|
64 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
65 | 65 | summary: 2 |
|
66 | 66 | |
|
67 | 67 | $ hg --debug up 0 |
|
68 | 68 | resolving manifests |
|
69 | 69 | overwrite False partial False |
|
70 | ancestor 802f095af299 local 802f095af299+ remote 33aaa84a386b | |
|
70 | ancestor 1e71731e6fbb local 1e71731e6fbb+ remote c19d34741b0a | |
|
71 | 71 | a: versions differ -> m |
|
72 | 72 | b: other deleted -> r |
|
73 | 73 | preserving a for resolve of a |
|
74 | 74 | updating: b 1/2 files (50.00%) |
|
75 | 75 | removing b |
|
76 | 76 | updating: a 2/2 files (100.00%) |
|
77 | 77 | picked tool 'true' for a (binary False symlink False) |
|
78 | 78 | merging a |
|
79 | my a@802f095af299+ other a@33aaa84a386b ancestor a@802f095af299 | |
|
79 | my a@1e71731e6fbb+ other a@c19d34741b0a ancestor a@1e71731e6fbb | |
|
80 | 80 | 0 files updated, 1 files merged, 1 files removed, 0 files unresolved |
|
81 | 81 | $ hg parents |
|
82 |
changeset: 0: |
|
|
82 | changeset: 0:c19d34741b0a | |
|
83 | 83 | user: test |
|
84 |
date: |
|
|
84 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
85 | 85 | summary: 1 |
|
86 | 86 | |
|
87 | 87 | $ hg --debug merge || echo failed |
|
88 | 88 | abort: there is nothing to merge - use "hg update" instead |
|
89 | 89 | failed |
|
90 | 90 | $ hg parents |
|
91 |
changeset: 0: |
|
|
91 | changeset: 0:c19d34741b0a | |
|
92 | 92 | user: test |
|
93 |
date: |
|
|
93 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
94 | 94 | summary: 1 |
|
95 | 95 | |
|
96 | 96 | $ hg --debug up |
|
97 | 97 | searching for copies back to rev 1 |
|
98 | 98 | unmatched files in other: |
|
99 | 99 | b |
|
100 | 100 | resolving manifests |
|
101 | 101 | overwrite False partial False |
|
102 | ancestor 33aaa84a386b local 33aaa84a386b+ remote 802f095af299 | |
|
102 | ancestor c19d34741b0a local c19d34741b0a+ remote 1e71731e6fbb | |
|
103 | 103 | a: versions differ -> m |
|
104 | 104 | b: remote created -> g |
|
105 | 105 | preserving a for resolve of a |
|
106 | 106 | updating: a 1/2 files (50.00%) |
|
107 | 107 | picked tool 'true' for a (binary False symlink False) |
|
108 | 108 | merging a |
|
109 | my a@33aaa84a386b+ other a@802f095af299 ancestor a@33aaa84a386b | |
|
109 | my a@c19d34741b0a+ other a@1e71731e6fbb ancestor a@c19d34741b0a | |
|
110 | 110 | updating: b 2/2 files (100.00%) |
|
111 | 111 | getting b |
|
112 | 112 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
113 | 113 | $ hg parents |
|
114 |
changeset: 1: |
|
|
114 | changeset: 1:1e71731e6fbb | |
|
115 | 115 | tag: tip |
|
116 | 116 | user: test |
|
117 |
date: |
|
|
117 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
118 | 118 | summary: 2 |
|
119 | 119 | |
|
120 | 120 | $ hg -v history |
|
121 |
changeset: 1: |
|
|
121 | changeset: 1:1e71731e6fbb | |
|
122 | 122 | tag: tip |
|
123 | 123 | user: test |
|
124 |
date: |
|
|
124 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
125 | 125 | files: a b |
|
126 | 126 | description: |
|
127 | 127 | 2 |
|
128 | 128 | |
|
129 | 129 | |
|
130 |
changeset: 0: |
|
|
130 | changeset: 0:c19d34741b0a | |
|
131 | 131 | user: test |
|
132 |
date: |
|
|
132 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
133 | 133 | files: a |
|
134 | 134 | description: |
|
135 | 135 | 1 |
|
136 | 136 | |
|
137 | 137 | |
|
138 | 138 | $ hg diff --nodates |
|
139 | diff -r 802f095af299 a | |
|
139 | diff -r 1e71731e6fbb a | |
|
140 | 140 | --- a/a |
|
141 | 141 | +++ b/a |
|
142 | 142 | @@ -1,1 +1,1 @@ |
|
143 | 143 | -a2 |
|
144 | 144 | +abc |
|
145 | 145 | |
|
146 | 146 | |
|
147 | 147 | create a second head |
|
148 | 148 | |
|
149 | 149 | $ cd ../r1 |
|
150 | 150 | $ hg up 0 |
|
151 | 151 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
152 | 152 | $ echo b2 > b |
|
153 | 153 | $ echo a3 > a |
|
154 | 154 | $ hg addremove |
|
155 | 155 | adding b |
|
156 |
$ hg commit -m "3" |
|
|
156 | $ hg commit -m "3" | |
|
157 | 157 | created new head |
|
158 | 158 | |
|
159 | 159 | $ cd ../r2 |
|
160 | 160 | $ hg -q pull ../r1 |
|
161 | 161 | $ hg status |
|
162 | 162 | M a |
|
163 | 163 | $ hg parents |
|
164 |
changeset: 1: |
|
|
164 | changeset: 1:1e71731e6fbb | |
|
165 | 165 | user: test |
|
166 |
date: |
|
|
166 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
167 | 167 | summary: 2 |
|
168 | 168 | |
|
169 | 169 | $ hg --debug up || echo failed |
|
170 | 170 | abort: crosses branches (use 'hg merge' to merge or use 'hg update -C' to discard changes) |
|
171 | 171 | failed |
|
172 | 172 | $ hg --debug merge || echo failed |
|
173 | 173 | abort: outstanding uncommitted changes (use 'hg status' to list changes) |
|
174 | 174 | failed |
|
175 | 175 | $ hg --debug merge -f |
|
176 | 176 | searching for copies back to rev 1 |
|
177 | 177 | resolving manifests |
|
178 | 178 | overwrite False partial False |
|
179 | ancestor 33aaa84a386b local 802f095af299+ remote 030602aee63d | |
|
179 | ancestor c19d34741b0a local 1e71731e6fbb+ remote 83c51d0caff4 | |
|
180 | 180 | a: versions differ -> m |
|
181 | 181 | b: versions differ -> m |
|
182 | 182 | preserving a for resolve of a |
|
183 | 183 | preserving b for resolve of b |
|
184 | 184 | updating: a 1/2 files (50.00%) |
|
185 | 185 | picked tool 'true' for a (binary False symlink False) |
|
186 | 186 | merging a |
|
187 | my a@802f095af299+ other a@030602aee63d ancestor a@33aaa84a386b | |
|
187 | my a@1e71731e6fbb+ other a@83c51d0caff4 ancestor a@c19d34741b0a | |
|
188 | 188 | updating: b 2/2 files (100.00%) |
|
189 | 189 | picked tool 'true' for b (binary False symlink False) |
|
190 | 190 | merging b |
|
191 |
my b@ |
|
|
191 | my b@1e71731e6fbb+ other b@83c51d0caff4 ancestor b@000000000000 | |
|
192 | 192 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
193 | 193 | (branch merge, don't forget to commit) |
|
194 | 194 | $ hg parents |
|
195 |
changeset: 1: |
|
|
195 | changeset: 1:1e71731e6fbb | |
|
196 | 196 | user: test |
|
197 |
date: |
|
|
197 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
198 | 198 | summary: 2 |
|
199 | 199 | |
|
200 |
changeset: 2: |
|
|
200 | changeset: 2:83c51d0caff4 | |
|
201 | 201 | tag: tip |
|
202 |
parent: 0: |
|
|
202 | parent: 0:c19d34741b0a | |
|
203 | 203 | user: test |
|
204 |
date: |
|
|
204 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
205 | 205 | summary: 3 |
|
206 | 206 | |
|
207 | 207 | $ hg diff --nodates |
|
208 | diff -r 802f095af299 a | |
|
208 | diff -r 1e71731e6fbb a | |
|
209 | 209 | --- a/a |
|
210 | 210 | +++ b/a |
|
211 | 211 | @@ -1,1 +1,1 @@ |
|
212 | 212 | -a2 |
|
213 | 213 | +abc |
|
214 | 214 | |
|
215 | 215 | |
|
216 | 216 | test a local add |
|
217 | 217 | |
|
218 | 218 | $ cd .. |
|
219 | 219 | $ hg init a |
|
220 | 220 | $ hg init b |
|
221 | 221 | $ echo a > a/a |
|
222 | 222 | $ echo a > b/a |
|
223 | 223 | $ hg --cwd a commit -A -m a |
|
224 | 224 | adding a |
|
225 | 225 | $ cd b |
|
226 | 226 | $ hg add a |
|
227 | 227 | $ hg pull -u ../a |
|
228 | 228 | pulling from ../a |
|
229 | 229 | requesting all changes |
|
230 | 230 | adding changesets |
|
231 | 231 | adding manifests |
|
232 | 232 | adding file changes |
|
233 | 233 | added 1 changesets with 1 changes to 1 files |
|
234 | 234 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
235 | 235 | $ hg st |
@@ -1,34 +1,34 b'' | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | 3 | hg init |
|
4 | 4 | touch a |
|
5 | 5 | hg add a |
|
6 |
hg commit -m "Added a" |
|
|
6 | hg commit -m "Added a" | |
|
7 | 7 | |
|
8 | 8 | touch main |
|
9 | 9 | hg add main |
|
10 |
hg commit -m "Added main" |
|
|
10 | hg commit -m "Added main" | |
|
11 | 11 | hg checkout 0 |
|
12 | 12 | |
|
13 | 13 | echo Main should be gone |
|
14 | 14 | ls |
|
15 | 15 | |
|
16 | 16 | touch side1 |
|
17 | 17 | hg add side1 |
|
18 |
hg commit -m "Added side1" |
|
|
18 | hg commit -m "Added side1" | |
|
19 | 19 | touch side2 |
|
20 | 20 | hg add side2 |
|
21 |
hg commit -m "Added side2" |
|
|
21 | hg commit -m "Added side2" | |
|
22 | 22 | |
|
23 | 23 | hg log |
|
24 | 24 | |
|
25 | 25 | echo Should have two heads, side2 and main |
|
26 | 26 | hg heads |
|
27 | 27 | |
|
28 | 28 | echo Should show "a side1 side2" |
|
29 | 29 | ls |
|
30 | 30 | |
|
31 | 31 | hg update --debug -C 1 |
|
32 | 32 | echo Should only show "a main" |
|
33 | 33 | ls |
|
34 | 34 |
@@ -1,58 +1,58 b'' | |||
|
1 | 1 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
2 | 2 | Main should be gone |
|
3 | 3 | a |
|
4 | 4 | created new head |
|
5 |
changeset: 3: |
|
|
5 | changeset: 3:91ebc10ed028 | |
|
6 | 6 | tag: tip |
|
7 | 7 | user: test |
|
8 |
date: |
|
|
8 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
9 | 9 | summary: Added side2 |
|
10 | 10 | |
|
11 |
changeset: 2: |
|
|
12 |
parent: 0: |
|
|
11 | changeset: 2:b932d7dbb1e1 | |
|
12 | parent: 0:c2eda428b523 | |
|
13 | 13 | user: test |
|
14 |
date: |
|
|
14 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
15 | 15 | summary: Added side1 |
|
16 | 16 | |
|
17 |
changeset: 1: |
|
|
17 | changeset: 1:71a760306caf | |
|
18 | 18 | user: test |
|
19 |
date: |
|
|
19 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
20 | 20 | summary: Added main |
|
21 | 21 | |
|
22 |
changeset: 0: |
|
|
22 | changeset: 0:c2eda428b523 | |
|
23 | 23 | user: test |
|
24 |
date: |
|
|
24 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
25 | 25 | summary: Added a |
|
26 | 26 | |
|
27 | 27 | Should have two heads, side2 and main |
|
28 |
changeset: 3: |
|
|
28 | changeset: 3:91ebc10ed028 | |
|
29 | 29 | tag: tip |
|
30 | 30 | user: test |
|
31 |
date: |
|
|
31 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
32 | 32 | summary: Added side2 |
|
33 | 33 | |
|
34 |
changeset: 1: |
|
|
34 | changeset: 1:71a760306caf | |
|
35 | 35 | user: test |
|
36 |
date: |
|
|
36 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
37 | 37 | summary: Added main |
|
38 | 38 | |
|
39 | 39 | Should show a side1 side2 |
|
40 | 40 | a |
|
41 | 41 | side1 |
|
42 | 42 | side2 |
|
43 | 43 | resolving manifests |
|
44 | 44 | overwrite True partial False |
|
45 | ancestor ded32b0db104+ local ded32b0db104+ remote 221226fb2bd8 | |
|
45 | ancestor 91ebc10ed028+ local 91ebc10ed028+ remote 71a760306caf | |
|
46 | 46 | side2: other deleted -> r |
|
47 | 47 | side1: other deleted -> r |
|
48 | 48 | main: remote created -> g |
|
49 | 49 | updating: side1 1/3 files (33.33%) |
|
50 | 50 | removing side1 |
|
51 | 51 | updating: side2 2/3 files (66.67%) |
|
52 | 52 | removing side2 |
|
53 | 53 | updating: main 3/3 files (100.00%) |
|
54 | 54 | getting main |
|
55 | 55 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
56 | 56 | Should only show a main |
|
57 | 57 | a |
|
58 | 58 | main |
@@ -1,297 +1,297 b'' | |||
|
1 | 1 | $ mkdir t |
|
2 | 2 | $ cd t |
|
3 | 3 | $ hg init |
|
4 | 4 | $ mkdir -p beans |
|
5 | 5 | $ for b in kidney navy turtle borlotti black pinto; do |
|
6 | 6 | > echo $b > beans/$b |
|
7 | 7 | $ done |
|
8 | 8 | $ mkdir -p mammals/Procyonidae |
|
9 | 9 | $ for m in cacomistle coatimundi raccoon; do |
|
10 | 10 | > echo $m > mammals/Procyonidae/$m |
|
11 | 11 | $ done |
|
12 | 12 | $ echo skunk > mammals/skunk |
|
13 | 13 | $ echo fennel > fennel |
|
14 | 14 | $ echo fenugreek > fenugreek |
|
15 | 15 | $ echo fiddlehead > fiddlehead |
|
16 | 16 | $ echo glob:glob > glob:glob |
|
17 | 17 | $ hg addremove |
|
18 | 18 | adding beans/black |
|
19 | 19 | adding beans/borlotti |
|
20 | 20 | adding beans/kidney |
|
21 | 21 | adding beans/navy |
|
22 | 22 | adding beans/pinto |
|
23 | 23 | adding beans/turtle |
|
24 | 24 | adding fennel |
|
25 | 25 | adding fenugreek |
|
26 | 26 | adding fiddlehead |
|
27 | 27 | adding glob:glob |
|
28 | 28 | adding mammals/Procyonidae/cacomistle |
|
29 | 29 | adding mammals/Procyonidae/coatimundi |
|
30 | 30 | adding mammals/Procyonidae/raccoon |
|
31 | 31 | adding mammals/skunk |
|
32 |
$ hg commit -m "commit #0" |
|
|
32 | $ hg commit -m "commit #0" | |
|
33 | 33 | |
|
34 | 34 | $ hg debugwalk |
|
35 | 35 | f beans/black beans/black |
|
36 | 36 | f beans/borlotti beans/borlotti |
|
37 | 37 | f beans/kidney beans/kidney |
|
38 | 38 | f beans/navy beans/navy |
|
39 | 39 | f beans/pinto beans/pinto |
|
40 | 40 | f beans/turtle beans/turtle |
|
41 | 41 | f fennel fennel |
|
42 | 42 | f fenugreek fenugreek |
|
43 | 43 | f fiddlehead fiddlehead |
|
44 | 44 | f glob:glob glob:glob |
|
45 | 45 | f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle |
|
46 | 46 | f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi |
|
47 | 47 | f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon |
|
48 | 48 | f mammals/skunk mammals/skunk |
|
49 | 49 | $ hg debugwalk -I. |
|
50 | 50 | f beans/black beans/black |
|
51 | 51 | f beans/borlotti beans/borlotti |
|
52 | 52 | f beans/kidney beans/kidney |
|
53 | 53 | f beans/navy beans/navy |
|
54 | 54 | f beans/pinto beans/pinto |
|
55 | 55 | f beans/turtle beans/turtle |
|
56 | 56 | f fennel fennel |
|
57 | 57 | f fenugreek fenugreek |
|
58 | 58 | f fiddlehead fiddlehead |
|
59 | 59 | f glob:glob glob:glob |
|
60 | 60 | f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle |
|
61 | 61 | f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi |
|
62 | 62 | f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon |
|
63 | 63 | f mammals/skunk mammals/skunk |
|
64 | 64 | |
|
65 | 65 | $ cd mammals |
|
66 | 66 | $ hg debugwalk |
|
67 | 67 | f beans/black ../beans/black |
|
68 | 68 | f beans/borlotti ../beans/borlotti |
|
69 | 69 | f beans/kidney ../beans/kidney |
|
70 | 70 | f beans/navy ../beans/navy |
|
71 | 71 | f beans/pinto ../beans/pinto |
|
72 | 72 | f beans/turtle ../beans/turtle |
|
73 | 73 | f fennel ../fennel |
|
74 | 74 | f fenugreek ../fenugreek |
|
75 | 75 | f fiddlehead ../fiddlehead |
|
76 | 76 | f glob:glob ../glob:glob |
|
77 | 77 | f mammals/Procyonidae/cacomistle Procyonidae/cacomistle |
|
78 | 78 | f mammals/Procyonidae/coatimundi Procyonidae/coatimundi |
|
79 | 79 | f mammals/Procyonidae/raccoon Procyonidae/raccoon |
|
80 | 80 | f mammals/skunk skunk |
|
81 | 81 | $ hg debugwalk -X ../beans |
|
82 | 82 | f fennel ../fennel |
|
83 | 83 | f fenugreek ../fenugreek |
|
84 | 84 | f fiddlehead ../fiddlehead |
|
85 | 85 | f glob:glob ../glob:glob |
|
86 | 86 | f mammals/Procyonidae/cacomistle Procyonidae/cacomistle |
|
87 | 87 | f mammals/Procyonidae/coatimundi Procyonidae/coatimundi |
|
88 | 88 | f mammals/Procyonidae/raccoon Procyonidae/raccoon |
|
89 | 89 | f mammals/skunk skunk |
|
90 | 90 | $ hg debugwalk -I '*k' |
|
91 | 91 | f mammals/skunk skunk |
|
92 | 92 | $ hg debugwalk -I 'glob:*k' |
|
93 | 93 | f mammals/skunk skunk |
|
94 | 94 | $ hg debugwalk -I 'relglob:*k' |
|
95 | 95 | f beans/black ../beans/black |
|
96 | 96 | f fenugreek ../fenugreek |
|
97 | 97 | f mammals/skunk skunk |
|
98 | 98 | $ hg debugwalk -I 'relglob:*k' . |
|
99 | 99 | f mammals/skunk skunk |
|
100 | 100 | $ hg debugwalk -I 're:.*k$' |
|
101 | 101 | f beans/black ../beans/black |
|
102 | 102 | f fenugreek ../fenugreek |
|
103 | 103 | f mammals/skunk skunk |
|
104 | 104 | $ hg debugwalk -I 'relre:.*k$' |
|
105 | 105 | f beans/black ../beans/black |
|
106 | 106 | f fenugreek ../fenugreek |
|
107 | 107 | f mammals/skunk skunk |
|
108 | 108 | $ hg debugwalk -I 'path:beans' |
|
109 | 109 | f beans/black ../beans/black |
|
110 | 110 | f beans/borlotti ../beans/borlotti |
|
111 | 111 | f beans/kidney ../beans/kidney |
|
112 | 112 | f beans/navy ../beans/navy |
|
113 | 113 | f beans/pinto ../beans/pinto |
|
114 | 114 | f beans/turtle ../beans/turtle |
|
115 | 115 | $ hg debugwalk -I 'relpath:../beans' |
|
116 | 116 | f beans/black ../beans/black |
|
117 | 117 | f beans/borlotti ../beans/borlotti |
|
118 | 118 | f beans/kidney ../beans/kidney |
|
119 | 119 | f beans/navy ../beans/navy |
|
120 | 120 | f beans/pinto ../beans/pinto |
|
121 | 121 | f beans/turtle ../beans/turtle |
|
122 | 122 | $ hg debugwalk . |
|
123 | 123 | f mammals/Procyonidae/cacomistle Procyonidae/cacomistle |
|
124 | 124 | f mammals/Procyonidae/coatimundi Procyonidae/coatimundi |
|
125 | 125 | f mammals/Procyonidae/raccoon Procyonidae/raccoon |
|
126 | 126 | f mammals/skunk skunk |
|
127 | 127 | $ hg debugwalk -I. |
|
128 | 128 | f mammals/Procyonidae/cacomistle Procyonidae/cacomistle |
|
129 | 129 | f mammals/Procyonidae/coatimundi Procyonidae/coatimundi |
|
130 | 130 | f mammals/Procyonidae/raccoon Procyonidae/raccoon |
|
131 | 131 | f mammals/skunk skunk |
|
132 | 132 | $ hg debugwalk Procyonidae |
|
133 | 133 | f mammals/Procyonidae/cacomistle Procyonidae/cacomistle |
|
134 | 134 | f mammals/Procyonidae/coatimundi Procyonidae/coatimundi |
|
135 | 135 | f mammals/Procyonidae/raccoon Procyonidae/raccoon |
|
136 | 136 | |
|
137 | 137 | $ cd Procyonidae |
|
138 | 138 | $ hg debugwalk . |
|
139 | 139 | f mammals/Procyonidae/cacomistle cacomistle |
|
140 | 140 | f mammals/Procyonidae/coatimundi coatimundi |
|
141 | 141 | f mammals/Procyonidae/raccoon raccoon |
|
142 | 142 | $ hg debugwalk .. |
|
143 | 143 | f mammals/Procyonidae/cacomistle cacomistle |
|
144 | 144 | f mammals/Procyonidae/coatimundi coatimundi |
|
145 | 145 | f mammals/Procyonidae/raccoon raccoon |
|
146 | 146 | f mammals/skunk ../skunk |
|
147 | 147 | $ cd .. |
|
148 | 148 | |
|
149 | 149 | $ hg debugwalk ../beans |
|
150 | 150 | f beans/black ../beans/black |
|
151 | 151 | f beans/borlotti ../beans/borlotti |
|
152 | 152 | f beans/kidney ../beans/kidney |
|
153 | 153 | f beans/navy ../beans/navy |
|
154 | 154 | f beans/pinto ../beans/pinto |
|
155 | 155 | f beans/turtle ../beans/turtle |
|
156 | 156 | $ hg debugwalk . |
|
157 | 157 | f mammals/Procyonidae/cacomistle Procyonidae/cacomistle |
|
158 | 158 | f mammals/Procyonidae/coatimundi Procyonidae/coatimundi |
|
159 | 159 | f mammals/Procyonidae/raccoon Procyonidae/raccoon |
|
160 | 160 | f mammals/skunk skunk |
|
161 | 161 | $ hg debugwalk .hg |
|
162 | 162 | abort: path 'mammals/.hg' is inside repo 'mammals' |
|
163 | 163 | $ hg debugwalk ../.hg |
|
164 | 164 | abort: path contains illegal component: .hg |
|
165 | 165 | $ cd .. |
|
166 | 166 | |
|
167 | 167 | $ hg debugwalk -Ibeans |
|
168 | 168 | f beans/black beans/black |
|
169 | 169 | f beans/borlotti beans/borlotti |
|
170 | 170 | f beans/kidney beans/kidney |
|
171 | 171 | f beans/navy beans/navy |
|
172 | 172 | f beans/pinto beans/pinto |
|
173 | 173 | f beans/turtle beans/turtle |
|
174 | 174 | $ hg debugwalk -I '{*,{b,m}*/*}k' |
|
175 | 175 | f beans/black beans/black |
|
176 | 176 | f fenugreek fenugreek |
|
177 | 177 | f mammals/skunk mammals/skunk |
|
178 | 178 | $ hg debugwalk 'glob:mammals/../beans/b*' |
|
179 | 179 | f beans/black beans/black |
|
180 | 180 | f beans/borlotti beans/borlotti |
|
181 | 181 | $ hg debugwalk '-X*/Procyonidae' mammals |
|
182 | 182 | f mammals/skunk mammals/skunk |
|
183 | 183 | $ hg debugwalk path:mammals |
|
184 | 184 | f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle |
|
185 | 185 | f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi |
|
186 | 186 | f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon |
|
187 | 187 | f mammals/skunk mammals/skunk |
|
188 | 188 | $ hg debugwalk .. |
|
189 | 189 | abort: .. not under root |
|
190 | 190 | $ hg debugwalk beans/../.. |
|
191 | 191 | abort: beans/../.. not under root |
|
192 | 192 | $ hg debugwalk .hg |
|
193 | 193 | abort: path contains illegal component: .hg |
|
194 | 194 | $ hg debugwalk beans/../.hg |
|
195 | 195 | abort: path contains illegal component: .hg |
|
196 | 196 | $ hg debugwalk beans/../.hg/data |
|
197 | 197 | abort: path contains illegal component: .hg/data |
|
198 | 198 | $ hg debugwalk beans/.hg |
|
199 | 199 | abort: path 'beans/.hg' is inside repo 'beans' |
|
200 | 200 | |
|
201 | 201 | Test absolute paths: |
|
202 | 202 | |
|
203 | 203 | $ hg debugwalk `pwd`/beans |
|
204 | 204 | f beans/black beans/black |
|
205 | 205 | f beans/borlotti beans/borlotti |
|
206 | 206 | f beans/kidney beans/kidney |
|
207 | 207 | f beans/navy beans/navy |
|
208 | 208 | f beans/pinto beans/pinto |
|
209 | 209 | f beans/turtle beans/turtle |
|
210 | 210 | $ hg debugwalk `pwd`/.. |
|
211 | 211 | abort: .*/.. not under root |
|
212 | 212 | |
|
213 | 213 | Test patterns: |
|
214 | 214 | |
|
215 | 215 | $ hg debugwalk glob:\* |
|
216 | 216 | f fennel fennel |
|
217 | 217 | f fenugreek fenugreek |
|
218 | 218 | f fiddlehead fiddlehead |
|
219 | 219 | f glob:glob glob:glob |
|
220 | 220 | |
|
221 | 221 | $ hg debugwalk 'glob:**e' |
|
222 | 222 | f beans/turtle beans/turtle |
|
223 | 223 | f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle |
|
224 | 224 | |
|
225 | 225 | $ hg debugwalk 're:.*[kb]$' |
|
226 | 226 | f beans/black beans/black |
|
227 | 227 | f fenugreek fenugreek |
|
228 | 228 | f glob:glob glob:glob |
|
229 | 229 | f mammals/skunk mammals/skunk |
|
230 | 230 | |
|
231 | 231 | $ hg debugwalk path:beans/black |
|
232 | 232 | f beans/black beans/black exact |
|
233 | 233 | $ hg debugwalk path:beans//black |
|
234 | 234 | f beans/black beans/black exact |
|
235 | 235 | |
|
236 | 236 | $ hg debugwalk relglob:Procyonidae |
|
237 | 237 | $ hg debugwalk 'relglob:Procyonidae/**' |
|
238 | 238 | f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle |
|
239 | 239 | f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi |
|
240 | 240 | f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon |
|
241 | 241 | $ hg debugwalk 'relglob:Procyonidae/**' fennel |
|
242 | 242 | f fennel fennel exact |
|
243 | 243 | f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle |
|
244 | 244 | f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi |
|
245 | 245 | f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon |
|
246 | 246 | $ hg debugwalk beans 'glob:beans/*' |
|
247 | 247 | f beans/black beans/black |
|
248 | 248 | f beans/borlotti beans/borlotti |
|
249 | 249 | f beans/kidney beans/kidney |
|
250 | 250 | f beans/navy beans/navy |
|
251 | 251 | f beans/pinto beans/pinto |
|
252 | 252 | f beans/turtle beans/turtle |
|
253 | 253 | $ hg debugwalk 'glob:mamm**' |
|
254 | 254 | f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle |
|
255 | 255 | f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi |
|
256 | 256 | f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon |
|
257 | 257 | f mammals/skunk mammals/skunk |
|
258 | 258 | $ hg debugwalk 'glob:mamm**' fennel |
|
259 | 259 | f fennel fennel exact |
|
260 | 260 | f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle |
|
261 | 261 | f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi |
|
262 | 262 | f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon |
|
263 | 263 | f mammals/skunk mammals/skunk |
|
264 | 264 | $ hg debugwalk 'glob:j*' |
|
265 | 265 | $ hg debugwalk NOEXIST |
|
266 | 266 | NOEXIST: No such file or directory |
|
267 | 267 | |
|
268 | 268 | $ mkfifo fifo |
|
269 | 269 | $ hg debugwalk fifo |
|
270 | 270 | fifo: unsupported file type (type is fifo) |
|
271 | 271 | |
|
272 | 272 | $ rm fenugreek |
|
273 | 273 | $ hg debugwalk fenugreek |
|
274 | 274 | f fenugreek fenugreek exact |
|
275 | 275 | $ hg rm fenugreek |
|
276 | 276 | $ hg debugwalk fenugreek |
|
277 | 277 | f fenugreek fenugreek exact |
|
278 | 278 | $ touch new |
|
279 | 279 | $ hg debugwalk new |
|
280 | 280 | f new new exact |
|
281 | 281 | |
|
282 | 282 | $ mkdir ignored |
|
283 | 283 | $ touch ignored/file |
|
284 | 284 | $ echo '^ignored$' > .hgignore |
|
285 | 285 | $ hg debugwalk ignored |
|
286 | 286 | $ hg debugwalk ignored/file |
|
287 | 287 | f ignored/file ignored/file exact |
|
288 | 288 | |
|
289 | 289 | $ cd .. |
|
290 | 290 | $ hg debugwalk -R t t/mammals/skunk |
|
291 | 291 | f mammals/skunk t/mammals/skunk exact |
|
292 | 292 | $ mkdir t2 |
|
293 | 293 | $ cd t2 |
|
294 | 294 | $ hg debugwalk -R ../t ../t/mammals/skunk |
|
295 | 295 | f mammals/skunk ../t/mammals/skunk exact |
|
296 | 296 | $ hg debugwalk --cwd ../t mammals/skunk |
|
297 | 297 | f mammals/skunk mammals/skunk exact |
General Comments 0
You need to be logged in to leave comments.
Login now