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