Mercurial > hg
changeset 21106:53433d8f1faa
localrepo: use commonancestorsheads for checking linear heritage in file commit
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 | 12312f066d93 |
children | 4a6c8b6b10d3 |
files | mercurial/localrepo.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/localrepo.py Thu Apr 17 20:01:39 2014 +0200 +++ b/mercurial/localrepo.py Thu Apr 17 20:01:39 2014 +0200 @@ -1168,7 +1168,7 @@ fparent1, fparent2 = fparent2, nullid elif fparent2 != nullid: # is one parent an ancestor of the other? - fparentancestors = flog.commonancestors(fparent1, fparent2) + fparentancestors = flog.commonancestorsheads(fparent1, fparent2) if fparent1 in fparentancestors: fparent1, fparent2 = fparent2, nullid elif fparent2 in fparentancestors: