hgext/rebase.py
branchstable
changeset 15800 e4fc0f0b4f7e
parent 15469 ad336e093a59
child 15801 bfd3ce759682
--- a/hgext/rebase.py	Fri Jan 06 07:37:59 2012 +0100
+++ b/hgext/rebase.py	Sun Jan 08 23:09:35 2012 +0800
@@ -15,7 +15,7 @@
 '''
 
 from mercurial import hg, util, repair, merge, cmdutil, commands, bookmarks
-from mercurial import extensions, patch
+from mercurial import extensions, patch, scmutil
 from mercurial.commands import templateopts
 from mercurial.node import nullrev
 from mercurial.lock import release
@@ -187,10 +187,11 @@
             if revf:
                 revgen = repo.set('%lr', revf)
             elif srcf:
-                revgen = repo.set('(%r)::', srcf)
+                src = scmutil.revrange(repo, [srcf])
+                revgen = repo.set('(%ld)::', src)
             else:
-                base = basef or '.'
-                revgen = repo.set('(children(ancestor(%r, %d)) and ::(%r))::',
+                base = scmutil.revrange(repo, [basef or '.'])
+                revgen = repo.set('(children(ancestor(%ld, %d)) and ::(%ld))::',
                                   base, dest, base)
 
             rebaseset = [c.rev() for c in revgen]