topic: only wrap wireprotobranchmap for repo with topic stable
authorPierre-Yves David <pierre-yves.david@octobus.net>
Thu, 18 Apr 2019 13:02:06 +0200
branchstable
changeset 4541 7e98faf278d6
parent 4540 22cde12d9467
child 4542 f5127bfc1588
topic: only wrap wireprotobranchmap for repo with topic This helps repository with and without topic to coexist in the same process.
hgext3rd/topic/discovery.py
--- a/hgext3rd/topic/discovery.py	Thu Apr 18 13:01:39 2019 +0200
+++ b/hgext3rd/topic/discovery.py	Thu Apr 18 13:02:06 2019 +0200
@@ -123,6 +123,8 @@
             remote.branchmap = origremotebranchmap
 
 def wireprotobranchmap(orig, repo, proto):
+    if not common.hastopicext(repo):
+        return orig(repo, proto)
     oldrepo = repo.__class__
     try:
         class repocls(repo.__class__):