Mercurial > hg
diff tests/test-shelve2.t @ 42614:117437f3f541
continue: added support for unshelve
This patch adds the support for `ushelve` in `hg continue` plan.
`hgcontinueunshelve()` has been created for independent calls.
In case an interrupted unshelve is resumed via hg continue the
shelvedstate needs to be loaded seperately. This has been
ensured by `_loadunshelvedstate()`
`hgcontinueunshelve()` is then registered as `continuefunc` for state
detection API.
Results are shown as tests.
Differential Revision: https://phab.mercurial-scm.org/D6652
author | Taapas Agrawal <taapas2897@gmail.com> |
---|---|
date | Wed, 17 Jul 2019 22:24:17 +0530 |
parents | 3bc400ccbf99 |
children | 34a46d48d24e |
line wrap: on
line diff
--- a/tests/test-shelve2.t Tue Jul 16 01:59:28 2019 +0530 +++ b/tests/test-shelve2.t Wed Jul 17 22:24:17 2019 +0530 @@ -1,5 +1,6 @@ #testcases stripbased phasebased #testcases abortflag abortcommand +#testcases continueflag continuecommand $ cat <<EOF >> $HGRCPATH > [extensions] @@ -27,6 +28,13 @@ > EOF #endif +#if continueflag + $ cat >> $HGRCPATH <<EOF + > [alias] + > continue = unshelve --continue + > EOF +#endif + shelve should leave dirstate clean (issue4055) $ hg init shelverebase @@ -560,7 +568,7 @@ $ hg resolve --mark a (no more unresolved files) continue: hg unshelve --continue - $ hg unshelve --continue + $ hg continue marked working directory as branch test unshelve of 'default' complete $ cat a @@ -641,7 +649,13 @@ $ hg resolve --mark a (no more unresolved files) continue: hg unshelve --continue - $ hg unshelve --continue + +#if continuecommand + $ hg continue --dry-run + unshelve in progress, will be resumed +#endif + + $ hg continue unshelve of 'default' complete $ cat a aaabbbccc @@ -704,7 +718,7 @@ $ echo somethingsomething > .hg/shelvedstate Unshelve --continue fails with appropriate message if shelvedstate is corrupted - $ hg unshelve --continue + $ hg continue abort: corrupted shelved state file (please run hg unshelve --abort to abort unshelve operation) [255] @@ -751,7 +765,7 @@ $ hg resolve --mark file (no more unresolved files) continue: hg unshelve --continue - $ hg unshelve --continue + $ hg continue unshelve of 'default' complete $ hg shelve --list default (*s ago) * changes to: 1 (glob) @@ -822,7 +836,7 @@ (no more unresolved files) continue: hg unshelve --continue mercurial does not crash - $ hg unshelve --continue + $ hg continue unshelve of 'ashelve' complete #if phasebased