topic: only wrap wireprotocaps for repo with topic stable
authorPierre-Yves David <pierre-yves.david@octobus.net>
Thu, 18 Apr 2019 13:03:01 +0200
branchstable
changeset 4544 75b414b298f5
parent 4543 7f1e1ba3d16b
child 4545 93c6a274cd83
topic: only wrap wireprotocaps 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:02:52 2019 +0200
+++ b/hgext3rd/topic/discovery.py	Thu Apr 18 13:03:01 2019 +0200
@@ -198,7 +198,7 @@
 
 def wireprotocaps(orig, repo, proto):
     caps = orig(repo, proto)
-    if repo.peer().capable('topics'):
+    if common.hastopicext(repo) and repo.peer().capable('topics'):
         caps.append('topics')
     return caps