Show More
@@ -1,853 +1,853 | |||
|
1 | 1 | |
|
2 | 2 | $ cat << EOF >> $HGRCPATH |
|
3 | 3 | > [format] |
|
4 | 4 | > usegeneraldelta=yes |
|
5 | 5 | > EOF |
|
6 | 6 | |
|
7 | 7 | Setting up test |
|
8 | 8 | |
|
9 | 9 | $ hg init test |
|
10 | 10 | $ cd test |
|
11 | 11 | $ echo 0 > afile |
|
12 | 12 | $ hg add afile |
|
13 | 13 | $ hg commit -m "0.0" |
|
14 | 14 | $ echo 1 >> afile |
|
15 | 15 | $ hg commit -m "0.1" |
|
16 | 16 | $ echo 2 >> afile |
|
17 | 17 | $ hg commit -m "0.2" |
|
18 | 18 | $ echo 3 >> afile |
|
19 | 19 | $ hg commit -m "0.3" |
|
20 | 20 | $ hg update -C 0 |
|
21 | 21 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
22 | 22 | $ echo 1 >> afile |
|
23 | 23 | $ hg commit -m "1.1" |
|
24 | 24 | created new head |
|
25 | 25 | $ echo 2 >> afile |
|
26 | 26 | $ hg commit -m "1.2" |
|
27 | 27 | $ echo "a line" > fred |
|
28 | 28 | $ echo 3 >> afile |
|
29 | 29 | $ hg add fred |
|
30 | 30 | $ hg commit -m "1.3" |
|
31 | 31 | $ hg mv afile adifferentfile |
|
32 | 32 | $ hg commit -m "1.3m" |
|
33 | 33 | $ hg update -C 3 |
|
34 | 34 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
35 | 35 | $ hg mv afile anotherfile |
|
36 | 36 | $ hg commit -m "0.3m" |
|
37 | 37 | $ hg verify |
|
38 | 38 | checking changesets |
|
39 | 39 | checking manifests |
|
40 | 40 | crosschecking files in changesets and manifests |
|
41 | 41 | checking files |
|
42 | 42 | 4 files, 9 changesets, 7 total revisions |
|
43 | 43 | $ cd .. |
|
44 | 44 | $ hg init empty |
|
45 | 45 | |
|
46 | 46 | Bundle and phase |
|
47 | 47 | |
|
48 | 48 | $ hg -R test phase --force --secret 0 |
|
49 | 49 | $ hg -R test bundle phase.hg empty |
|
50 | 50 | searching for changes |
|
51 | 51 | no changes found (ignored 9 secret changesets) |
|
52 | 52 | [1] |
|
53 | 53 | $ hg -R test phase --draft -r 'head()' |
|
54 | 54 | |
|
55 | 55 | Bundle --all |
|
56 | 56 | |
|
57 | 57 | $ hg -R test bundle --all all.hg |
|
58 | 58 | 9 changesets found |
|
59 | 59 | |
|
60 | 60 | Bundle test to full.hg |
|
61 | 61 | |
|
62 | 62 | $ hg -R test bundle full.hg empty |
|
63 | 63 | searching for changes |
|
64 | 64 | 9 changesets found |
|
65 | 65 | |
|
66 | 66 | Unbundle full.hg in test |
|
67 | 67 | |
|
68 | 68 | $ hg -R test unbundle full.hg |
|
69 | 69 | adding changesets |
|
70 | 70 | adding manifests |
|
71 | 71 | adding file changes |
|
72 | 72 | added 0 changesets with 0 changes to 4 files |
|
73 | 73 | (run 'hg update' to get a working copy) |
|
74 | 74 | |
|
75 | 75 | Verify empty |
|
76 | 76 | |
|
77 | 77 | $ hg -R empty heads |
|
78 | 78 | [1] |
|
79 | 79 | $ hg -R empty verify |
|
80 | 80 | checking changesets |
|
81 | 81 | checking manifests |
|
82 | 82 | crosschecking files in changesets and manifests |
|
83 | 83 | checking files |
|
84 | 84 | 0 files, 0 changesets, 0 total revisions |
|
85 | 85 | |
|
86 | 86 | Pull full.hg into test (using --cwd) |
|
87 | 87 | |
|
88 | 88 | $ hg --cwd test pull ../full.hg |
|
89 | 89 | pulling from ../full.hg |
|
90 | 90 | searching for changes |
|
91 | 91 | no changes found |
|
92 | 92 | |
|
93 | 93 | Verify that there are no leaked temporary files after pull (issue2797) |
|
94 | 94 | |
|
95 | 95 | $ ls test/.hg | grep .hg10un |
|
96 | 96 | [1] |
|
97 | 97 | |
|
98 | 98 | Pull full.hg into empty (using --cwd) |
|
99 | 99 | |
|
100 | 100 | $ hg --cwd empty pull ../full.hg |
|
101 | 101 | pulling from ../full.hg |
|
102 | 102 | requesting all changes |
|
103 | 103 | adding changesets |
|
104 | 104 | adding manifests |
|
105 | 105 | adding file changes |
|
106 | 106 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
107 | 107 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
108 | 108 | |
|
109 | 109 | Rollback empty |
|
110 | 110 | |
|
111 | 111 | $ hg -R empty rollback |
|
112 | 112 | repository tip rolled back to revision -1 (undo pull) |
|
113 | 113 | |
|
114 | 114 | Pull full.hg into empty again (using --cwd) |
|
115 | 115 | |
|
116 | 116 | $ hg --cwd empty pull ../full.hg |
|
117 | 117 | pulling from ../full.hg |
|
118 | 118 | requesting all changes |
|
119 | 119 | adding changesets |
|
120 | 120 | adding manifests |
|
121 | 121 | adding file changes |
|
122 | 122 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
123 | 123 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
124 | 124 | |
|
125 | 125 | Pull full.hg into test (using -R) |
|
126 | 126 | |
|
127 | 127 | $ hg -R test pull full.hg |
|
128 | 128 | pulling from full.hg |
|
129 | 129 | searching for changes |
|
130 | 130 | no changes found |
|
131 | 131 | |
|
132 | 132 | Pull full.hg into empty (using -R) |
|
133 | 133 | |
|
134 | 134 | $ hg -R empty pull full.hg |
|
135 | 135 | pulling from full.hg |
|
136 | 136 | searching for changes |
|
137 | 137 | no changes found |
|
138 | 138 | |
|
139 | 139 | Rollback empty |
|
140 | 140 | |
|
141 | 141 | $ hg -R empty rollback |
|
142 | 142 | repository tip rolled back to revision -1 (undo pull) |
|
143 | 143 | |
|
144 | 144 | Pull full.hg into empty again (using -R) |
|
145 | 145 | |
|
146 | 146 | $ hg -R empty pull full.hg |
|
147 | 147 | pulling from full.hg |
|
148 | 148 | requesting all changes |
|
149 | 149 | adding changesets |
|
150 | 150 | adding manifests |
|
151 | 151 | adding file changes |
|
152 | 152 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
153 | 153 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
154 | 154 | |
|
155 | 155 | Log -R full.hg in fresh empty |
|
156 | 156 | |
|
157 | 157 | $ rm -r empty |
|
158 | 158 | $ hg init empty |
|
159 | 159 | $ cd empty |
|
160 | 160 | $ hg -R bundle://../full.hg log |
|
161 | 161 | changeset: 8:aa35859c02ea |
|
162 | 162 | tag: tip |
|
163 | 163 | parent: 3:eebf5a27f8ca |
|
164 | 164 | user: test |
|
165 | 165 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
166 | 166 | summary: 0.3m |
|
167 | 167 | |
|
168 | 168 | changeset: 7:a6a34bfa0076 |
|
169 | 169 | user: test |
|
170 | 170 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
171 | 171 | summary: 1.3m |
|
172 | 172 | |
|
173 | 173 | changeset: 6:7373c1169842 |
|
174 | 174 | user: test |
|
175 | 175 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
176 | 176 | summary: 1.3 |
|
177 | 177 | |
|
178 | 178 | changeset: 5:1bb50a9436a7 |
|
179 | 179 | user: test |
|
180 | 180 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
181 | 181 | summary: 1.2 |
|
182 | 182 | |
|
183 | 183 | changeset: 4:095197eb4973 |
|
184 | 184 | parent: 0:f9ee2f85a263 |
|
185 | 185 | user: test |
|
186 | 186 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
187 | 187 | summary: 1.1 |
|
188 | 188 | |
|
189 | 189 | changeset: 3:eebf5a27f8ca |
|
190 | 190 | user: test |
|
191 | 191 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
192 | 192 | summary: 0.3 |
|
193 | 193 | |
|
194 | 194 | changeset: 2:e38ba6f5b7e0 |
|
195 | 195 | user: test |
|
196 | 196 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
197 | 197 | summary: 0.2 |
|
198 | 198 | |
|
199 | 199 | changeset: 1:34c2bf6b0626 |
|
200 | 200 | user: test |
|
201 | 201 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
202 | 202 | summary: 0.1 |
|
203 | 203 | |
|
204 | 204 | changeset: 0:f9ee2f85a263 |
|
205 | 205 | user: test |
|
206 | 206 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
207 | 207 | summary: 0.0 |
|
208 | 208 | |
|
209 | 209 | Make sure bundlerepo doesn't leak tempfiles (issue2491) |
|
210 | 210 | |
|
211 | 211 | $ ls .hg |
|
212 | 212 | 00changelog.i |
|
213 | 213 | cache |
|
214 | 214 | requires |
|
215 | 215 | store |
|
216 | 216 | |
|
217 | 217 | Pull ../full.hg into empty (with hook) |
|
218 | 218 | |
|
219 | 219 | $ cat >> .hg/hgrc <<EOF |
|
220 | 220 | > [hooks] |
|
221 | 221 | > changegroup = sh -c "printenv.py changegroup" |
|
222 | 222 | > EOF |
|
223 | 223 | |
|
224 | 224 | doesn't work (yet ?) |
|
225 | 225 | |
|
226 | 226 | hg -R bundle://../full.hg verify |
|
227 | 227 | |
|
228 | 228 | $ hg pull bundle://../full.hg |
|
229 | 229 | pulling from bundle:../full.hg |
|
230 | 230 | requesting all changes |
|
231 | 231 | adding changesets |
|
232 | 232 | adding manifests |
|
233 | 233 | adding file changes |
|
234 | 234 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
235 |
changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=f9ee2f85a263049e9ae6d37a0e67e96194ffb735 HG_NODE_LAST=aa35859c02ea8bd48da5da68cd2740ac71afcbaf HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_URL=bundle |
|
|
235 | changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=f9ee2f85a263049e9ae6d37a0e67e96194ffb735 HG_NODE_LAST=aa35859c02ea8bd48da5da68cd2740ac71afcbaf HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_URL=bundle*../full.hg (glob) | |
|
236 | 236 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
237 | 237 | |
|
238 | 238 | Rollback empty |
|
239 | 239 | |
|
240 | 240 | $ hg rollback |
|
241 | 241 | repository tip rolled back to revision -1 (undo pull) |
|
242 | 242 | $ cd .. |
|
243 | 243 | |
|
244 | 244 | Log -R bundle:empty+full.hg |
|
245 | 245 | |
|
246 | 246 | $ hg -R bundle:empty+full.hg log --template="{rev} "; echo "" |
|
247 | 247 | 8 7 6 5 4 3 2 1 0 |
|
248 | 248 | |
|
249 | 249 | Pull full.hg into empty again (using -R; with hook) |
|
250 | 250 | |
|
251 | 251 | $ hg -R empty pull full.hg |
|
252 | 252 | pulling from full.hg |
|
253 | 253 | requesting all changes |
|
254 | 254 | adding changesets |
|
255 | 255 | adding manifests |
|
256 | 256 | adding file changes |
|
257 | 257 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
258 | 258 | changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=f9ee2f85a263049e9ae6d37a0e67e96194ffb735 HG_NODE_LAST=aa35859c02ea8bd48da5da68cd2740ac71afcbaf HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_URL=bundle:empty+full.hg |
|
259 | 259 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
260 | 260 | |
|
261 | 261 | Cannot produce streaming clone bundles with "hg bundle" |
|
262 | 262 | |
|
263 | 263 | $ hg -R test bundle -t packed1 packed.hg |
|
264 | 264 | abort: packed bundles cannot be produced by "hg bundle" |
|
265 | 265 | (use 'hg debugcreatestreamclonebundle') |
|
266 | 266 | [255] |
|
267 | 267 | |
|
268 | 268 | packed1 is produced properly |
|
269 | 269 | |
|
270 | 270 | $ hg -R test debugcreatestreamclonebundle packed.hg |
|
271 | 271 | writing 2664 bytes for 6 files |
|
272 | 272 | bundle requirements: generaldelta, revlogv1 |
|
273 | 273 | |
|
274 | 274 | $ f -B 64 --size --sha1 --hexdump packed.hg |
|
275 | 275 | packed.hg: size=2827, sha1=9d14cb90c66a21462d915ab33656f38b9deed686 |
|
276 | 276 | 0000: 48 47 53 31 55 4e 00 00 00 00 00 00 00 06 00 00 |HGS1UN..........| |
|
277 | 277 | 0010: 00 00 00 00 0a 68 00 16 67 65 6e 65 72 61 6c 64 |.....h..generald| |
|
278 | 278 | 0020: 65 6c 74 61 2c 72 65 76 6c 6f 67 76 31 00 64 61 |elta,revlogv1.da| |
|
279 | 279 | 0030: 74 61 2f 61 64 69 66 66 65 72 65 6e 74 66 69 6c |ta/adifferentfil| |
|
280 | 280 | |
|
281 | 281 | $ hg debugbundle --spec packed.hg |
|
282 | 282 | none-packed1;requirements%3Dgeneraldelta%2Crevlogv1 |
|
283 | 283 | |
|
284 | 284 | generaldelta requirement is not listed in stream clone bundles unless used |
|
285 | 285 | |
|
286 | 286 | $ hg --config format.usegeneraldelta=false init testnongd |
|
287 | 287 | $ cd testnongd |
|
288 | 288 | $ touch foo |
|
289 | 289 | $ hg -q commit -A -m initial |
|
290 | 290 | $ cd .. |
|
291 | 291 | $ hg -R testnongd debugcreatestreamclonebundle packednongd.hg |
|
292 | 292 | writing 301 bytes for 3 files |
|
293 | 293 | bundle requirements: revlogv1 |
|
294 | 294 | |
|
295 | 295 | $ f -B 64 --size --sha1 --hexdump packednongd.hg |
|
296 | 296 | packednongd.hg: size=383, sha1=1d9c230238edd5d38907100b729ba72b1831fe6f |
|
297 | 297 | 0000: 48 47 53 31 55 4e 00 00 00 00 00 00 00 03 00 00 |HGS1UN..........| |
|
298 | 298 | 0010: 00 00 00 00 01 2d 00 09 72 65 76 6c 6f 67 76 31 |.....-..revlogv1| |
|
299 | 299 | 0020: 00 64 61 74 61 2f 66 6f 6f 2e 69 00 36 34 0a 00 |.data/foo.i.64..| |
|
300 | 300 | 0030: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| |
|
301 | 301 | |
|
302 | 302 | $ hg debugbundle --spec packednongd.hg |
|
303 | 303 | none-packed1;requirements%3Drevlogv1 |
|
304 | 304 | |
|
305 | 305 | Unpacking packed1 bundles with "hg unbundle" isn't allowed |
|
306 | 306 | |
|
307 | 307 | $ hg init packed |
|
308 | 308 | $ hg -R packed unbundle packed.hg |
|
309 | 309 | abort: packed bundles cannot be applied with "hg unbundle" |
|
310 | 310 | (use "hg debugapplystreamclonebundle") |
|
311 | 311 | [255] |
|
312 | 312 | |
|
313 | 313 | packed1 can be consumed from debug command |
|
314 | 314 | |
|
315 | 315 | (this also confirms that streamclone-ed changes are visible via |
|
316 | 316 | @filecache properties to in-process procedures before closing |
|
317 | 317 | transaction) |
|
318 | 318 | |
|
319 | 319 | $ cat > $TESTTMP/showtip.py <<EOF |
|
320 | 320 | > from __future__ import absolute_import |
|
321 | 321 | > |
|
322 | 322 | > def showtip(ui, repo, hooktype, **kwargs): |
|
323 | 323 | > ui.warn('%s: %s\n' % (hooktype, repo['tip'].hex()[:12])) |
|
324 | 324 | > |
|
325 | 325 | > def reposetup(ui, repo): |
|
326 | 326 | > # this confirms (and ensures) that (empty) 00changelog.i |
|
327 | 327 | > # before streamclone is already cached as repo.changelog |
|
328 | 328 | > ui.setconfig('hooks', 'pretxnopen.showtip', showtip) |
|
329 | 329 | > |
|
330 | 330 | > # this confirms that streamclone-ed changes are visible to |
|
331 | 331 | > # in-process procedures before closing transaction |
|
332 | 332 | > ui.setconfig('hooks', 'pretxnclose.showtip', showtip) |
|
333 | 333 | > |
|
334 | 334 | > # this confirms that streamclone-ed changes are still visible |
|
335 | 335 | > # after closing transaction |
|
336 | 336 | > ui.setconfig('hooks', 'txnclose.showtip', showtip) |
|
337 | 337 | > EOF |
|
338 | 338 | $ cat >> $HGRCPATH <<EOF |
|
339 | 339 | > [extensions] |
|
340 | 340 | > showtip = $TESTTMP/showtip.py |
|
341 | 341 | > EOF |
|
342 | 342 | |
|
343 | 343 | $ hg -R packed debugapplystreamclonebundle packed.hg |
|
344 | 344 | 6 files to transfer, 2.60 KB of data |
|
345 | 345 | pretxnopen: 000000000000 |
|
346 | 346 | pretxnclose: aa35859c02ea |
|
347 | 347 | transferred 2.60 KB in *.* seconds (* */sec) (glob) |
|
348 | 348 | txnclose: aa35859c02ea |
|
349 | 349 | |
|
350 | 350 | (for safety, confirm visibility of streamclone-ed changes by another |
|
351 | 351 | process, too) |
|
352 | 352 | |
|
353 | 353 | $ hg -R packed tip -T "{node|short}\n" |
|
354 | 354 | aa35859c02ea |
|
355 | 355 | |
|
356 | 356 | $ cat >> $HGRCPATH <<EOF |
|
357 | 357 | > [extensions] |
|
358 | 358 | > showtip = ! |
|
359 | 359 | > EOF |
|
360 | 360 | |
|
361 | 361 | Does not work on non-empty repo |
|
362 | 362 | |
|
363 | 363 | $ hg -R packed debugapplystreamclonebundle packed.hg |
|
364 | 364 | abort: cannot apply stream clone bundle on non-empty repo |
|
365 | 365 | [255] |
|
366 | 366 | |
|
367 | 367 | Create partial clones |
|
368 | 368 | |
|
369 | 369 | $ rm -r empty |
|
370 | 370 | $ hg init empty |
|
371 | 371 | $ hg clone -r 3 test partial |
|
372 | 372 | adding changesets |
|
373 | 373 | adding manifests |
|
374 | 374 | adding file changes |
|
375 | 375 | added 4 changesets with 4 changes to 1 files |
|
376 | 376 | updating to branch default |
|
377 | 377 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
378 | 378 | $ hg clone partial partial2 |
|
379 | 379 | updating to branch default |
|
380 | 380 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
381 | 381 | $ cd partial |
|
382 | 382 | |
|
383 | 383 | Log -R full.hg in partial |
|
384 | 384 | |
|
385 | 385 | $ hg -R bundle://../full.hg log -T phases |
|
386 | 386 | changeset: 8:aa35859c02ea |
|
387 | 387 | tag: tip |
|
388 | 388 | phase: draft |
|
389 | 389 | parent: 3:eebf5a27f8ca |
|
390 | 390 | user: test |
|
391 | 391 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
392 | 392 | summary: 0.3m |
|
393 | 393 | |
|
394 | 394 | changeset: 7:a6a34bfa0076 |
|
395 | 395 | phase: draft |
|
396 | 396 | user: test |
|
397 | 397 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
398 | 398 | summary: 1.3m |
|
399 | 399 | |
|
400 | 400 | changeset: 6:7373c1169842 |
|
401 | 401 | phase: draft |
|
402 | 402 | user: test |
|
403 | 403 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
404 | 404 | summary: 1.3 |
|
405 | 405 | |
|
406 | 406 | changeset: 5:1bb50a9436a7 |
|
407 | 407 | phase: draft |
|
408 | 408 | user: test |
|
409 | 409 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
410 | 410 | summary: 1.2 |
|
411 | 411 | |
|
412 | 412 | changeset: 4:095197eb4973 |
|
413 | 413 | phase: draft |
|
414 | 414 | parent: 0:f9ee2f85a263 |
|
415 | 415 | user: test |
|
416 | 416 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
417 | 417 | summary: 1.1 |
|
418 | 418 | |
|
419 | 419 | changeset: 3:eebf5a27f8ca |
|
420 | 420 | phase: public |
|
421 | 421 | user: test |
|
422 | 422 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
423 | 423 | summary: 0.3 |
|
424 | 424 | |
|
425 | 425 | changeset: 2:e38ba6f5b7e0 |
|
426 | 426 | phase: public |
|
427 | 427 | user: test |
|
428 | 428 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
429 | 429 | summary: 0.2 |
|
430 | 430 | |
|
431 | 431 | changeset: 1:34c2bf6b0626 |
|
432 | 432 | phase: public |
|
433 | 433 | user: test |
|
434 | 434 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
435 | 435 | summary: 0.1 |
|
436 | 436 | |
|
437 | 437 | changeset: 0:f9ee2f85a263 |
|
438 | 438 | phase: public |
|
439 | 439 | user: test |
|
440 | 440 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
441 | 441 | summary: 0.0 |
|
442 | 442 | |
|
443 | 443 | |
|
444 | 444 | Incoming full.hg in partial |
|
445 | 445 | |
|
446 | 446 | $ hg incoming bundle://../full.hg |
|
447 | 447 | comparing with bundle:../full.hg |
|
448 | 448 | searching for changes |
|
449 | 449 | changeset: 4:095197eb4973 |
|
450 | 450 | parent: 0:f9ee2f85a263 |
|
451 | 451 | user: test |
|
452 | 452 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
453 | 453 | summary: 1.1 |
|
454 | 454 | |
|
455 | 455 | changeset: 5:1bb50a9436a7 |
|
456 | 456 | user: test |
|
457 | 457 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
458 | 458 | summary: 1.2 |
|
459 | 459 | |
|
460 | 460 | changeset: 6:7373c1169842 |
|
461 | 461 | user: test |
|
462 | 462 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
463 | 463 | summary: 1.3 |
|
464 | 464 | |
|
465 | 465 | changeset: 7:a6a34bfa0076 |
|
466 | 466 | user: test |
|
467 | 467 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
468 | 468 | summary: 1.3m |
|
469 | 469 | |
|
470 | 470 | changeset: 8:aa35859c02ea |
|
471 | 471 | tag: tip |
|
472 | 472 | parent: 3:eebf5a27f8ca |
|
473 | 473 | user: test |
|
474 | 474 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
475 | 475 | summary: 0.3m |
|
476 | 476 | |
|
477 | 477 | |
|
478 | 478 | Outgoing -R full.hg vs partial2 in partial |
|
479 | 479 | |
|
480 | 480 | $ hg -R bundle://../full.hg outgoing ../partial2 |
|
481 | 481 | comparing with ../partial2 |
|
482 | 482 | searching for changes |
|
483 | 483 | changeset: 4:095197eb4973 |
|
484 | 484 | parent: 0:f9ee2f85a263 |
|
485 | 485 | user: test |
|
486 | 486 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
487 | 487 | summary: 1.1 |
|
488 | 488 | |
|
489 | 489 | changeset: 5:1bb50a9436a7 |
|
490 | 490 | user: test |
|
491 | 491 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
492 | 492 | summary: 1.2 |
|
493 | 493 | |
|
494 | 494 | changeset: 6:7373c1169842 |
|
495 | 495 | user: test |
|
496 | 496 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
497 | 497 | summary: 1.3 |
|
498 | 498 | |
|
499 | 499 | changeset: 7:a6a34bfa0076 |
|
500 | 500 | user: test |
|
501 | 501 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
502 | 502 | summary: 1.3m |
|
503 | 503 | |
|
504 | 504 | changeset: 8:aa35859c02ea |
|
505 | 505 | tag: tip |
|
506 | 506 | parent: 3:eebf5a27f8ca |
|
507 | 507 | user: test |
|
508 | 508 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
509 | 509 | summary: 0.3m |
|
510 | 510 | |
|
511 | 511 | |
|
512 | 512 | Outgoing -R does-not-exist.hg vs partial2 in partial |
|
513 | 513 | |
|
514 | 514 | $ hg -R bundle://../does-not-exist.hg outgoing ../partial2 |
|
515 | 515 | abort: *../does-not-exist.hg* (glob) |
|
516 | 516 | [255] |
|
517 | 517 | $ cd .. |
|
518 | 518 | |
|
519 | 519 | hide outer repo |
|
520 | 520 | $ hg init |
|
521 | 521 | |
|
522 | 522 | Direct clone from bundle (all-history) |
|
523 | 523 | |
|
524 | 524 | $ hg clone full.hg full-clone |
|
525 | 525 | requesting all changes |
|
526 | 526 | adding changesets |
|
527 | 527 | adding manifests |
|
528 | 528 | adding file changes |
|
529 | 529 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
530 | 530 | updating to branch default |
|
531 | 531 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
532 | 532 | $ hg -R full-clone heads |
|
533 | 533 | changeset: 8:aa35859c02ea |
|
534 | 534 | tag: tip |
|
535 | 535 | parent: 3:eebf5a27f8ca |
|
536 | 536 | user: test |
|
537 | 537 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
538 | 538 | summary: 0.3m |
|
539 | 539 | |
|
540 | 540 | changeset: 7:a6a34bfa0076 |
|
541 | 541 | user: test |
|
542 | 542 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
543 | 543 | summary: 1.3m |
|
544 | 544 | |
|
545 | 545 | $ rm -r full-clone |
|
546 | 546 | |
|
547 | 547 | When cloning from a non-copiable repository into '', do not |
|
548 | 548 | recurse infinitely (issue2528) |
|
549 | 549 | |
|
550 | 550 | $ hg clone full.hg '' |
|
551 | 551 | abort: empty destination path is not valid |
|
552 | 552 | [255] |
|
553 | 553 | |
|
554 | 554 | test for https://bz.mercurial-scm.org/216 |
|
555 | 555 | |
|
556 | 556 | Unbundle incremental bundles into fresh empty in one go |
|
557 | 557 | |
|
558 | 558 | $ rm -r empty |
|
559 | 559 | $ hg init empty |
|
560 | 560 | $ hg -R test bundle --base null -r 0 ../0.hg |
|
561 | 561 | 1 changesets found |
|
562 | 562 | $ hg -R test bundle --base 0 -r 1 ../1.hg |
|
563 | 563 | 1 changesets found |
|
564 | 564 | $ hg -R empty unbundle -u ../0.hg ../1.hg |
|
565 | 565 | adding changesets |
|
566 | 566 | adding manifests |
|
567 | 567 | adding file changes |
|
568 | 568 | added 1 changesets with 1 changes to 1 files |
|
569 | 569 | adding changesets |
|
570 | 570 | adding manifests |
|
571 | 571 | adding file changes |
|
572 | 572 | added 1 changesets with 1 changes to 1 files |
|
573 | 573 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
574 | 574 | |
|
575 | 575 | View full contents of the bundle |
|
576 | 576 | $ hg -R test bundle --base null -r 3 ../partial.hg |
|
577 | 577 | 4 changesets found |
|
578 | 578 | $ cd test |
|
579 | 579 | $ hg -R ../../partial.hg log -r "bundle()" |
|
580 | 580 | changeset: 0:f9ee2f85a263 |
|
581 | 581 | user: test |
|
582 | 582 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
583 | 583 | summary: 0.0 |
|
584 | 584 | |
|
585 | 585 | changeset: 1:34c2bf6b0626 |
|
586 | 586 | user: test |
|
587 | 587 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
588 | 588 | summary: 0.1 |
|
589 | 589 | |
|
590 | 590 | changeset: 2:e38ba6f5b7e0 |
|
591 | 591 | user: test |
|
592 | 592 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
593 | 593 | summary: 0.2 |
|
594 | 594 | |
|
595 | 595 | changeset: 3:eebf5a27f8ca |
|
596 | 596 | user: test |
|
597 | 597 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
598 | 598 | summary: 0.3 |
|
599 | 599 | |
|
600 | 600 | $ cd .. |
|
601 | 601 | |
|
602 | 602 | test for 540d1059c802 |
|
603 | 603 | |
|
604 | 604 | test for 540d1059c802 |
|
605 | 605 | |
|
606 | 606 | $ hg init orig |
|
607 | 607 | $ cd orig |
|
608 | 608 | $ echo foo > foo |
|
609 | 609 | $ hg add foo |
|
610 | 610 | $ hg ci -m 'add foo' |
|
611 | 611 | |
|
612 | 612 | $ hg clone . ../copy |
|
613 | 613 | updating to branch default |
|
614 | 614 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
615 | 615 | $ hg tag foo |
|
616 | 616 | |
|
617 | 617 | $ cd ../copy |
|
618 | 618 | $ echo >> foo |
|
619 | 619 | $ hg ci -m 'change foo' |
|
620 | 620 | $ hg bundle ../bundle.hg ../orig |
|
621 | 621 | searching for changes |
|
622 | 622 | 1 changesets found |
|
623 | 623 | |
|
624 | 624 | $ cd ../orig |
|
625 | 625 | $ hg incoming ../bundle.hg |
|
626 | 626 | comparing with ../bundle.hg |
|
627 | 627 | searching for changes |
|
628 | 628 | changeset: 2:ed1b79f46b9a |
|
629 | 629 | tag: tip |
|
630 | 630 | parent: 0:bbd179dfa0a7 |
|
631 | 631 | user: test |
|
632 | 632 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
633 | 633 | summary: change foo |
|
634 | 634 | |
|
635 | 635 | $ cd .. |
|
636 | 636 | |
|
637 | 637 | test bundle with # in the filename (issue2154): |
|
638 | 638 | |
|
639 | 639 | $ cp bundle.hg 'test#bundle.hg' |
|
640 | 640 | $ cd orig |
|
641 | 641 | $ hg incoming '../test#bundle.hg' |
|
642 | 642 | comparing with ../test |
|
643 | 643 | abort: unknown revision 'bundle.hg'! |
|
644 | 644 | [255] |
|
645 | 645 | |
|
646 | 646 | note that percent encoding is not handled: |
|
647 | 647 | |
|
648 | 648 | $ hg incoming ../test%23bundle.hg |
|
649 | 649 | abort: repository ../test%23bundle.hg not found! |
|
650 | 650 | [255] |
|
651 | 651 | $ cd .. |
|
652 | 652 | |
|
653 | 653 | test to bundle revisions on the newly created branch (issue3828): |
|
654 | 654 | |
|
655 | 655 | $ hg -q clone -U test test-clone |
|
656 | 656 | $ cd test |
|
657 | 657 | |
|
658 | 658 | $ hg -q branch foo |
|
659 | 659 | $ hg commit -m "create foo branch" |
|
660 | 660 | $ hg -q outgoing ../test-clone |
|
661 | 661 | 9:b4f5acb1ee27 |
|
662 | 662 | $ hg -q bundle --branch foo foo.hg ../test-clone |
|
663 | 663 | $ hg -R foo.hg -q log -r "bundle()" |
|
664 | 664 | 9:b4f5acb1ee27 |
|
665 | 665 | |
|
666 | 666 | $ cd .. |
|
667 | 667 | |
|
668 | 668 | test for https://bz.mercurial-scm.org/1144 |
|
669 | 669 | |
|
670 | 670 | test that verify bundle does not traceback |
|
671 | 671 | |
|
672 | 672 | partial history bundle, fails w/ unknown parent |
|
673 | 673 | |
|
674 | 674 | $ hg -R bundle.hg verify |
|
675 | 675 | abort: 00changelog.i@bbd179dfa0a7: unknown parent! |
|
676 | 676 | [255] |
|
677 | 677 | |
|
678 | 678 | full history bundle, refuses to verify non-local repo |
|
679 | 679 | |
|
680 | 680 | $ hg -R all.hg verify |
|
681 | 681 | abort: cannot verify bundle or remote repos |
|
682 | 682 | [255] |
|
683 | 683 | |
|
684 | 684 | but, regular verify must continue to work |
|
685 | 685 | |
|
686 | 686 | $ hg -R orig verify |
|
687 | 687 | checking changesets |
|
688 | 688 | checking manifests |
|
689 | 689 | crosschecking files in changesets and manifests |
|
690 | 690 | checking files |
|
691 | 691 | 2 files, 2 changesets, 2 total revisions |
|
692 | 692 | |
|
693 | 693 | diff against bundle |
|
694 | 694 | |
|
695 | 695 | $ hg init b |
|
696 | 696 | $ cd b |
|
697 | 697 | $ hg -R ../all.hg diff -r tip |
|
698 | 698 | diff -r aa35859c02ea anotherfile |
|
699 | 699 | --- a/anotherfile Thu Jan 01 00:00:00 1970 +0000 |
|
700 | 700 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
701 | 701 | @@ -1,4 +0,0 @@ |
|
702 | 702 | -0 |
|
703 | 703 | -1 |
|
704 | 704 | -2 |
|
705 | 705 | -3 |
|
706 | 706 | $ cd .. |
|
707 | 707 | |
|
708 | 708 | bundle single branch |
|
709 | 709 | |
|
710 | 710 | $ hg init branchy |
|
711 | 711 | $ cd branchy |
|
712 | 712 | $ echo a >a |
|
713 | 713 | $ echo x >x |
|
714 | 714 | $ hg ci -Ama |
|
715 | 715 | adding a |
|
716 | 716 | adding x |
|
717 | 717 | $ echo c >c |
|
718 | 718 | $ echo xx >x |
|
719 | 719 | $ hg ci -Amc |
|
720 | 720 | adding c |
|
721 | 721 | $ echo c1 >c1 |
|
722 | 722 | $ hg ci -Amc1 |
|
723 | 723 | adding c1 |
|
724 | 724 | $ hg up 0 |
|
725 | 725 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
726 | 726 | $ echo b >b |
|
727 | 727 | $ hg ci -Amb |
|
728 | 728 | adding b |
|
729 | 729 | created new head |
|
730 | 730 | $ echo b1 >b1 |
|
731 | 731 | $ echo xx >x |
|
732 | 732 | $ hg ci -Amb1 |
|
733 | 733 | adding b1 |
|
734 | 734 | $ hg clone -q -r2 . part |
|
735 | 735 | |
|
736 | 736 | == bundling via incoming |
|
737 | 737 | |
|
738 | 738 | $ hg in -R part --bundle incoming.hg --template "{node}\n" . |
|
739 | 739 | comparing with . |
|
740 | 740 | searching for changes |
|
741 | 741 | 1a38c1b849e8b70c756d2d80b0b9a3ac0b7ea11a |
|
742 | 742 | 057f4db07f61970e1c11e83be79e9d08adc4dc31 |
|
743 | 743 | |
|
744 | 744 | == bundling |
|
745 | 745 | |
|
746 | 746 | $ hg bundle bundle.hg part --debug --config progress.debug=true |
|
747 | 747 | query 1; heads |
|
748 | 748 | searching for changes |
|
749 | 749 | all remote heads known locally |
|
750 | 750 | 2 changesets found |
|
751 | 751 | list of changesets: |
|
752 | 752 | 1a38c1b849e8b70c756d2d80b0b9a3ac0b7ea11a |
|
753 | 753 | 057f4db07f61970e1c11e83be79e9d08adc4dc31 |
|
754 | 754 | bundle2-output-bundle: "HG20", (1 params) 1 parts total |
|
755 | 755 | bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload |
|
756 | 756 | bundling: 1/2 changesets (50.00%) |
|
757 | 757 | bundling: 2/2 changesets (100.00%) |
|
758 | 758 | bundling: 1/2 manifests (50.00%) |
|
759 | 759 | bundling: 2/2 manifests (100.00%) |
|
760 | 760 | bundling: b 1/3 files (33.33%) |
|
761 | 761 | bundling: b1 2/3 files (66.67%) |
|
762 | 762 | bundling: x 3/3 files (100.00%) |
|
763 | 763 | |
|
764 | 764 | == Test for issue3441 |
|
765 | 765 | |
|
766 | 766 | $ hg clone -q -r0 . part2 |
|
767 | 767 | $ hg -q -R part2 pull bundle.hg |
|
768 | 768 | $ hg -R part2 verify |
|
769 | 769 | checking changesets |
|
770 | 770 | checking manifests |
|
771 | 771 | crosschecking files in changesets and manifests |
|
772 | 772 | checking files |
|
773 | 773 | 4 files, 3 changesets, 5 total revisions |
|
774 | 774 | |
|
775 | 775 | == Test bundling no commits |
|
776 | 776 | |
|
777 | 777 | $ hg bundle -r 'public()' no-output.hg |
|
778 | 778 | abort: no commits to bundle |
|
779 | 779 | [255] |
|
780 | 780 | |
|
781 | 781 | $ cd .. |
|
782 | 782 | |
|
783 | 783 | When user merges to the revision existing only in the bundle, |
|
784 | 784 | it should show warning that second parent of the working |
|
785 | 785 | directory does not exist |
|
786 | 786 | |
|
787 | 787 | $ hg init update2bundled |
|
788 | 788 | $ cd update2bundled |
|
789 | 789 | $ cat <<EOF >> .hg/hgrc |
|
790 | 790 | > [extensions] |
|
791 | 791 | > strip = |
|
792 | 792 | > EOF |
|
793 | 793 | $ echo "aaa" >> a |
|
794 | 794 | $ hg commit -A -m 0 |
|
795 | 795 | adding a |
|
796 | 796 | $ echo "bbb" >> b |
|
797 | 797 | $ hg commit -A -m 1 |
|
798 | 798 | adding b |
|
799 | 799 | $ echo "ccc" >> c |
|
800 | 800 | $ hg commit -A -m 2 |
|
801 | 801 | adding c |
|
802 | 802 | $ hg update -r 1 |
|
803 | 803 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
804 | 804 | $ echo "ddd" >> d |
|
805 | 805 | $ hg commit -A -m 3 |
|
806 | 806 | adding d |
|
807 | 807 | created new head |
|
808 | 808 | $ hg update -r 2 |
|
809 | 809 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
810 | 810 | $ hg log -G |
|
811 | 811 | o changeset: 3:8bd3e1f196af |
|
812 | 812 | | tag: tip |
|
813 | 813 | | parent: 1:a01eca7af26d |
|
814 | 814 | | user: test |
|
815 | 815 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
816 | 816 | | summary: 3 |
|
817 | 817 | | |
|
818 | 818 | | @ changeset: 2:4652c276ac4f |
|
819 | 819 | |/ user: test |
|
820 | 820 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
821 | 821 | | summary: 2 |
|
822 | 822 | | |
|
823 | 823 | o changeset: 1:a01eca7af26d |
|
824 | 824 | | user: test |
|
825 | 825 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
826 | 826 | | summary: 1 |
|
827 | 827 | | |
|
828 | 828 | o changeset: 0:4fe08cd4693e |
|
829 | 829 | user: test |
|
830 | 830 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
831 | 831 | summary: 0 |
|
832 | 832 | |
|
833 | 833 | $ hg bundle --base 1 -r 3 ../update2bundled.hg |
|
834 | 834 | 1 changesets found |
|
835 | 835 | $ hg strip -r 3 |
|
836 | 836 | saved backup bundle to $TESTTMP/update2bundled/.hg/strip-backup/8bd3e1f196af-017e56d8-backup.hg (glob) |
|
837 | 837 | $ hg merge -R ../update2bundled.hg -r 3 |
|
838 | 838 | setting parent to node 8bd3e1f196af289b2b121be08031e76d7ae92098 that only exists in the bundle |
|
839 | 839 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
840 | 840 | (branch merge, don't forget to commit) |
|
841 | 841 | |
|
842 | 842 | When user updates to the revision existing only in the bundle, |
|
843 | 843 | it should show warning |
|
844 | 844 | |
|
845 | 845 | $ hg update -R ../update2bundled.hg --clean -r 3 |
|
846 | 846 | setting parent to node 8bd3e1f196af289b2b121be08031e76d7ae92098 that only exists in the bundle |
|
847 | 847 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
848 | 848 | |
|
849 | 849 | When user updates to the revision existing in the local repository |
|
850 | 850 | the warning shouldn't be emitted |
|
851 | 851 | |
|
852 | 852 | $ hg update -R ../update2bundled.hg -r 0 |
|
853 | 853 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
General Comments 0
You need to be logged in to leave comments.
Login now