backout: don't limit heritage check to a single ancestor
authorMads Kiilerich <madski@unity3d.com>
Mon, 07 Apr 2014 23:17:51 +0200
changeset 20986 6ae0c41e4b52
parent 20985 231ccc08670c
child 20987 298c9f346dde
backout: don't limit heritage check to a single ancestor This do probably not make any real difference but is slightly more correct and we would like to get rid of changelog.ancestor.
mercurial/commands.py
--- a/mercurial/commands.py	Thu Mar 20 01:35:07 2014 +0100
+++ b/mercurial/commands.py	Mon Apr 07 23:17:51 2014 +0200
@@ -438,8 +438,7 @@
     node = scmutil.revsingle(repo, rev).node()
 
     op1, op2 = repo.dirstate.parents()
-    a = repo.changelog.ancestor(op1, node)
-    if a != node:
+    if node not in repo.changelog.commonancestors(op1, node):
         raise util.Abort(_('cannot backout change that is not an ancestor'))
 
     p1, p2 = repo.changelog.parents(node)