# HG changeset patch # User Pierre-Yves David # Date 1555583981 -7200 # Node ID db3e17adee3ed7e568668095ebf77fc835ca69d2 # Parent 9837e8d378de16d9fa090c48cd981d4184f6a26e topic: only wrap _destmergebranch for repo with topic This helps repository with and without topic to coexist in the same process. diff -r 9837e8d378de -r db3e17adee3e hgext3rd/topic/destination.py --- a/hgext3rd/topic/destination.py Thu Apr 18 12:36:11 2019 +0200 +++ b/hgext3rd/topic/destination.py Thu Apr 18 12:39:41 2019 +0200 @@ -7,7 +7,10 @@ error, extensions, ) -from . import topicmap +from . import ( + common, + topicmap, +) from .evolvebits import builddependencies def _destmergebranch(orig, repo, action='merge', sourceset=None, @@ -19,7 +22,9 @@ # 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() + top = None + if common.hastopicext(repo): + top = p1.topic() if top: revs = repo.revs('topic(%s) - obsolete()', top) deps, rdeps = builddependencies(repo, revs)