compat: adapt to rebase change in coming 4.4
Make evolve works with mercurial core 72b5f4d53c58
--- a/hgext3rd/topic/destination.py Thu Aug 31 13:22:40 2017 +0200
+++ b/hgext3rd/topic/destination.py Fri Sep 01 11:07:28 2017 +0200
@@ -106,9 +106,14 @@
rebase = extensions.find('rebase')
except KeyError:
rebase = None
+
+ # Mercurial 4.4 rename _definesets into _definedestmap
+ rebasebefore38 = not util.safehasattr(rebase, '_definesets')
+ rebasebefore44 = not util.safehasattr(rebase, '_definedestmap')
+
if (util.safehasattr(rebase, '_destrebase')
# logic not shared with merge yet < hg-3.8
- and not util.safehasattr(rebase, '_definesets')):
+ and rebasebefore38 and rebasebefore44):
extensions.wrapfunction(rebase, '_destrebase', _destmergebranch)
if util.safehasattr(destutil, 'destupdatesteps'):
bridx = destutil.destupdatesteps.index('branch')