##// END OF EJS Templates
continue: added support for unshelve...
Taapas Agrawal -
r42833:117437f3 default
parent child Browse files
Show More
@@ -6219,6 +6219,7 b' def unshelve(ui, repo, *shelved, **opts)'
6219 6219 statemod.addunfinished(
6220 6220 'unshelve', fname='shelvedstate', continueflag=True,
6221 6221 abortfunc=shelvemod.hgabortunshelve,
6222 continuefunc=shelvemod.hgcontinueunshelve,
6222 6223 cmdmsg=_('unshelve already in progress'),
6223 6224 )
6224 6225
@@ -751,6 +751,12 b' def unshelvecontinue(ui, repo, state, op'
751 751 unshelvecleanup(ui, repo, state.name, opts)
752 752 ui.status(_("unshelve of '%s' complete\n") % state.name)
753 753
754 def hgcontinueunshelve(ui, repo):
755 """logic to resume unshelve using 'hg continue'"""
756 with repo.wlock():
757 state = _loadshelvedstate(ui, repo, {'continue' : True})
758 return unshelvecontinue(ui, repo, state, {'keep' : state.keep})
759
754 760 def _commitworkingcopychanges(ui, repo, opts, tmpwctx):
755 761 """Temporarily commit working copy changes before moving unshelve commit"""
756 762 # Store pending changes in a commit and remember added in case a shelve
@@ -1,5 +1,6 b''
1 1 #testcases stripbased phasebased
2 2 #testcases abortflag abortcommand
3 #testcases continueflag continuecommand
3 4
4 5 $ cat <<EOF >> $HGRCPATH
5 6 > [extensions]
@@ -27,6 +28,13 b''
27 28 > EOF
28 29 #endif
29 30
31 #if continueflag
32 $ cat >> $HGRCPATH <<EOF
33 > [alias]
34 > continue = unshelve --continue
35 > EOF
36 #endif
37
30 38 shelve should leave dirstate clean (issue4055)
31 39
32 40 $ hg init shelverebase
@@ -560,7 +568,7 b' will be preserved.'
560 568 $ hg resolve --mark a
561 569 (no more unresolved files)
562 570 continue: hg unshelve --continue
563 $ hg unshelve --continue
571 $ hg continue
564 572 marked working directory as branch test
565 573 unshelve of 'default' complete
566 574 $ cat a
@@ -641,7 +649,13 b' in previous versions) and running unshel'
641 649 $ hg resolve --mark a
642 650 (no more unresolved files)
643 651 continue: hg unshelve --continue
644 $ hg unshelve --continue
652
653 #if continuecommand
654 $ hg continue --dry-run
655 unshelve in progress, will be resumed
656 #endif
657
658 $ hg continue
645 659 unshelve of 'default' complete
646 660 $ cat a
647 661 aaabbbccc
@@ -704,7 +718,7 b' Prepare unshelve with a corrupted shelve'
704 718 $ echo somethingsomething > .hg/shelvedstate
705 719
706 720 Unshelve --continue fails with appropriate message if shelvedstate is corrupted
707 $ hg unshelve --continue
721 $ hg continue
708 722 abort: corrupted shelved state file
709 723 (please run hg unshelve --abort to abort unshelve operation)
710 724 [255]
@@ -751,7 +765,7 b' Unshelve respects --keep even if user in'
751 765 $ hg resolve --mark file
752 766 (no more unresolved files)
753 767 continue: hg unshelve --continue
754 $ hg unshelve --continue
768 $ hg continue
755 769 unshelve of 'default' complete
756 770 $ hg shelve --list
757 771 default (*s ago) * changes to: 1 (glob)
@@ -822,7 +836,7 b' putting v1 shelvedstate file in place of'
822 836 (no more unresolved files)
823 837 continue: hg unshelve --continue
824 838 mercurial does not crash
825 $ hg unshelve --continue
839 $ hg continue
826 840 unshelve of 'ashelve' complete
827 841
828 842 #if phasebased
General Comments 0
You need to be logged in to leave comments. Login now