changeset 21105:12312f066d93

backout: use commonancestorsheads for checking linear heritage If two revisions are linearly related, there will only be one ancestor, and commonancestors and commonancestorsheads would give the same result. commonancestorsheads is however slightly simpler, faster and more correct.
author Mads Kiilerich <madski@unity3d.com>
date Thu, 17 Apr 2014 20:01:39 +0200
parents 40ace21cb3a1
children 53433d8f1faa
files mercurial/commands.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Thu Apr 17 20:01:35 2014 +0200
+++ b/mercurial/commands.py	Thu Apr 17 20:01:39 2014 +0200
@@ -438,7 +438,7 @@
     node = scmutil.revsingle(repo, rev).node()
 
     op1, op2 = repo.dirstate.parents()
-    if node not in repo.changelog.commonancestors(op1, node):
+    if node not in repo.changelog.commonancestorsheads(op1, node):
         raise util.Abort(_('cannot backout change that is not an ancestor'))
 
     p1, p2 = repo.changelog.parents(node)