changeset 6029:f69a13a4fe85

evolve: drop 4.6 compat in fixedcopytracing(), update the docstring Looks like the fix for this function that originally targeted 4.6 got into core after much more time than planned: the fixed version of this function was only accepted in 5.0 (7694b685bb10).
author Anton Shestakov <av6@dwimlabs.net>
date Sat, 04 Sep 2021 19:24:43 +0300
parents 97aa9afe71a0
children 30cde40dcd17
files hgext3rd/evolve/compat.py
diffstat 1 files changed, 3 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/compat.py	Sat Sep 04 19:22:57 2021 +0300
+++ b/hgext3rd/evolve/compat.py	Sat Sep 04 19:24:43 2021 +0300
@@ -85,7 +85,7 @@
     """A complete copy-patse of copies._fullcopytrace with a one line fix to
     handle when the base is not parent of both c1 and c2. This should be
     converted in a compat function once https://phab.mercurial-scm.org/D3896
-    gets in and once we drop support for 4.6, this should be removed."""
+    gets in and once we drop support for 4.9, this should be removed."""
 
     from mercurial import pathutil
     copies = copiesmod
@@ -104,12 +104,8 @@
     # an endpoint is "dirty" if it isn't a descendant of the merge base
     # if we have a dirty endpoint, we need to trigger graft logic, and also
     # keep track of which endpoint is dirty
-    if util.safehasattr(base, 'isancestorof'):
-        dirtyc1 = not base.isancestorof(_c1)
-        dirtyc2 = not base.isancestorof(_c2)
-    else: # hg <= 4.6 (fbec9c0b32d3)
-        dirtyc1 = not base.descendant(_c1)
-        dirtyc2 = not base.descendant(_c2)
+    dirtyc1 = not base.isancestorof(_c1)
+    dirtyc2 = not base.isancestorof(_c2)
     graft = dirtyc1 or dirtyc2
     tca = base
     if graft: