Mercurial > evolve
changeset 1962:c00815786813
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.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Wed, 11 May 2016 16:06:58 +0200 |
parents | d9c7fced94fc |
children | 7b7f073ed05e |
files | hgext3rd/topic/destination.py |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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)