Show More
@@ -3547,9 +3547,12 b' def graft(ui, repo, *revs, **opts):' | |||
|
3547 | 3547 | continue |
|
3548 | 3548 | |
|
3549 | 3549 | source = ctx.extra().get('source') |
|
3550 |
|
|
|
3551 |
|
|
|
3552 |
extra = |
|
|
3550 | extra = {} | |
|
3551 | if source: | |
|
3552 | extra['source'] = source | |
|
3553 | extra['intermediate-source'] = ctx.hex() | |
|
3554 | else: | |
|
3555 | extra['source'] = ctx.hex() | |
|
3553 | 3556 | user = ctx.user() |
|
3554 | 3557 | if opts.get('user'): |
|
3555 | 3558 | user = opts['user'] |
@@ -313,7 +313,7 b' Graft again onto another branch should p' | |||
|
313 | 313 | 2:5c095ad7e90f871700f02dd1fa5012cb4498a2d4 |
|
314 | 314 | |
|
315 | 315 | $ hg log --debug -r tip |
|
316 | changeset: 13:9db0f28fd3747e92c57d015f53b5593aeec53c2d | |
|
316 | changeset: 13:7a4785234d87ec1aa420ed6b11afe40fa73e12a9 | |
|
317 | 317 | tag: tip |
|
318 | 318 | phase: draft |
|
319 | 319 | parent: 12:b592ea63bb0c19a6c5c44685ee29a2284f9f1b8f |
@@ -324,6 +324,7 b' Graft again onto another branch should p' | |||
|
324 | 324 | files+: b |
|
325 | 325 | files-: a |
|
326 | 326 | extra: branch=default |
|
327 | extra: intermediate-source=ef0ef43d49e79e81ddafdc7997401ba0041efc82 | |
|
327 | 328 | extra: source=5c095ad7e90f871700f02dd1fa5012cb4498a2d4 |
|
328 | 329 | description: |
|
329 | 330 | 2 |
@@ -338,10 +339,10 b' Disallow grafting an already grafted cse' | |||
|
338 | 339 | Disallow grafting already grafted csets with the same origin onto each other |
|
339 | 340 | $ hg up -q 13 |
|
340 | 341 | $ hg graft 2 |
|
341 |
skipping revision 2:5c095ad7e90f (already grafted to 13: |
|
|
342 | skipping revision 2:5c095ad7e90f (already grafted to 13:7a4785234d87) | |
|
342 | 343 | [255] |
|
343 | 344 | $ hg graft 7 |
|
344 |
skipping already grafted revision 7:ef0ef43d49e7 (13: |
|
|
345 | skipping already grafted revision 7:ef0ef43d49e7 (13:7a4785234d87 also has origin 2:5c095ad7e90f) | |
|
345 | 346 | [255] |
|
346 | 347 | |
|
347 | 348 | $ hg up -q 7 |
@@ -349,7 +350,7 b' Disallow grafting already grafted csets ' | |||
|
349 | 350 | skipping revision 2:5c095ad7e90f (already grafted to 7:ef0ef43d49e7) |
|
350 | 351 | [255] |
|
351 | 352 | $ hg graft tip |
|
352 |
skipping already grafted revision 13: |
|
|
353 | skipping already grafted revision 13:7a4785234d87 (7:ef0ef43d49e7 also has origin 2:5c095ad7e90f) | |
|
353 | 354 | [255] |
|
354 | 355 | |
|
355 | 356 | Graft with --log |
@@ -543,7 +544,7 b' Test simple destination' | |||
|
543 | 544 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
544 | 545 | summary: 3 |
|
545 | 546 | |
|
546 |
changeset: 13: |
|
|
547 | changeset: 13:7a4785234d87 | |
|
547 | 548 | user: foo |
|
548 | 549 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
549 | 550 | summary: 2 |
@@ -578,7 +579,7 b' Test simple destination' | |||
|
578 | 579 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
579 | 580 | summary: 2 |
|
580 | 581 | |
|
581 |
changeset: 13: |
|
|
582 | changeset: 13:7a4785234d87 | |
|
582 | 583 | user: foo |
|
583 | 584 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
584 | 585 | summary: 2 |
@@ -621,7 +622,7 b' All copies of a cset' | |||
|
621 | 622 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
622 | 623 | summary: 2 |
|
623 | 624 | |
|
624 |
changeset: 13: |
|
|
625 | changeset: 13:7a4785234d87 | |
|
625 | 626 | user: foo |
|
626 | 627 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
627 | 628 | summary: 2 |
@@ -637,7 +638,7 b' All copies of a cset' | |||
|
637 | 638 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
638 | 639 | summary: 2 |
|
639 | 640 | |
|
640 |
changeset: 22: |
|
|
641 | changeset: 22:d1cb6591fa4b | |
|
641 | 642 | branch: dev |
|
642 | 643 | tag: tip |
|
643 | 644 | user: foo |
@@ -649,11 +650,11 b' graft works on complex revset' | |||
|
649 | 650 | |
|
650 | 651 | $ hg graft 'origin(13) or destination(origin(13))' |
|
651 | 652 | skipping ancestor revision 21:7e61b508e709 |
|
652 |
skipping ancestor revision 22: |
|
|
653 |
skipping revision 2:5c095ad7e90f (already grafted to 22: |
|
|
653 | skipping ancestor revision 22:d1cb6591fa4b | |
|
654 | skipping revision 2:5c095ad7e90f (already grafted to 22:d1cb6591fa4b) | |
|
654 | 655 | grafting 7:ef0ef43d49e7 "2" |
|
655 | 656 | warning: can't find ancestor for 'b' copied from 'a'! |
|
656 |
grafting 13: |
|
|
657 | grafting 13:7a4785234d87 "2" | |
|
657 | 658 | warning: can't find ancestor for 'b' copied from 'a'! |
|
658 | 659 | grafting 19:9627f653b421 "2" |
|
659 | 660 | merging b |
@@ -664,7 +665,7 b" graft with --force (still doesn't graft " | |||
|
664 | 665 | $ hg graft 19 0 6 |
|
665 | 666 | skipping ungraftable merge revision 6 |
|
666 | 667 | skipping ancestor revision 0:68795b066622 |
|
667 |
skipping already grafted revision 19:9627f653b421 (22: |
|
|
668 | skipping already grafted revision 19:9627f653b421 (22:d1cb6591fa4b also has origin 2:5c095ad7e90f) | |
|
668 | 669 | [255] |
|
669 | 670 | $ hg graft 19 0 6 --force |
|
670 | 671 | skipping ungraftable merge revision 6 |
@@ -679,12 +680,12 b' graft --force after backout' | |||
|
679 | 680 | $ hg ci -m 28 |
|
680 | 681 | $ hg backout 28 |
|
681 | 682 | reverting a |
|
682 |
changeset 29: |
|
|
683 | changeset 29:53177ba928f6 backs out changeset 28:50a516bb8b57 | |
|
683 | 684 | $ hg graft 28 |
|
684 |
skipping ancestor revision 28: |
|
|
685 | skipping ancestor revision 28:50a516bb8b57 | |
|
685 | 686 | [255] |
|
686 | 687 | $ hg graft 28 --force |
|
687 |
grafting 28: |
|
|
688 | grafting 28:50a516bb8b57 "28" | |
|
688 | 689 | merging a |
|
689 | 690 | $ cat a |
|
690 | 691 | abc |
@@ -694,7 +695,7 b' graft --continue after --force' | |||
|
694 | 695 | $ echo def > a |
|
695 | 696 | $ hg ci -m 31 |
|
696 | 697 | $ hg graft 28 --force --tool internal:fail |
|
697 |
grafting 28: |
|
|
698 | grafting 28:50a516bb8b57 "28" | |
|
698 | 699 | abort: unresolved conflicts, can't continue |
|
699 | 700 | (use hg resolve and hg graft --continue) |
|
700 | 701 | [255] |
@@ -707,7 +708,7 b' graft --continue after --force' | |||
|
707 | 708 | $ hg resolve -m a |
|
708 | 709 | (no more unresolved files) |
|
709 | 710 | $ hg graft -c |
|
710 |
grafting 28: |
|
|
711 | grafting 28:50a516bb8b57 "28" | |
|
711 | 712 | $ cat a |
|
712 | 713 | abc |
|
713 | 714 | |
@@ -719,7 +720,7 b' but do some destructive editing of the r' | |||
|
719 | 720 | $ hg --config extensions.strip= strip 2 |
|
720 | 721 | saved backup bundle to $TESTTMP/a/.hg/strip-backup/5c095ad7e90f-d323a1e4-backup.hg (glob) |
|
721 | 722 | $ hg graft tmp |
|
722 |
skipping already grafted revision 8: |
|
|
723 | skipping already grafted revision 8:7a4785234d87 (2:ef0ef43d49e7 also has unknown origin 5c095ad7e90f) | |
|
723 | 724 | [255] |
|
724 | 725 | |
|
725 | 726 | Empty graft |
@@ -728,8 +729,8 b' Empty graft' | |||
|
728 | 729 | $ hg tag -f something |
|
729 | 730 | $ hg graft -qr 27 |
|
730 | 731 | $ hg graft -f 27 |
|
731 |
grafting 27: |
|
|
732 |
note: graft of 27: |
|
|
732 | grafting 27:ed6c7e54e319 "28" | |
|
733 | note: graft of 27:ed6c7e54e319 created no changes to commit | |
|
733 | 734 | |
|
734 | 735 | $ cd .. |
|
735 | 736 | |
@@ -756,3 +757,17 b' Graft to duplicate a commit' | |||
|
756 | 757 | |/ |
|
757 | 758 | o 0 |
|
758 | 759 | |
|
760 | Graft to duplicate a commit twice | |
|
761 | ||
|
762 | $ hg up -q 0 | |
|
763 | $ hg graft -r 2 | |
|
764 | grafting 2:044ec77f6389 "b" (tip) | |
|
765 | $ hg log -G -T '{rev}\n' | |
|
766 | @ 3 | |
|
767 | | | |
|
768 | | o 2 | |
|
769 | |/ | |
|
770 | | o 1 | |
|
771 | |/ | |
|
772 | o 0 | |
|
773 |
General Comments 0
You need to be logged in to leave comments.
Login now