Show More
@@ -1,632 +1,632 b'' | |||
|
1 | 1 | $ cat >> $HGRCPATH <<EOF |
|
2 | 2 | > [extensions] |
|
3 | 3 | > graphlog= |
|
4 | 4 | > rebase= |
|
5 | 5 | > |
|
6 | 6 | > [phases] |
|
7 | 7 | > publish=False |
|
8 | 8 | > |
|
9 | 9 | > [alias] |
|
10 | 10 | > tglog = log -G --template "{rev}: '{desc}' {branches}\n" |
|
11 | 11 | > tglogp = log -G --template "{rev}:{phase} '{desc}' {branches}\n" |
|
12 | 12 | > EOF |
|
13 | 13 | |
|
14 | 14 | Create repo a: |
|
15 | 15 | |
|
16 | 16 | $ hg init a |
|
17 | 17 | $ cd a |
|
18 | 18 | $ hg unbundle "$TESTDIR/bundles/rebase.hg" |
|
19 | 19 | adding changesets |
|
20 | 20 | adding manifests |
|
21 | 21 | adding file changes |
|
22 | 22 | added 8 changesets with 7 changes to 7 files (+2 heads) |
|
23 | 23 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
24 | 24 | $ hg up tip |
|
25 | 25 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
26 | 26 | |
|
27 | 27 | $ hg tglog |
|
28 | 28 | @ 7: 'H' |
|
29 | 29 | | |
|
30 | 30 | | o 6: 'G' |
|
31 | 31 | |/| |
|
32 | 32 | o | 5: 'F' |
|
33 | 33 | | | |
|
34 | 34 | | o 4: 'E' |
|
35 | 35 | |/ |
|
36 | 36 | | o 3: 'D' |
|
37 | 37 | | | |
|
38 | 38 | | o 2: 'C' |
|
39 | 39 | | | |
|
40 | 40 | | o 1: 'B' |
|
41 | 41 | |/ |
|
42 | 42 | o 0: 'A' |
|
43 | 43 | |
|
44 | 44 | $ cd .. |
|
45 | 45 | |
|
46 | 46 | |
|
47 | 47 | Rebasing B onto H and collapsing changesets with different phases: |
|
48 | 48 | |
|
49 | 49 | |
|
50 | 50 | $ hg clone -q -u 3 a a1 |
|
51 | 51 | $ cd a1 |
|
52 | 52 | |
|
53 | 53 | $ hg phase --force --secret 3 |
|
54 | 54 | |
|
55 | 55 | $ hg rebase --collapse --keepbranches |
|
56 | 56 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob) |
|
57 | 57 | |
|
58 | 58 | $ hg tglogp |
|
59 | 59 | @ 5:secret 'Collapsed revision |
|
60 | 60 | | * B |
|
61 | 61 | | * C |
|
62 | 62 | | * D' |
|
63 | 63 | o 4:draft 'H' |
|
64 | 64 | | |
|
65 | 65 | | o 3:draft 'G' |
|
66 | 66 | |/| |
|
67 | 67 | o | 2:draft 'F' |
|
68 | 68 | | | |
|
69 | 69 | | o 1:draft 'E' |
|
70 | 70 | |/ |
|
71 | 71 | o 0:draft 'A' |
|
72 | 72 | |
|
73 | 73 | $ hg manifest |
|
74 | 74 | A |
|
75 | 75 | B |
|
76 | 76 | C |
|
77 | 77 | D |
|
78 | 78 | F |
|
79 | 79 | H |
|
80 | 80 | |
|
81 | 81 | $ cd .. |
|
82 | 82 | |
|
83 | 83 | |
|
84 | 84 | Rebasing E onto H: |
|
85 | 85 | |
|
86 | 86 | $ hg clone -q -u . a a2 |
|
87 | 87 | $ cd a2 |
|
88 | 88 | |
|
89 | 89 | $ hg phase --force --secret 6 |
|
90 | 90 | $ hg rebase --source 4 --collapse |
|
91 | 91 | saved backup bundle to $TESTTMP/a2/.hg/strip-backup/*-backup.hg (glob) |
|
92 | 92 | |
|
93 | 93 | $ hg tglog |
|
94 | 94 | @ 6: 'Collapsed revision |
|
95 | 95 | | * E |
|
96 | 96 | | * G' |
|
97 | 97 | o 5: 'H' |
|
98 | 98 | | |
|
99 | 99 | o 4: 'F' |
|
100 | 100 | | |
|
101 | 101 | | o 3: 'D' |
|
102 | 102 | | | |
|
103 | 103 | | o 2: 'C' |
|
104 | 104 | | | |
|
105 | 105 | | o 1: 'B' |
|
106 | 106 | |/ |
|
107 | 107 | o 0: 'A' |
|
108 | 108 | |
|
109 | 109 | $ hg manifest |
|
110 | 110 | A |
|
111 | 111 | E |
|
112 | 112 | F |
|
113 | 113 | H |
|
114 | 114 | |
|
115 | 115 | $ cd .. |
|
116 | 116 | |
|
117 | 117 | Rebasing G onto H with custom message: |
|
118 | 118 | |
|
119 | 119 | $ hg clone -q -u . a a3 |
|
120 | 120 | $ cd a3 |
|
121 | 121 | |
|
122 | 122 | $ hg rebase --base 6 -m 'custom message' |
|
123 | 123 | abort: message can only be specified with collapse |
|
124 | 124 | [255] |
|
125 | 125 | |
|
126 | 126 | $ hg rebase --source 4 --collapse -m 'custom message' |
|
127 | 127 | saved backup bundle to $TESTTMP/a3/.hg/strip-backup/*-backup.hg (glob) |
|
128 | 128 | |
|
129 | 129 | $ hg tglog |
|
130 | 130 | @ 6: 'custom message' |
|
131 | 131 | | |
|
132 | 132 | o 5: 'H' |
|
133 | 133 | | |
|
134 | 134 | o 4: 'F' |
|
135 | 135 | | |
|
136 | 136 | | o 3: 'D' |
|
137 | 137 | | | |
|
138 | 138 | | o 2: 'C' |
|
139 | 139 | | | |
|
140 | 140 | | o 1: 'B' |
|
141 | 141 | |/ |
|
142 | 142 | o 0: 'A' |
|
143 | 143 | |
|
144 | 144 | $ hg manifest |
|
145 | 145 | A |
|
146 | 146 | E |
|
147 | 147 | F |
|
148 | 148 | H |
|
149 | 149 | |
|
150 | 150 | $ cd .. |
|
151 | 151 | |
|
152 | 152 | Create repo b: |
|
153 | 153 | |
|
154 | 154 | $ hg init b |
|
155 | 155 | $ cd b |
|
156 | 156 | |
|
157 | 157 | $ echo A > A |
|
158 | 158 | $ hg ci -Am A |
|
159 | 159 | adding A |
|
160 | 160 | $ echo B > B |
|
161 | 161 | $ hg ci -Am B |
|
162 | 162 | adding B |
|
163 | 163 | |
|
164 | 164 | $ hg up -q 0 |
|
165 | 165 | |
|
166 | 166 | $ echo C > C |
|
167 | 167 | $ hg ci -Am C |
|
168 | 168 | adding C |
|
169 | 169 | created new head |
|
170 | 170 | |
|
171 | 171 | $ hg merge |
|
172 | 172 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
173 | 173 | (branch merge, don't forget to commit) |
|
174 | 174 | |
|
175 | 175 | $ echo D > D |
|
176 | 176 | $ hg ci -Am D |
|
177 | 177 | adding D |
|
178 | 178 | |
|
179 | 179 | $ hg up -q 1 |
|
180 | 180 | |
|
181 | 181 | $ echo E > E |
|
182 | 182 | $ hg ci -Am E |
|
183 | 183 | adding E |
|
184 | 184 | created new head |
|
185 | 185 | |
|
186 | 186 | $ echo F > F |
|
187 | 187 | $ hg ci -Am F |
|
188 | 188 | adding F |
|
189 | 189 | |
|
190 | 190 | $ hg merge |
|
191 | 191 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
192 | 192 | (branch merge, don't forget to commit) |
|
193 | 193 | $ hg ci -m G |
|
194 | 194 | |
|
195 | 195 | $ hg up -q 0 |
|
196 | 196 | |
|
197 | 197 | $ echo H > H |
|
198 | 198 | $ hg ci -Am H |
|
199 | 199 | adding H |
|
200 | 200 | created new head |
|
201 | 201 | |
|
202 | 202 | $ hg tglog |
|
203 | 203 | @ 7: 'H' |
|
204 | 204 | | |
|
205 | 205 | | o 6: 'G' |
|
206 | 206 | | |\ |
|
207 | 207 | | | o 5: 'F' |
|
208 | 208 | | | | |
|
209 | 209 | | | o 4: 'E' |
|
210 | 210 | | | | |
|
211 | 211 | | o | 3: 'D' |
|
212 | 212 | | |\| |
|
213 | 213 | | o | 2: 'C' |
|
214 | 214 | |/ / |
|
215 | 215 | | o 1: 'B' |
|
216 | 216 | |/ |
|
217 | 217 | o 0: 'A' |
|
218 | 218 | |
|
219 | 219 | $ cd .. |
|
220 | 220 | |
|
221 | 221 | |
|
222 | 222 | Rebase and collapse - more than one external (fail): |
|
223 | 223 | |
|
224 | 224 | $ hg clone -q -u . b b1 |
|
225 | 225 | $ cd b1 |
|
226 | 226 | |
|
227 | 227 | $ hg rebase -s 2 --collapse |
|
228 | 228 | abort: unable to collapse, there is more than one external parent |
|
229 | 229 | [255] |
|
230 | 230 | |
|
231 | 231 | Rebase and collapse - E onto H: |
|
232 | 232 | |
|
233 | 233 | $ hg rebase -s 4 --collapse |
|
234 | 234 | saved backup bundle to $TESTTMP/b1/.hg/strip-backup/*-backup.hg (glob) |
|
235 | 235 | |
|
236 | 236 | $ hg tglog |
|
237 | 237 | @ 5: 'Collapsed revision |
|
238 | 238 | |\ * E |
|
239 | 239 | | | * F |
|
240 | 240 | | | * G' |
|
241 | 241 | | o 4: 'H' |
|
242 | 242 | | | |
|
243 | 243 | o | 3: 'D' |
|
244 | 244 | |\ \ |
|
245 | 245 | | o | 2: 'C' |
|
246 | 246 | | |/ |
|
247 | 247 | o / 1: 'B' |
|
248 | 248 | |/ |
|
249 | 249 | o 0: 'A' |
|
250 | 250 | |
|
251 | 251 | $ hg manifest |
|
252 | 252 | A |
|
253 | 253 | B |
|
254 | 254 | C |
|
255 | 255 | D |
|
256 | 256 | E |
|
257 | 257 | F |
|
258 | 258 | H |
|
259 | 259 | |
|
260 | 260 | $ cd .. |
|
261 | 261 | |
|
262 | 262 | |
|
263 | 263 | Create repo c: |
|
264 | 264 | |
|
265 | 265 | $ hg init c |
|
266 | 266 | $ cd c |
|
267 | 267 | |
|
268 | 268 | $ echo A > A |
|
269 | 269 | $ hg ci -Am A |
|
270 | 270 | adding A |
|
271 | 271 | $ echo B > B |
|
272 | 272 | $ hg ci -Am B |
|
273 | 273 | adding B |
|
274 | 274 | |
|
275 | 275 | $ hg up -q 0 |
|
276 | 276 | |
|
277 | 277 | $ echo C > C |
|
278 | 278 | $ hg ci -Am C |
|
279 | 279 | adding C |
|
280 | 280 | created new head |
|
281 | 281 | |
|
282 | 282 | $ hg merge |
|
283 | 283 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
284 | 284 | (branch merge, don't forget to commit) |
|
285 | 285 | |
|
286 | 286 | $ echo D > D |
|
287 | 287 | $ hg ci -Am D |
|
288 | 288 | adding D |
|
289 | 289 | |
|
290 | 290 | $ hg up -q 1 |
|
291 | 291 | |
|
292 | 292 | $ echo E > E |
|
293 | 293 | $ hg ci -Am E |
|
294 | 294 | adding E |
|
295 | 295 | created new head |
|
296 | 296 | $ echo F > E |
|
297 | 297 | $ hg ci -m 'F' |
|
298 | 298 | |
|
299 | 299 | $ echo G > G |
|
300 | 300 | $ hg ci -Am G |
|
301 | 301 | adding G |
|
302 | 302 | |
|
303 | 303 | $ hg merge |
|
304 | 304 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
305 | 305 | (branch merge, don't forget to commit) |
|
306 | 306 | |
|
307 | 307 | $ hg ci -m H |
|
308 | 308 | |
|
309 | 309 | $ hg up -q 0 |
|
310 | 310 | |
|
311 | 311 | $ echo I > I |
|
312 | 312 | $ hg ci -Am I |
|
313 | 313 | adding I |
|
314 | 314 | created new head |
|
315 | 315 | |
|
316 | 316 | $ hg tglog |
|
317 | 317 | @ 8: 'I' |
|
318 | 318 | | |
|
319 | 319 | | o 7: 'H' |
|
320 | 320 | | |\ |
|
321 | 321 | | | o 6: 'G' |
|
322 | 322 | | | | |
|
323 | 323 | | | o 5: 'F' |
|
324 | 324 | | | | |
|
325 | 325 | | | o 4: 'E' |
|
326 | 326 | | | | |
|
327 | 327 | | o | 3: 'D' |
|
328 | 328 | | |\| |
|
329 | 329 | | o | 2: 'C' |
|
330 | 330 | |/ / |
|
331 | 331 | | o 1: 'B' |
|
332 | 332 | |/ |
|
333 | 333 | o 0: 'A' |
|
334 | 334 | |
|
335 | 335 | $ cd .. |
|
336 | 336 | |
|
337 | 337 | |
|
338 | 338 | Rebase and collapse - E onto I: |
|
339 | 339 | |
|
340 | 340 | $ hg clone -q -u . c c1 |
|
341 | 341 | $ cd c1 |
|
342 | 342 | |
|
343 | 343 | $ hg rebase -s 4 --collapse |
|
344 | 344 | merging E |
|
345 | 345 | saved backup bundle to $TESTTMP/c1/.hg/strip-backup/*-backup.hg (glob) |
|
346 | 346 | |
|
347 | 347 | $ hg tglog |
|
348 | 348 | @ 5: 'Collapsed revision |
|
349 | 349 | |\ * E |
|
350 | 350 | | | * F |
|
351 | 351 | | | * G |
|
352 | 352 | | | * H' |
|
353 | 353 | | o 4: 'I' |
|
354 | 354 | | | |
|
355 | 355 | o | 3: 'D' |
|
356 | 356 | |\ \ |
|
357 | 357 | | o | 2: 'C' |
|
358 | 358 | | |/ |
|
359 | 359 | o / 1: 'B' |
|
360 | 360 | |/ |
|
361 | 361 | o 0: 'A' |
|
362 | 362 | |
|
363 | 363 | $ hg manifest |
|
364 | 364 | A |
|
365 | 365 | B |
|
366 | 366 | C |
|
367 | 367 | D |
|
368 | 368 | E |
|
369 | 369 | G |
|
370 | 370 | I |
|
371 | 371 | |
|
372 | 372 | $ cat E |
|
373 | 373 | F |
|
374 | 374 | |
|
375 | 375 | $ cd .. |
|
376 | 376 | |
|
377 | 377 | |
|
378 | 378 | Create repo d: |
|
379 | 379 | |
|
380 | 380 | $ hg init d |
|
381 | 381 | $ cd d |
|
382 | 382 | |
|
383 | 383 | $ echo A > A |
|
384 | 384 | $ hg ci -Am A |
|
385 | 385 | adding A |
|
386 | 386 | $ echo B > B |
|
387 | 387 | $ hg ci -Am B |
|
388 | 388 | adding B |
|
389 | 389 | $ echo C > C |
|
390 | 390 | $ hg ci -Am C |
|
391 | 391 | adding C |
|
392 | 392 | |
|
393 | 393 | $ hg up -q 1 |
|
394 | 394 | |
|
395 | 395 | $ echo D > D |
|
396 | 396 | $ hg ci -Am D |
|
397 | 397 | adding D |
|
398 | 398 | created new head |
|
399 | 399 | $ hg merge |
|
400 | 400 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
401 | 401 | (branch merge, don't forget to commit) |
|
402 | 402 | |
|
403 | 403 | $ hg ci -m E |
|
404 | 404 | |
|
405 | 405 | $ hg up -q 0 |
|
406 | 406 | |
|
407 | 407 | $ echo F > F |
|
408 | 408 | $ hg ci -Am F |
|
409 | 409 | adding F |
|
410 | 410 | created new head |
|
411 | 411 | |
|
412 | 412 | $ hg tglog |
|
413 | 413 | @ 5: 'F' |
|
414 | 414 | | |
|
415 | 415 | | o 4: 'E' |
|
416 | 416 | | |\ |
|
417 | 417 | | | o 3: 'D' |
|
418 | 418 | | | | |
|
419 | 419 | | o | 2: 'C' |
|
420 | 420 | | |/ |
|
421 | 421 | | o 1: 'B' |
|
422 | 422 | |/ |
|
423 | 423 | o 0: 'A' |
|
424 | 424 | |
|
425 | 425 | $ cd .. |
|
426 | 426 | |
|
427 | 427 | |
|
428 | 428 | Rebase and collapse - B onto F: |
|
429 | 429 | |
|
430 | 430 | $ hg clone -q -u . d d1 |
|
431 | 431 | $ cd d1 |
|
432 | 432 | |
|
433 | 433 | $ hg rebase -s 1 --collapse |
|
434 | 434 | saved backup bundle to $TESTTMP/d1/.hg/strip-backup/*-backup.hg (glob) |
|
435 | 435 | |
|
436 | 436 | $ hg tglog |
|
437 | 437 | @ 2: 'Collapsed revision |
|
438 | 438 | | * B |
|
439 | 439 | | * C |
|
440 | 440 | | * D |
|
441 | 441 | | * E' |
|
442 | 442 | o 1: 'F' |
|
443 | 443 | | |
|
444 | 444 | o 0: 'A' |
|
445 | 445 | |
|
446 | 446 | $ hg manifest |
|
447 | 447 | A |
|
448 | 448 | B |
|
449 | 449 | C |
|
450 | 450 | D |
|
451 | 451 | F |
|
452 | 452 | |
|
453 | 453 | Interactions between collapse and keepbranches |
|
454 | 454 | $ cd .. |
|
455 | 455 | $ hg init e |
|
456 | 456 | $ cd e |
|
457 | 457 | $ echo 'a' > a |
|
458 | 458 | $ hg ci -Am 'A' |
|
459 | 459 | adding a |
|
460 | 460 | |
|
461 | 461 | $ hg branch '1' |
|
462 | 462 | marked working directory as branch 1 |
|
463 | 463 | (branches are permanent and global, did you want a bookmark?) |
|
464 | 464 | $ echo 'b' > b |
|
465 | 465 | $ hg ci -Am 'B' |
|
466 | 466 | adding b |
|
467 | 467 | |
|
468 | 468 | $ hg branch '2' |
|
469 | 469 | marked working directory as branch 2 |
|
470 | 470 | (branches are permanent and global, did you want a bookmark?) |
|
471 | 471 | $ echo 'c' > c |
|
472 | 472 | $ hg ci -Am 'C' |
|
473 | 473 | adding c |
|
474 | 474 | |
|
475 | 475 | $ hg up -q 0 |
|
476 | 476 | $ echo 'd' > d |
|
477 | 477 | $ hg ci -Am 'D' |
|
478 | 478 | adding d |
|
479 | 479 | |
|
480 | 480 | $ hg tglog |
|
481 | 481 | @ 3: 'D' |
|
482 | 482 | | |
|
483 | 483 | | o 2: 'C' 2 |
|
484 | 484 | | | |
|
485 | 485 | | o 1: 'B' 1 |
|
486 | 486 | |/ |
|
487 | 487 | o 0: 'A' |
|
488 | 488 | |
|
489 | 489 | $ hg rebase --keepbranches --collapse -s 1 -d 3 |
|
490 | 490 | abort: cannot collapse multiple named branches |
|
491 | 491 | [255] |
|
492 | 492 | |
|
493 | 493 | $ repeatchange() { |
|
494 | 494 | > hg checkout $1 |
|
495 | 495 | > hg cp d z |
|
496 | 496 | > echo blah >> z |
|
497 | 497 | > hg commit -Am "$2" --user "$3" |
|
498 | 498 | > } |
|
499 | 499 | $ repeatchange 3 "E" "user1" |
|
500 | 500 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
501 | 501 | $ repeatchange 3 "E" "user2" |
|
502 | 502 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
503 | 503 | created new head |
|
504 | 504 | $ hg tglog |
|
505 | 505 | @ 5: 'E' |
|
506 | 506 | | |
|
507 | 507 | | o 4: 'E' |
|
508 | 508 | |/ |
|
509 | 509 | o 3: 'D' |
|
510 | 510 | | |
|
511 | 511 | | o 2: 'C' 2 |
|
512 | 512 | | | |
|
513 | 513 | | o 1: 'B' 1 |
|
514 | 514 | |/ |
|
515 | 515 | o 0: 'A' |
|
516 | 516 | |
|
517 | 517 | $ hg rebase -s 5 -d 4 |
|
518 | 518 | saved backup bundle to $TESTTMP/e/.hg/strip-backup/*-backup.hg (glob) |
|
519 | 519 | $ hg tglog |
|
520 | 520 | @ 4: 'E' |
|
521 | 521 | | |
|
522 | 522 | o 3: 'D' |
|
523 | 523 | | |
|
524 | 524 | | o 2: 'C' 2 |
|
525 | 525 | | | |
|
526 | 526 | | o 1: 'B' 1 |
|
527 | 527 | |/ |
|
528 | 528 | o 0: 'A' |
|
529 | 529 | |
|
530 | 530 | $ hg export tip |
|
531 | 531 | # HG changeset patch |
|
532 | 532 | # User user1 |
|
533 | 533 | # Date 0 0 |
|
534 | 534 | # Node ID f338eb3c2c7cc5b5915676a2376ba7ac558c5213 |
|
535 | 535 | # Parent 41acb9dca9eb976e84cd21fcb756b4afa5a35c09 |
|
536 | 536 | E |
|
537 | 537 | |
|
538 | 538 | diff -r 41acb9dca9eb -r f338eb3c2c7c z |
|
539 | 539 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
540 | 540 | +++ b/z Thu Jan 01 00:00:00 1970 +0000 |
|
541 | 541 | @@ -0,0 +1,2 @@ |
|
542 | 542 | +d |
|
543 | 543 | +blah |
|
544 | 544 | |
|
545 | 545 | $ cd .. |
|
546 | 546 | |
|
547 | 547 | Rebase, collapse and copies |
|
548 | 548 | |
|
549 | 549 | $ hg init copies |
|
550 | 550 | $ cd copies |
|
551 | 551 | $ hg unbundle "$TESTDIR/bundles/renames.hg" |
|
552 | 552 | adding changesets |
|
553 | 553 | adding manifests |
|
554 | 554 | adding file changes |
|
555 | 555 | added 4 changesets with 11 changes to 7 files (+1 heads) |
|
556 | 556 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
557 | 557 | $ hg up -q tip |
|
558 | 558 | $ hg tglog |
|
559 | 559 | @ 3: 'move2' |
|
560 | 560 | | |
|
561 | 561 | o 2: 'move1' |
|
562 | 562 | | |
|
563 | 563 | | o 1: 'change' |
|
564 | 564 | |/ |
|
565 | 565 | o 0: 'add' |
|
566 | 566 | |
|
567 | 567 | $ hg rebase --collapse -d 1 |
|
568 | 568 | merging a and d to d |
|
569 | 569 | merging b and e to e |
|
570 | 570 | merging c and f to f |
|
571 | 571 | merging e and g to g |
|
572 | 572 | merging f and c to c |
|
573 | 573 | saved backup bundle to $TESTTMP/copies/.hg/strip-backup/*-backup.hg (glob) |
|
574 | 574 | $ hg st |
|
575 | 575 | $ hg st --copies --change . |
|
576 | 576 | A d |
|
577 | 577 | a |
|
578 | 578 | A g |
|
579 | 579 | b |
|
580 | 580 | R b |
|
581 | 581 | $ cat c |
|
582 | 582 | c |
|
583 | 583 | c |
|
584 | 584 | $ cat d |
|
585 | 585 | a |
|
586 | 586 | a |
|
587 | 587 | $ cat g |
|
588 | 588 | b |
|
589 | 589 | b |
|
590 | 590 | $ hg log -r . --template "{file_copies}\n" |
|
591 | 591 | d (a)g (b) |
|
592 | 592 | |
|
593 | 593 | Test collapsing a middle revision in-place |
|
594 | 594 | |
|
595 | 595 | $ hg tglog |
|
596 | 596 | @ 2: 'Collapsed revision |
|
597 | 597 | | * move1 |
|
598 | 598 | | * move2' |
|
599 | 599 | o 1: 'change' |
|
600 | 600 | | |
|
601 | 601 | o 0: 'add' |
|
602 | 602 | |
|
603 | 603 | $ hg rebase --collapse -r 1 -d 0 |
|
604 | 604 | abort: can't remove original changesets with unrebased descendants |
|
605 | 605 | (use --keep to keep original changesets) |
|
606 | 606 | [255] |
|
607 | 607 | |
|
608 | 608 | Test collapsing in place |
|
609 | 609 | |
|
610 | 610 | $ hg rebase --collapse -b . -d 0 |
|
611 |
saved backup bundle to $TESTTMP/copies/.hg/strip-backup/ |
|
|
611 | saved backup bundle to $TESTTMP/copies/.hg/strip-backup/*-backup.hg (glob) | |
|
612 | 612 | $ hg st --change . --copies |
|
613 | 613 | M a |
|
614 | 614 | M c |
|
615 | 615 | A d |
|
616 | 616 | a |
|
617 | 617 | A g |
|
618 | 618 | b |
|
619 | 619 | R b |
|
620 | 620 | $ cat a |
|
621 | 621 | a |
|
622 | 622 | a |
|
623 | 623 | $ cat c |
|
624 | 624 | c |
|
625 | 625 | c |
|
626 | 626 | $ cat d |
|
627 | 627 | a |
|
628 | 628 | a |
|
629 | 629 | $ cat g |
|
630 | 630 | b |
|
631 | 631 | b |
|
632 | 632 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now