rebase: make --dest understand revsets
authorPatrick Mezard <patrick@mezard.eu>
Tue, 01 May 2012 10:14:35 +0200
changeset 16566 ae6dddffe4f1
parent 16565 9b7d2ff4b006
child 16567 aef3d0d4631c
rebase: make --dest understand revsets
hgext/rebase.py
tests/test-rebase-parameters.t
--- a/hgext/rebase.py	Wed May 02 11:43:12 2012 +0200
+++ b/hgext/rebase.py	Tue May 01 10:14:35 2012 +0200
@@ -182,7 +182,7 @@
                 branch = repo[None].branch()
                 dest = repo[branch]
             else:
-                dest = repo[destf]
+                dest = scmutil.revsingle(repo, destf)
 
             if revf:
                 rebaseset = repo.revs('%lr', revf)
--- a/tests/test-rebase-parameters.t	Wed May 02 11:43:12 2012 +0200
+++ b/tests/test-rebase-parameters.t	Tue May 01 10:14:35 2012 +0200
@@ -158,12 +158,12 @@
   $ cd ..
 
 
-Rebase with dest == `hg branch` => same as no arguments (from 3 onto 8):
+Rebase with dest == branch(.) => same as no arguments (from 3 onto 8):
 
   $ hg clone -q -u 3 a a3
   $ cd a3
 
-  $ hg rebase --dest `hg branch`
+  $ hg rebase --dest 'branch(.)'
   saved backup bundle to $TESTTMP/a3/.hg/strip-backup/*-backup.hg (glob)
 
   $ hg tglog