compat: drop support for 3.8's '_destrebase' function
authorPierre-Yves David <pierre-yves.david@octobus.net>
Tue, 24 Oct 2017 14:12:37 +0200
changeset 3142 28e501581dc7
parent 3141 f9faa5b6f937
child 3143 f7f8fcbed02c
compat: drop support for 3.8's '_destrebase' function We no longer support this version.
hgext3rd/topic/destination.py
--- a/hgext3rd/topic/destination.py	Tue Oct 24 14:11:28 2017 +0200
+++ b/hgext3rd/topic/destination.py	Tue Oct 24 14:12:37 2017 +0200
@@ -6,7 +6,6 @@
     destutil,
     error,
     extensions,
-    util,
 )
 from . import topicmap
 from .evolvebits import builddependencies
@@ -100,24 +99,8 @@
 
 def modsetup(ui):
     """run a uisetup time to install all destinations wrapping"""
-    if util.safehasattr(destutil, '_destmergebranch'):
-        extensions.wrapfunction(destutil, '_destmergebranch', _destmergebranch)
-    try:
-        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 rebasebefore38 and rebasebefore44):
-        extensions.wrapfunction(rebase, '_destrebase', _destmergebranch)
-    if util.safehasattr(destutil, 'destupdatesteps'):
-        bridx = destutil.destupdatesteps.index('branch')
-        destutil.destupdatesteps.insert(bridx, 'topic')
-        destutil.destupdatestepmap['topic'] = _destupdatetopic
-    if util.safehasattr(destutil, 'desthistedit'):
-        extensions.wrapfunction(destutil, 'desthistedit', desthistedit)
+    extensions.wrapfunction(destutil, '_destmergebranch', _destmergebranch)
+    bridx = destutil.destupdatesteps.index('branch')
+    destutil.destupdatesteps.insert(bridx, 'topic')
+    destutil.destupdatestepmap['topic'] = _destupdatetopic
+    extensions.wrapfunction(destutil, 'desthistedit', desthistedit)