Patchwork [5,of,5] interactive: make revert -i and shelve -i not experimental

login
register
mail settings
Submitter Laurent Charignon
Date May 21, 2015, 11:17 p.m.
Message ID <ed52edede2218b00d810.1432250237@lcharignon-mbp.dhcp.thefacebook.com>
Download mbox | patch
Permalink /patch/9231/
State Accepted
Delegated to: Pierre-Yves David
Headers show

Comments

Laurent Charignon - May 21, 2015, 11:17 p.m.
# HG changeset patch
# User Laurent Charignon <lcharignon@fb.com>
# Date 1432245450 25200
#      Thu May 21 14:57:30 2015 -0700
# Node ID ed52edede2218b00d810097e999a1dead2a6d616
# Parent  8f8a971dcca865d75dbfa29f084b4438207d33ba
interactive: make revert -i and shelve -i not experimental

This patch makes revert -i and shelve -i not experimental anymore, because:
- shelve -i uses the same code path as commit -i that is not experimental
- revert -i does not have the known issue with edition of newly added files
Pierre-Yves David - May 22, 2015, 9:55 p.m.
On 05/21/2015 06:17 PM, Laurent Charignon wrote:
> # HG changeset patch
> # User Laurent Charignon <lcharignon@fb.com>
> # Date 1432245450 25200
> #      Thu May 21 14:57:30 2015 -0700
> # Node ID ed52edede2218b00d810097e999a1dead2a6d616
> # Parent  8f8a971dcca865d75dbfa29f084b4438207d33ba
> interactive: make revert -i and shelve -i not experimental
>
> This patch makes revert -i and shelve -i not experimental anymore, because:
> - shelve -i uses the same code path as commit -i that is not experimental
> - revert -i does not have the known issue with edition of newly added files

Two changes in the same changesets. Two simple changes, but two of them.
And this matter because I do not thing revert is ready for prime time 
yet. In particular we have to figure out how we present hunk to be 
reverted to the user. The current way is confusing me a lot and I've met 
multiple person with the same feeling.

I'll take this one but for shelve only.
Pierre-Yves David - May 22, 2015, 10:53 p.m.
On 05/22/2015 04:55 PM, Pierre-Yves David wrote:
>
>
> On 05/21/2015 06:17 PM, Laurent Charignon wrote:
>> # HG changeset patch
>> # User Laurent Charignon <lcharignon@fb.com>
>> # Date 1432245450 25200
>> #      Thu May 21 14:57:30 2015 -0700
>> # Node ID ed52edede2218b00d810097e999a1dead2a6d616
>> # Parent  8f8a971dcca865d75dbfa29f084b4438207d33ba
>> interactive: make revert -i and shelve -i not experimental

I've pushed to the clowncopter this series after applying the discussed 
tweak in flight.

Patch

diff --git a/hgext/shelve.py b/hgext/shelve.py
--- a/hgext/shelve.py
+++ b/hgext/shelve.py
@@ -672,8 +672,7 @@ 
           ('p', 'patch', None,
            _('show patch')),
           ('i', 'interactive', None,
-           _('interactive mode, only works while creating a shelve'
-                   '(EXPERIMENTAL)')),
+           _('interactive mode, only works while creating a shelve')),
           ('', 'stat', None,
            _('output diffstat-style summary of changes'))] + commands.walkopts,
          _('hg shelve [OPTION]... [FILE]...'))
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -5468,7 +5468,7 @@ 
     ('r', 'rev', '', _('revert to the specified revision'), _('REV')),
     ('C', 'no-backup', None, _('do not save backup copies of files')),
     ('i', 'interactive', None,
-            _('interactively select the changes (EXPERIMENTAL)')),
+            _('interactively select the changes')),
     ] + walkopts + dryrunopts,
     _('[OPTION]... [-r REV] [NAME]...'))
 def revert(ui, repo, *pats, **opts):
diff --git a/tests/test-shelve.t b/tests/test-shelve.t
--- a/tests/test-shelve.t
+++ b/tests/test-shelve.t
@@ -60,6 +60,7 @@ 
    -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