compat: simply the wrapping of '_destmergebranch'
authorPierre-Yves David <pierre-yves.david@octobus.net>
Tue, 24 Oct 2017 14:13:23 +0200
changeset 3143 f7f8fcbed02c
parent 3142 28e501581dc7
child 3144 6f10c94a2114
compat: simply the wrapping of '_destmergebranch' All the version we support now use the same interface.
hgext3rd/topic/destination.py
--- a/hgext3rd/topic/destination.py	Tue Oct 24 14:12:37 2017 +0200
+++ b/hgext3rd/topic/destination.py	Tue Oct 24 14:13:23 2017 +0200
@@ -53,12 +53,7 @@
             msg = _("topic '%s' has %d heads "
                     "- please merge with an explicit rev") % (top, len(heads))
             raise error.ManyMergeDestAbort(msg)
-    if len(getattr(orig, 'func_defaults', ())) == 3: # version hg-3.7
-        return orig(repo, action, sourceset, onheadcheck)
-    if 3 < len(getattr(orig, 'func_defaults', ())): # version hg-3.8 and above
-        return orig(repo, action, sourceset, onheadcheck, destspace=destspace)
-    else:
-        return orig(repo)
+    return orig(repo, action, sourceset, onheadcheck, destspace=destspace)
 
 def _destupdatetopic(repo, clean, check=None):
     """decide on an update destination from current topic"""