changeset 4048:d7034826c0a2

pick: rename the grab command to pick Grab is ambiguous with "graft", "pick" match the associated verb in histedit. The "grab" name is preserved as an alias for now.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 31 Aug 2018 09:11:04 +0200
parents 9c9d319adceb
children 25981fae92f9
files CHANGELOG hgext3rd/evolve/cmdrewrite.py tests/test-grab.t
diffstat 3 files changed, 12 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGELOG	Fri Aug 31 09:08:13 2018 +0200
+++ b/CHANGELOG	Fri Aug 31 09:11:04 2018 +0200
@@ -5,6 +5,7 @@
 -------------------
 
   * prune: rename `--biject` flag to `--pair` (old flag is kept as an alias)
+  * pick: rename the "grab" command to "pick" to avoid ambiguity with graft
 
 8.1.2 -- 2018-08-28
 -------------------
--- a/hgext3rd/evolve/cmdrewrite.py	Fri Aug 31 09:08:13 2018 +0200
+++ b/hgext3rd/evolve/cmdrewrite.py	Fri Aug 31 09:11:04 2018 +0200
@@ -1316,13 +1316,13 @@
         lockmod.release(tr, lock, wlock)
 
 @eh.command(
-    'grab',
-    [('r', 'rev', '', 'revision to grab'),
-     ('c', 'continue', False, 'continue interrupted grab'),
-     ('a', 'abort', False, 'abort interrupted grab'),
+    'pick|grab',
+    [('r', 'rev', '', 'revision to pick'),
+     ('c', 'continue', False, 'continue interrupted pick'),
+     ('a', 'abort', False, 'abort interrupted pick'),
     ],
     _('[-r] rev'))
-def cmdgrab(ui, repo, *revs, **opts):
+def cmdpick(ui, repo, *revs, **opts):
     """grabs a commit, move it on the top of working directory parent and
     updates to it."""
 
--- a/tests/test-grab.t	Fri Aug 31 09:08:13 2018 +0200
+++ b/tests/test-grab.t	Fri Aug 31 09:11:04 2018 +0200
@@ -16,16 +16,18 @@
   $ hg init repo
   $ cd repo
   $ hg help grab
-  hg grab [-r] rev
+  hg pick [-r] rev
+  
+  aliases: grab
   
   grabs a commit, move it on the top of working directory parent and
       updates to it.
   
   options:
   
-   -r --rev VALUE revision to grab
-   -c --continue  continue interrupted grab
-   -a --abort     abort interrupted grab
+   -r --rev VALUE revision to pick
+   -c --continue  continue interrupted pick
+   -a --abort     abort interrupted pick
   
   (some details hidden, use --verbose to show complete help)