changeset 20988:8c2f1e2a11ff

transplant: use context ancestor instead of changelog ancestor We want to move in this direction. ctx.ancestor is in a better position for handling a situation with multiple ancestors.
author Mads Kiilerich <madski@unity3d.com>
date Mon, 07 Apr 2014 23:17:51 +0200
parents 298c9f346dde
children e8533ec2d222
files hgext/transplant.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/transplant.py	Mon Apr 07 23:17:51 2014 +0200
+++ b/hgext/transplant.py	Mon Apr 07 23:17:51 2014 +0200
@@ -568,8 +568,9 @@
         if not heads:
             heads = repo.heads()
         ancestors = []
+        ctx = repo[dest]
         for head in heads:
-            ancestors.append(repo.changelog.ancestor(dest, head))
+            ancestors.append(ctx.ancestor(repo[head]).node())
         for node in repo.changelog.nodesbetween(ancestors, heads)[0]:
             if match(node):
                 yield node