changeset 4537:db3e17adee3e stable

topic: only wrap _destmergebranch for repo with topic This helps repository with and without topic to coexist in the same process.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 18 Apr 2019 12:39:41 +0200
parents 9837e8d378de
children 31c1645ef8bf
files hgext3rd/topic/destination.py
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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)