compat: use older API for older version
This API changed in 4.7, we need to adjust.
--- a/hgext3rd/evolve/compat.py Wed Jul 25 16:12:01 2018 -0700
+++ b/hgext3rd/evolve/compat.py Tue Jul 31 11:25:57 2018 +0200
@@ -234,8 +234,12 @@
# 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
- dirtyc1 = not base.isancestorof(_c1)
- dirtyc2 = not base.isancestorof(_c2)
+ if util.safehasattr(base, 'isancestorof'):
+ dirtyc1 = not base.isancestorof(_c1)
+ dirtyc2 = not base.isancestorof(_c2)
+ else: # hg <= 4.6
+ dirtyc1 = not base.descendant(_c1)
+ dirtyc2 = not base.descendant(_c2)
graft = dirtyc1 or dirtyc2
tca = base
if graft: