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)