hgext/histedit.py
changeset 20806 d66862b87ae6
parent 20790 49f2d5644f04
child 21029 76f68595ff8e
--- a/hgext/histedit.py	Tue Mar 18 15:56:24 2014 -0700
+++ b/hgext/histedit.py	Thu Mar 13 16:05:06 2014 -0700
@@ -158,7 +158,6 @@
 from mercurial import hg
 from mercurial import node
 from mercurial import repair
-from mercurial import scmutil
 from mercurial import util
 from mercurial import obsolete
 from mercurial import merge as mergemod
@@ -568,8 +567,11 @@
                 remote = None
             root = findoutgoing(ui, repo, remote, force, opts)
         else:
-            root = revs[0]
-            root = scmutil.revsingle(repo, root).node()
+            rootrevs = list(repo.set('roots(%lr)', revs))
+            if len(rootrevs) != 1:
+                raise util.Abort(_('The specified revisions must have ' +
+                    'exactly one common root'))
+            root = rootrevs[0].node()
 
         keep = opts.get('keep', False)
         revs = between(repo, root, topmost, keep)