hgext3rd/topic/destination.py
branchstable
changeset 4537 db3e17adee3e
parent 4044 c0fbe70f2e48
child 4538 31c1645ef8bf
--- 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)