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