# HG changeset patch # User Pierre-Yves David # Date 1533029157 -7200 # Node ID 2af10d0a59e06c7f84d33eb1eb5eec4a880df162 # Parent f2cde417a738bfc816b61ef2f64bd0112769f5d1 compat: use older API for older version This API changed in 4.7, we need to adjust. diff -r f2cde417a738 -r 2af10d0a59e0 hgext3rd/evolve/compat.py --- 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: