Patchwork shelve: hook afterresolvedstates

login
register
mail settings
Submitter timeless@mozdev.org
Date Jan. 8, 2016, 5:03 p.m.
Message ID <c1d2952e096e9dc3367b.1452272597@waste.org>
Download mbox | patch
Permalink /patch/12603/
State Accepted
Headers show

Comments

timeless@mozdev.org - Jan. 8, 2016, 5:03 p.m.
# HG changeset patch
# User timeless <timeless@mozdev.org>
# Date 1452032607 0
#      Tue Jan 05 22:23:27 2016 +0000
# Node ID c1d2952e096e9dc3367b47ebe25032f5c856e679
# Parent  bd706395351bf4dc80a09f687e938fe4d36ad723
shelve: hook afterresolvedstates
Augie Fackler - Jan. 9, 2016, 5:13 a.m.
> On Jan 8, 2016, at 12:03 PM, timeless <timeless@mozdev.org> wrote:
> 
> # HG changeset patch
> # User timeless <timeless@mozdev.org>
> # Date 1452032607 0
> #      Tue Jan 05 22:23:27 2016 +0000
> # Node ID c1d2952e096e9dc3367b47ebe25032f5c856e679
> # Parent  bd706395351bf4dc80a09f687e938fe4d36ad723
> shelve: hook afterresolvedstates

Queued, thanks

> 
> diff --git a/hgext/shelve.py b/hgext/shelve.py
> --- a/hgext/shelve.py
> +++ b/hgext/shelve.py
> @@ -852,3 +852,5 @@
>         [shelvedstate._filename, False, False,
>          _('unshelve already in progress'),
>          _("use 'hg unshelve --continue' or 'hg unshelve --abort'")])
> +    cmdutil.afterresolvedstates.append(
> +        [shelvedstate._filename, _('hg unshelve --continue')])
> diff --git a/tests/test-shelve.t b/tests/test-shelve.t
> --- a/tests/test-shelve.t
> +++ b/tests/test-shelve.t
> @@ -395,6 +395,7 @@
>   $ hg revert -r . a/a
>   $ hg resolve -m a/a
>   (no more unresolved files)
> +  continue: hg unshelve --continue
> 
>   $ hg commit -m 'commit while unshelve in progress'
>   abort: unshelve already in progress
> @@ -840,6 +841,7 @@
>   reverting a/a (glob)
>   $ hg resolve -m a/a
>   (no more unresolved files)
> +  continue: hg unshelve --continue
>   $ hg unshelve -c
>   rebasing 5:e42a7da90865 "changes to: second" (tip)
>   note: rebase of 5:e42a7da90865 created no changes to commit
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel

Patch

diff --git a/hgext/shelve.py b/hgext/shelve.py
--- a/hgext/shelve.py
+++ b/hgext/shelve.py
@@ -852,3 +852,5 @@ 
         [shelvedstate._filename, False, False,
          _('unshelve already in progress'),
          _("use 'hg unshelve --continue' or 'hg unshelve --abort'")])
+    cmdutil.afterresolvedstates.append(
+        [shelvedstate._filename, _('hg unshelve --continue')])
diff --git a/tests/test-shelve.t b/tests/test-shelve.t
--- a/tests/test-shelve.t
+++ b/tests/test-shelve.t
@@ -395,6 +395,7 @@ 
   $ hg revert -r . a/a
   $ hg resolve -m a/a
   (no more unresolved files)
+  continue: hg unshelve --continue
 
   $ hg commit -m 'commit while unshelve in progress'
   abort: unshelve already in progress
@@ -840,6 +841,7 @@ 
   reverting a/a (glob)
   $ hg resolve -m a/a
   (no more unresolved files)
+  continue: hg unshelve --continue
   $ hg unshelve -c
   rebasing 5:e42a7da90865 "changes to: second" (tip)
   note: rebase of 5:e42a7da90865 created no changes to commit