# HG changeset patch # User Pierre-Yves David # Date 1471213184 -7200 # Node ID 2a07df82358882e55409280c9d49f76777412ab7 # Parent 4864ddc4c6d9a90befd95f9bb874a63bd9089255 destination: honor the sourceset argument of _destmerge Mercurial gained a "sourceset" argument to compute the merge destination of any changeset (the one in the 'sourceset'). This now works for the version in topic too. The support is quite basic (because we pick only one changeset from the sourceset) but that's a start. diff -r 4864ddc4c6d9 -r 2a07df823588 hgext3rd/topic/destination.py --- a/hgext3rd/topic/destination.py Mon Aug 15 05:25:53 2016 +0200 +++ b/hgext3rd/topic/destination.py Mon Aug 15 00:19:44 2016 +0200 @@ -13,7 +13,12 @@ def _destmergebranch(orig, repo, action='merge', sourceset=None, onheadcheck=True, destspace=None): # XXX: take destspace into account - p1 = repo['.'] + if sourceset is None: + p1 = repo['.'] + else: + # XXX: using only the max here is flacky. That code should eventually + # be updated to take care of the whole sourceset. + p1 = repo[max(sourceset)] top = p1.topic() if top: revs = repo.revs('topic(%s) - obsolete()', top)