hgext/histedit.py
changeset 19835 44d7bfe08c14
parent 19821 baab785e3ecf
child 19836 e7c0e5f81367
--- a/hgext/histedit.py	Fri Sep 06 13:30:58 2013 +0400
+++ b/hgext/histedit.py	Tue Oct 01 00:12:34 2013 +0900
@@ -422,7 +422,12 @@
     outgoing = discovery.findcommonoutgoing(repo, other, revs, force=force)
     if not outgoing.missing:
         raise util.Abort(_('no outgoing ancestors'))
-    return outgoing.missing[0]
+    roots = list(repo.revs("roots(%ln)", outgoing.missing))
+    if 1 < len(roots):
+        msg = _('there are ambiguous outgoing revisions')
+        hint = _('see "hg help histedit" for more detail')
+        raise util.Abort(msg, hint=hint)
+    return repo.lookup(roots[0])
 
 actiontable = {'p': pick,
                'pick': pick,