compat: pass contexts to _findlimit() (issue6066) stable
authorSushil khanchi <sushilkhanchi97@gmail.com>
Thu, 31 Jan 2019 15:38:48 +0530
branchstable
changeset 4388 20d1ceef2df2
parent 4387 61d83e0cfdf2
child 4389 88887b2be07c
child 4395 610999a1bae1
compat: pass contexts to _findlimit() (issue6066) Now _findlimit() in copies module accept context instead of rev number. See https://phab.mercurial-scm.org/D5595
hgext3rd/evolve/compat.py
--- a/hgext3rd/evolve/compat.py	Sun Feb 03 08:10:48 2019 +0100
+++ b/hgext3rd/evolve/compat.py	Thu Jan 31 15:38:48 2019 +0530
@@ -261,7 +261,11 @@
     if graft:
         tca = _c1.ancestor(_c2)
 
-    limit = copies._findlimit(repo, c1.rev(), c2.rev())
+    # hg < 4.8 compat (dc50121126ae)
+    try:
+        limit = copies._findlimit(repo, c1, c2)
+    except (AttributeError, TypeError):
+        limit = copies._findlimit(repo, c1.rev(), c2.rev())
     if limit is None:
         # no common ancestor, no copies
         return {}, {}, {}, {}, {}