##// END OF EJS Templates
continue: added support for transplant...
Taapas Agrawal -
r42943:0a4303c7 default
parent child Browse files
Show More
@@ -734,6 +734,13 b' def _dotransplant(ui, repo, *revs, **opt'
734 734 if cleanupfn:
735 735 cleanupfn()
736 736
737 def continuecmd(ui, repo):
738 """logic to resume an interrupted transplant using
739 'hg continue'"""
740 with repo.wlock():
741 tp = transplanter(ui, repo, {})
742 return tp.resume(repo, repo, {})
743
737 744 revsetpredicate = registrar.revsetpredicate()
738 745
739 746 @revsetpredicate('transplanted([set])')
@@ -760,6 +767,7 b' def kwtransplanted(context, mapping):'
760 767 def extsetup(ui):
761 768 statemod.addunfinished (
762 769 'transplant', fname='transplant/journal', clearable=True,
770 continuefunc=continuecmd,
763 771 statushint=_('To continue: hg transplant --continue\n'
764 772 'To abort: hg update'),
765 773 cmdhint=_("use 'hg transplant --continue' or 'hg update' to abort")
@@ -1,8 +1,16 b''
1 #testcases commandmode continueflag
1 2 $ cat <<EOF >> $HGRCPATH
2 3 > [extensions]
3 4 > transplant=
4 5 > EOF
5 6
7 #if continueflag
8 $ cat >> $HGRCPATH <<EOF
9 > [alias]
10 > continue = transplant --continue
11 > EOF
12 #endif
13
6 14 $ hg init t
7 15 $ cd t
8 16 $ hg transplant
@@ -424,8 +432,9 b" transplant -c shouldn't use an old chang"
424 432 updated to "e8643552fde5: foobar"
425 433 1 other heads for branch "default"
426 434 $ rm added
427 $ hg transplant --continue
428 abort: no transplant to continue
435 $ hg continue
436 abort: no transplant to continue (continueflag !)
437 abort: no operation in progress (no-continueflag !)
429 438 [255]
430 439 $ hg transplant 1
431 440 applying 46ae92138f3c
@@ -492,7 +501,7 b' test multiple revisions, --continue and '
492 501 # To abort: hg update
493 502
494 503 $ echo fixed > baz
495 $ hg transplant --continue
504 $ hg continue
496 505 9d6d6b5a8275 transplanted as d80c49962290
497 506 applying 1dab759070cf
498 507 1dab759070cf transplanted to aa0ffe6bd5ae
@@ -881,7 +890,7 b' Test empty result in --continue'
881 890 [255]
882 891 $ hg status
883 892 ? b.rej
884 $ hg transplant --continue
893 $ hg continue
885 894 645035761929 skipped due to empty diff
886 895
887 896 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now