# HG changeset patch # User Pierre-Yves David # Date 1462975618 -7200 # Node ID c0081578681324dca826635f25f9f01b54c421a6 # Parent d9c7fced94fca96b623c06d20cc6e4c90a6225f6 compat: adapt to the new destspace argument of destmerge The argument is currently ignored in the topic case for simplicity, but we properly accept it and propagate it to the original function to prevent crash and behavior regression in the non-topic case. diff -r d9c7fced94fc -r c00815786813 hgext3rd/topic/destination.py --- a/hgext3rd/topic/destination.py Mon Apr 04 00:28:03 2016 -0700 +++ b/hgext3rd/topic/destination.py Wed May 11 16:06:58 2016 +0200 @@ -9,7 +9,8 @@ util, ) -def _destmergebranch(orig, repo, action='merge', sourceset=None, onheadcheck=True): +def _destmergebranch(orig, repo, action='merge', sourceset=None, + onheadcheck=True, destspace=None): p1 = repo['.'] top = p1.topic() if top: @@ -42,8 +43,10 @@ % (top, len(heads))) else: assert False # that's impossible - if getattr(orig, 'func_default', ()): # version above hg-3.7 + 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)