# HG changeset patch # User Pierre-Yves David # Date 1457786185 0 # Node ID c44f161575ba5a2618e0c2797db1e78012d38fbf # Parent 69077c65919d2a620f2b3711d8587b6a57edea92 compat: adapt to change in mercurial core The code around merge destination have been changed in core, we do some basic adaptation to make sure we don't crash. Further rework to adapt//take advantage of core change would probably be useful but this is not the point of this commit. diff -r 69077c65919d -r c44f161575ba src/topic/destination.py --- a/src/topic/destination.py Thu Dec 31 11:23:19 2015 -0500 +++ b/src/topic/destination.py Sat Mar 12 12:36:25 2016 +0000 @@ -4,7 +4,7 @@ from mercurial import extensions from mercurial.i18n import _ -def _destmergebranch(orig, repo): +def _destmergebranch(orig, repo, action='merge', sourceset=None, onheadcheck=True): p1 = repo['.'] top = p1.topic() if top: @@ -37,7 +37,10 @@ % (top, len(heads))) else: assert False # that's impossible - return orig(repo) + if orig.func_default: # version above hg-3.7 + return orig(repo, action, sourceset, onheadcheck) + else: + return orig(repo) def setupdest(): if util.safehasattr(destutil, '_destmergebranch'):