[PATCH] rebase: add --rev option to rebase

Matt Mackall mpm at selenic.com
Sat Oct 15 13:45:17 CDT 2011


On Sat, 2011-10-15 at 20:13 +0200, Pierre-Yves David wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
> # Date 1318702352 -7200
> # Node ID 7b44db3f6a54ae010c45584c79de034fd773c621
> # Parent  f608548d5af3bec27d54ed650fc63646032368b1
> rebase: add --rev option to rebase

Queued with the following tweaks:

diff -r 7199620361fa hgext/rebase.py
--- a/hgext/rebase.py	Sat Oct 15 20:12:32 2011 +0200
+++ b/hgext/rebase.py	Sat Oct 15 13:40:34 2011 -0500
@@ -35,7 +35,7 @@
        '(up to greatest common ancestor of base and dest)'),
      _('REV')),
     ('r', 'rev', [],
-     _('rebase this set of revision'),
+     _('rebase these revisions'),
      _('REV')),
     ('d', 'dest', '',
      _('rebase onto the specified changeset'), _('REV')),
@@ -160,13 +160,13 @@
         else:
             if srcf and basef:
                 raise util.Abort(_('cannot specify both a '
-                                   'revision and a base'))
+                                   'source and a base'))
             if revf and basef:
                 raise util.Abort(_('cannot specify both a'
-                                   'revset and a base'))
+                                   'revision and a base'))
             if revf and srcf:
                 raise util.Abort(_('cannot specify both a'
-                                   'revset and a source revision'))
+                                   'revision and a source'))
             if detachf:
                 if not srcf:
                     raise util.Abort(
diff -r 7199620361fa tests/test-rebase-parameters.t
--- a/tests/test-rebase-parameters.t	Sat Oct 15 20:12:32 2011 +0200
+++ b/tests/test-rebase-parameters.t	Sat Oct 15 13:40:34 2011 -0500
@@ -67,7 +67,7 @@
   [255]
 
   $ hg rebase --base 5 --source 4
-  abort: cannot specify both a revision and a base
+  abort: cannot specify both a source and a base
   [255]
 
   $ hg rebase
diff -r 7199620361fa tests/test-rebase-scenario-global.t
--- a/tests/test-rebase-scenario-global.t	Sat Oct 15 20:12:32 2011 +0200
+++ b/tests/test-rebase-scenario-global.t	Sat Oct 15 13:40:34 2011 -0500
@@ -503,6 +503,6 @@
   $ hg clone -q -u . ah ah6
   $ cd ah6
   $ hg rebase -r '(4+6)::' -d 1
-  abort: Can't multiple roots
+  abort: can't rebase multiple roots
   [255]
   $ cd ..


-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list