Patchwork [1,of,3] shelve: new keep option

login
register
mail settings
Submitter Jordi Gutiérrez Hermoso
Date March 22, 2019, 3:29 p.m.
Message ID <773e8b313d28d85002c4.1553268588@chloe>
Download mbox | patch
Permalink /patch/39360/
State Superseded
Headers show

Comments

Jordi Gutiérrez Hermoso - March 22, 2019, 3:29 p.m.
# HG changeset patch
# User Jordi Gutiérrez Hermoso <jordigh@octave.org>
# Date 1553268263 14400
#      Fri Mar 22 11:24:23 2019 -0400
# Node ID 773e8b313d28d85002c459ea69d3671e7a0bc05e
# Parent  b1bc6e5f5249d0633db73be3c6853273485f3919
shelve: new keep option

Does nothing yet. The docstring describes what it will soon be doing.
via Mercurial-devel - March 22, 2019, 9:29 p.m.
On Fri, Mar 22, 2019 at 8:38 AM Jordi Gutiérrez Hermoso <jordigh@octave.org>
wrote:

> # HG changeset patch
> # User Jordi Gutiérrez Hermoso <jordigh@octave.org>
> # Date 1553268263 14400
> #      Fri Mar 22 11:24:23 2019 -0400
> # Node ID 773e8b313d28d85002c459ea69d3671e7a0bc05e
> # Parent  b1bc6e5f5249d0633db73be3c6853273485f3919
> shelve: new keep option
>
> Does nothing yet. The docstring describes what it will soon be doing.
>

Could you explain what the feature is useful for? I understand what it
does, but I don't remember wanting that.


>
> diff --git a/hgext/shelve.py b/hgext/shelve.py
> --- a/hgext/shelve.py
> +++ b/hgext/shelve.py
> @@ -1055,6 +1055,8 @@ def _dounshelve(ui, repo, *shelved, **op
>             _('delete the named shelved change(s)')),
>            ('e', 'edit', False,
>             _('invoke editor on commit messages')),
> +          ('k', 'keep', False,
> +           _('shelve, but keep changes in the working directory')),
>            ('l', 'list', None,
>             _('list current shelves')),
>            ('m', 'message', '',
> diff --git a/tests/test-shelve.t b/tests/test-shelve.t
> --- a/tests/test-shelve.t
> +++ b/tests/test-shelve.t
> @@ -76,6 +76,7 @@ shelve has a help message
>        --date DATE           shelve with the specified commit date
>     -d --delete              delete the named shelved change(s)
>     -e --edit                invoke editor on commit messages
> +   -k --keep                shelve, but keep changes in the working
> directory
>     -l --list                list current shelves
>     -m --message TEXT        use text as shelve message
>     -n --name NAME           use the given name for the shelved commit
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>

Patch

diff --git a/hgext/shelve.py b/hgext/shelve.py
--- a/hgext/shelve.py
+++ b/hgext/shelve.py
@@ -1055,6 +1055,8 @@  def _dounshelve(ui, repo, *shelved, **op
            _('delete the named shelved change(s)')),
           ('e', 'edit', False,
            _('invoke editor on commit messages')),
+          ('k', 'keep', False,
+           _('shelve, but keep changes in the working directory')),
           ('l', 'list', None,
            _('list current shelves')),
           ('m', 'message', '',
diff --git a/tests/test-shelve.t b/tests/test-shelve.t
--- a/tests/test-shelve.t
+++ b/tests/test-shelve.t
@@ -76,6 +76,7 @@  shelve has a help message
       --date DATE           shelve with the specified commit date
    -d --delete              delete the named shelved change(s)
    -e --edit                invoke editor on commit messages
+   -k --keep                shelve, but keep changes in the working directory
    -l --list                list current shelves
    -m --message TEXT        use text as shelve message
    -n --name NAME           use the given name for the shelved commit