Patchwork [2,of,3] shelve: make the interactive mode experimental

login
register
mail settings
Submitter Laurent Charignon
Date April 27, 2015, 11:14 p.m.
Message ID <4c3a7dd5664f750df6d4.1430176447@dev919.prn2.facebook.com>
Download mbox | patch
Permalink /patch/8804/
State Superseded
Headers show

Comments

Laurent Charignon - April 27, 2015, 11:14 p.m.
# HG changeset patch
# User Laurent Charignon <lcharignon@fb.com>
# Date 1430174170 25200
#      Mon Apr 27 15:36:10 2015 -0700
# Branch stable
# Node ID 4c3a7dd5664f750df6d433191cd62aa11799dff5
# Parent  944cb089b91456883365333d09b25036096ecf56
shelve: make the interactive mode experimental

While fixing issue4304: "record: allow editing new files" we introduced
changes in record/crecord. These changes need to be matched with changes in any
command using record. Shelve is one of these commands and the changes have
not been made for this release. Therefore, shelve -i should be an experimental
feature for this release.
Gregory Szorc - April 28, 2015, 12:01 a.m.
On Mon, Apr 27, 2015 at 4:14 PM, Laurent Charignon <lcharignon@fb.com>
wrote:

> # HG changeset patch
> # User Laurent Charignon <lcharignon@fb.com>
> # Date 1430174170 25200
> #      Mon Apr 27 15:36:10 2015 -0700
> # Branch stable
> # Node ID 4c3a7dd5664f750df6d433191cd62aa11799dff5
> # Parent  944cb089b91456883365333d09b25036096ecf56
> shelve: make the interactive mode experimental
>
> While fixing issue4304: "record: allow editing new files" we introduced
> changes in record/crecord. These changes need to be matched with changes
> in any
> command using record. Shelve is one of these commands and the changes have
> not been made for this release. Therefore, shelve -i should be an
> experimental
> feature for this release.
>
> diff --git a/hgext/shelve.py b/hgext/shelve.py
> --- a/hgext/shelve.py
> +++ b/hgext/shelve.py
> @@ -658,7 +658,8 @@
>            ('p', 'patch', None,
>             _('show patch')),
>            ('i', 'interactive', None,
> -           _('interactive mode, only works while creating a shelve')),
> +           _('interactive mode, only works while creating a shelve' + \
> +                   '(EXPERIMENTAL)')),
>
> This should be:

 _('interactive mode, only works while creating a shelve '
    '(EXPERIMENTAL)')),

When inside (), the line continuation (\) isn't needed *and* string
literals are automagically appended together. It's kind of wonky, but
that's how it is.

Patch

diff --git a/hgext/shelve.py b/hgext/shelve.py
--- a/hgext/shelve.py
+++ b/hgext/shelve.py
@@ -658,7 +658,8 @@ 
           ('p', 'patch', None,
            _('show patch')),
           ('i', 'interactive', None,
-           _('interactive mode, only works while creating a shelve')),
+           _('interactive mode, only works while creating a shelve' + \
+                   '(EXPERIMENTAL)')),
           ('', 'stat', None,
            _('output diffstat-style summary of changes'))] + commands.walkopts,
          _('hg shelve [OPTION]... [FILE]...'))
diff --git a/tests/test-shelve.t b/tests/test-shelve.t
--- a/tests/test-shelve.t
+++ b/tests/test-shelve.t
@@ -60,7 +60,6 @@ 
    -m --message TEXT        use text as shelve message
    -n --name NAME           use the given name for the shelved commit
    -p --patch               show patch
-   -i --interactive         interactive mode, only works while creating a shelve
       --stat                output diffstat-style summary of changes
    -I --include PATTERN [+] include names matching the given patterns
    -X --exclude PATTERN [+] exclude names matching the given patterns