Patchwork [evolve-ext] touch: add 'revive' alias to the touch command

login
register
mail settings
Submitter Laurent Charignon
Date Jan. 18, 2016, 12:58 a.m.
Message ID <9974c8d6d18a3d7d6bea.1453078733@lcharignon-mbp.local>
Download mbox | patch
Permalink /patch/12824/
State Deferred
Delegated to: Pierre-Yves David
Headers show

Comments

Laurent Charignon - Jan. 18, 2016, 12:58 a.m.
# HG changeset patch
# User Laurent Charignon <lcharignon@fb.com>
# Date 1453078729 28800
#      Sun Jan 17 16:58:49 2016 -0800
# Node ID 9974c8d6d18a3d7d6bea7af46e914281f3cf224a
# Parent  4f83b2d2d20de55b2a63910ff10204af9106fd26
touch: add 'revive' alias to the touch command

We talk about 'reviving' changesets in the tests, so, let's add 'revive' as
an alias of touch.
Pierre-Yves David - Jan. 30, 2016, 3:14 p.m.
On 01/18/2016 01:58 AM, Laurent Charignon wrote:
> # HG changeset patch
> # User Laurent Charignon <lcharignon@fb.com>
> # Date 1453078729 28800
> #      Sun Jan 17 16:58:49 2016 -0800
> # Node ID 9974c8d6d18a3d7d6bea7af46e914281f3cf224a
> # Parent  4f83b2d2d20de55b2a63910ff10204af9106fd26
> touch: add 'revive' alias to the touch command
>
> We talk about 'reviving' changesets in the tests, so, let's add 'revive' as
> an alias of touch.

I'll hold a bit on that, lets discuss some consistent UI plan here.
One of the main reason I'm not super excited to make that one step as-is 
comes from the fact that touch will currently happily work on 
non-obsolete changesets, not really reviving anything.

Patch

diff --git a/hgext/evolve.py b/hgext/evolve.py
--- a/hgext/evolve.py
+++ b/hgext/evolve.py
@@ -2816,7 +2816,7 @@  def stripwrapper(orig, ui, repo, *revs, 
     kwargs['biject'] = False
     return cmdprune(ui, repo, *revs, **kwargs)
 
-@command('^touch',
+@command('^touch|revive',
     [('r', 'rev', [], 'revision to update'),
      ('D', 'duplicate', False,
       'do not mark the new revision as successor of the old one')],
diff --git a/tests/test-touch.t b/tests/test-touch.t
--- a/tests/test-touch.t
+++ b/tests/test-touch.t
@@ -20,7 +20,7 @@  Basic usage
   $ hg log -G
   @  0:e93df3427f45 a
   
-  $ hg touch .
+  $ hg revive .
   $ hg log -G
   @  1:[0-9a-f]{12} a (re)