Mercurial > hg
comparison tests/test-bundle-r.t @ 11871:f22b101e33e4
tests: unify test-bundle-r
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Sat, 14 Aug 2010 03:22:11 +0200 |
parents | tests/test-bundle-r@65b178f30eae |
children | 4c94b6d0fb1c |
comparison
equal
deleted
inserted
replaced
11870:33eb803e9343 | 11871:f22b101e33e4 |
---|---|
1 $ hg init test | |
2 $ cd test | |
3 $ echo "0" >> afile | |
4 $ hg add afile | |
5 $ hg commit -m "0.0" -d "1000000 0" | |
6 $ echo "1" >> afile | |
7 $ hg commit -m "0.1" -d "1000000 0" | |
8 $ echo "2" >> afile | |
9 $ hg commit -m "0.2" -d "1000000 0" | |
10 $ echo "3" >> afile | |
11 $ hg commit -m "0.3" -d "1000000 0" | |
12 $ hg update -C 0 | |
13 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
14 $ echo "1" >> afile | |
15 $ hg commit -m "1.1" -d "1000000 0" | |
16 created new head | |
17 $ echo "2" >> afile | |
18 $ hg commit -m "1.2" -d "1000000 0" | |
19 $ echo "a line" > fred | |
20 $ echo "3" >> afile | |
21 $ hg add fred | |
22 $ hg commit -m "1.3" -d "1000000 0" | |
23 $ hg mv afile adifferentfile | |
24 $ hg commit -m "1.3m" -d "1000000 0" | |
25 $ hg update -C 3 | |
26 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
27 $ hg mv afile anotherfile | |
28 $ hg commit -m "0.3m" -d "1000000 0" | |
29 $ hg debugindex .hg/store/data/afile.i | |
30 rev offset length base linkrev nodeid p1 p2 | |
31 0 0 3 0 0 362fef284ce2 000000000000 000000000000 | |
32 1 3 5 1 1 125144f7e028 362fef284ce2 000000000000 | |
33 2 8 7 2 2 4c982badb186 125144f7e028 000000000000 | |
34 3 15 9 3 3 19b1fc555737 4c982badb186 000000000000 | |
35 $ hg debugindex .hg/store/data/adifferentfile.i | |
36 rev offset length base linkrev nodeid p1 p2 | |
37 0 0 75 0 7 2565f3199a74 000000000000 000000000000 | |
38 $ hg debugindex .hg/store/data/anotherfile.i | |
39 rev offset length base linkrev nodeid p1 p2 | |
40 0 0 75 0 8 2565f3199a74 000000000000 000000000000 | |
41 $ hg debugindex .hg/store/data/fred.i | |
42 rev offset length base linkrev nodeid p1 p2 | |
43 0 0 8 0 6 12ab3bcc5ea4 000000000000 000000000000 | |
44 $ hg debugindex .hg/store/00manifest.i | |
45 rev offset length base linkrev nodeid p1 p2 | |
46 0 0 48 0 0 43eadb1d2d06 000000000000 000000000000 | |
47 1 48 48 1 1 8b89697eba2c 43eadb1d2d06 000000000000 | |
48 2 96 48 2 2 626a32663c2f 8b89697eba2c 000000000000 | |
49 3 144 48 3 3 f54c32f13478 626a32663c2f 000000000000 | |
50 4 192 58 3 6 de68e904d169 626a32663c2f 000000000000 | |
51 5 250 68 3 7 09bb521d218d de68e904d169 000000000000 | |
52 6 318 54 6 8 1fde233dfb0f f54c32f13478 000000000000 | |
53 $ hg verify | |
54 checking changesets | |
55 checking manifests | |
56 crosschecking files in changesets and manifests | |
57 checking files | |
58 4 files, 9 changesets, 7 total revisions | |
59 $ cd .. | |
60 $ for i in 0 1 2 3 4 5 6 7 8; do | |
61 > mkdir test-"$i" | |
62 > hg --cwd test-"$i" init | |
63 > hg -R test bundle -r "$i" test-"$i".hg test-"$i" | |
64 > cd test-"$i" | |
65 > hg unbundle ../test-"$i".hg | |
66 > hg verify | |
67 > hg tip -q | |
68 > cd .. | |
69 > done | |
70 searching for changes | |
71 1 changesets found | |
72 adding changesets | |
73 adding manifests | |
74 adding file changes | |
75 added 1 changesets with 1 changes to 1 files | |
76 (run 'hg update' to get a working copy) | |
77 checking changesets | |
78 checking manifests | |
79 crosschecking files in changesets and manifests | |
80 checking files | |
81 1 files, 1 changesets, 1 total revisions | |
82 0:5649c9d34dd8 | |
83 searching for changes | |
84 2 changesets found | |
85 adding changesets | |
86 adding manifests | |
87 adding file changes | |
88 added 2 changesets with 2 changes to 1 files | |
89 (run 'hg update' to get a working copy) | |
90 checking changesets | |
91 checking manifests | |
92 crosschecking files in changesets and manifests | |
93 checking files | |
94 1 files, 2 changesets, 2 total revisions | |
95 1:10b2180f755b | |
96 searching for changes | |
97 3 changesets found | |
98 adding changesets | |
99 adding manifests | |
100 adding file changes | |
101 added 3 changesets with 3 changes to 1 files | |
102 (run 'hg update' to get a working copy) | |
103 checking changesets | |
104 checking manifests | |
105 crosschecking files in changesets and manifests | |
106 checking files | |
107 1 files, 3 changesets, 3 total revisions | |
108 2:d62976ca1e50 | |
109 searching for changes | |
110 4 changesets found | |
111 adding changesets | |
112 adding manifests | |
113 adding file changes | |
114 added 4 changesets with 4 changes to 1 files | |
115 (run 'hg update' to get a working copy) | |
116 checking changesets | |
117 checking manifests | |
118 crosschecking files in changesets and manifests | |
119 checking files | |
120 1 files, 4 changesets, 4 total revisions | |
121 3:ac69c658229d | |
122 searching for changes | |
123 2 changesets found | |
124 adding changesets | |
125 adding manifests | |
126 adding file changes | |
127 added 2 changesets with 2 changes to 1 files | |
128 (run 'hg update' to get a working copy) | |
129 checking changesets | |
130 checking manifests | |
131 crosschecking files in changesets and manifests | |
132 checking files | |
133 1 files, 2 changesets, 2 total revisions | |
134 1:5f4f3ceb285e | |
135 searching for changes | |
136 3 changesets found | |
137 adding changesets | |
138 adding manifests | |
139 adding file changes | |
140 added 3 changesets with 3 changes to 1 files | |
141 (run 'hg update' to get a working copy) | |
142 checking changesets | |
143 checking manifests | |
144 crosschecking files in changesets and manifests | |
145 checking files | |
146 1 files, 3 changesets, 3 total revisions | |
147 2:024e4e7df376 | |
148 searching for changes | |
149 4 changesets found | |
150 adding changesets | |
151 adding manifests | |
152 adding file changes | |
153 added 4 changesets with 5 changes to 2 files | |
154 (run 'hg update' to get a working copy) | |
155 checking changesets | |
156 checking manifests | |
157 crosschecking files in changesets and manifests | |
158 checking files | |
159 2 files, 4 changesets, 5 total revisions | |
160 3:1e3f6b843bd6 | |
161 searching for changes | |
162 5 changesets found | |
163 adding changesets | |
164 adding manifests | |
165 adding file changes | |
166 added 5 changesets with 6 changes to 3 files | |
167 (run 'hg update' to get a working copy) | |
168 checking changesets | |
169 checking manifests | |
170 crosschecking files in changesets and manifests | |
171 checking files | |
172 3 files, 5 changesets, 6 total revisions | |
173 4:27f57c869697 | |
174 searching for changes | |
175 5 changesets found | |
176 adding changesets | |
177 adding manifests | |
178 adding file changes | |
179 added 5 changesets with 5 changes to 2 files | |
180 (run 'hg update' to get a working copy) | |
181 checking changesets | |
182 checking manifests | |
183 crosschecking files in changesets and manifests | |
184 checking files | |
185 2 files, 5 changesets, 5 total revisions | |
186 4:088ff9d6e1e1 | |
187 $ cd test-8 | |
188 $ hg pull ../test-7 | |
189 pulling from ../test-7 | |
190 searching for changes | |
191 adding changesets | |
192 adding manifests | |
193 adding file changes | |
194 added 4 changesets with 2 changes to 3 files (+1 heads) | |
195 (run 'hg heads' to see heads, 'hg merge' to merge) | |
196 $ hg verify | |
197 checking changesets | |
198 checking manifests | |
199 crosschecking files in changesets and manifests | |
200 checking files | |
201 4 files, 9 changesets, 7 total revisions | |
202 $ hg rollback | |
203 rolling back to revision 4 (undo pull) | |
204 $ cd .. | |
205 | |
206 should fail | |
207 | |
208 $ hg -R test bundle --base 2 -r tip test-bundle-branch1.hg test-3 | |
209 abort: --base is incompatible with specifying a destination | |
210 $ hg -R test bundle -r tip test-bundle-branch1.hg | |
211 abort: repository default-push not found! | |
212 | |
213 $ hg -R test bundle --base 2 -r tip test-bundle-branch1.hg | |
214 2 changesets found | |
215 $ hg -R test bundle --base 2 -r 7 test-bundle-branch2.hg | |
216 4 changesets found | |
217 $ hg -R test bundle --base 2 test-bundle-all.hg | |
218 6 changesets found | |
219 $ hg -R test bundle --base 3 -r tip test-bundle-should-fail.hg | |
220 1 changesets found | |
221 | |
222 empty bundle | |
223 | |
224 $ hg -R test bundle --base 7 --base 8 test-bundle-empty.hg | |
225 no changes found | |
226 | |
227 issue76 msg2163 | |
228 | |
229 $ hg -R test bundle --base 3 -r 3 -r 3 test-bundle-cset-3.hg | |
230 1 changesets found | |
231 | |
232 issue1910 | |
233 | |
234 $ hg -R test bundle --base 7 test-bundle-cset-7.hg | |
235 4 changesets found | |
236 | |
237 $ hg clone test-2 test-9 | |
238 updating to branch default | |
239 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
240 $ cd test-9 | |
241 | |
242 revision 2 | |
243 | |
244 $ hg tip -q | |
245 2:d62976ca1e50 | |
246 $ hg unbundle ../test-bundle-should-fail.hg | |
247 adding changesets | |
248 transaction abort! | |
249 rollback completed | |
250 abort: 00changelog.i@ac69c658229d: unknown parent! | |
251 | |
252 revision 2 | |
253 | |
254 $ hg tip -q | |
255 2:d62976ca1e50 | |
256 $ hg unbundle ../test-bundle-all.hg | |
257 adding changesets | |
258 adding manifests | |
259 adding file changes | |
260 added 6 changesets with 4 changes to 4 files (+1 heads) | |
261 (run 'hg heads' to see heads, 'hg merge' to merge) | |
262 | |
263 revision 8 | |
264 | |
265 $ hg tip -q | |
266 8:088ff9d6e1e1 | |
267 $ hg verify | |
268 checking changesets | |
269 checking manifests | |
270 crosschecking files in changesets and manifests | |
271 checking files | |
272 4 files, 9 changesets, 7 total revisions | |
273 $ hg rollback | |
274 rolling back to revision 2 (undo unbundle) | |
275 | |
276 revision 2 | |
277 | |
278 $ hg tip -q | |
279 2:d62976ca1e50 | |
280 $ hg unbundle ../test-bundle-branch1.hg | |
281 adding changesets | |
282 adding manifests | |
283 adding file changes | |
284 added 2 changesets with 2 changes to 2 files | |
285 (run 'hg update' to get a working copy) | |
286 | |
287 revision 4 | |
288 | |
289 $ hg tip -q | |
290 4:088ff9d6e1e1 | |
291 $ hg verify | |
292 checking changesets | |
293 checking manifests | |
294 crosschecking files in changesets and manifests | |
295 checking files | |
296 2 files, 5 changesets, 5 total revisions | |
297 $ hg rollback | |
298 rolling back to revision 2 (undo unbundle) | |
299 $ hg unbundle ../test-bundle-branch2.hg | |
300 adding changesets | |
301 adding manifests | |
302 adding file changes | |
303 added 4 changesets with 3 changes to 3 files (+1 heads) | |
304 (run 'hg heads' to see heads, 'hg merge' to merge) | |
305 | |
306 revision 6 | |
307 | |
308 $ hg tip -q | |
309 6:27f57c869697 | |
310 $ hg verify | |
311 checking changesets | |
312 checking manifests | |
313 crosschecking files in changesets and manifests | |
314 checking files | |
315 3 files, 7 changesets, 6 total revisions | |
316 $ hg rollback | |
317 rolling back to revision 2 (undo unbundle) | |
318 $ hg unbundle ../test-bundle-cset-7.hg | |
319 adding changesets | |
320 adding manifests | |
321 adding file changes | |
322 added 2 changesets with 2 changes to 2 files | |
323 (run 'hg update' to get a working copy) | |
324 | |
325 revision 4 | |
326 | |
327 $ hg tip -q | |
328 4:088ff9d6e1e1 | |
329 $ hg verify | |
330 checking changesets | |
331 checking manifests | |
332 crosschecking files in changesets and manifests | |
333 checking files | |
334 2 files, 5 changesets, 5 total revisions | |
335 | |
336 $ cd ../test | |
337 $ hg merge 7 | |
338 warning: detected divergent renames of afile to: | |
339 anotherfile | |
340 adifferentfile | |
341 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
342 (branch merge, don't forget to commit) | |
343 $ hg ci -m merge -d "1000000 0" | |
344 $ cd .. | |
345 $ hg -R test bundle --base 2 test-bundle-head.hg | |
346 7 changesets found | |
347 $ hg clone test-2 test-10 | |
348 updating to branch default | |
349 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
350 $ cd test-10 | |
351 $ hg unbundle ../test-bundle-head.hg | |
352 adding changesets | |
353 adding manifests | |
354 adding file changes | |
355 added 7 changesets with 4 changes to 4 files | |
356 (run 'hg update' to get a working copy) | |
357 | |
358 revision 9 | |
359 | |
360 $ hg tip -q | |
361 9:e3061ea42e4c | |
362 $ hg verify | |
363 checking changesets | |
364 checking manifests | |
365 crosschecking files in changesets and manifests | |
366 checking files | |
367 4 files, 10 changesets, 7 total revisions |