topic: only wrap workingctx.__init__ for repo with topic stable
authorPierre-Yves David <pierre-yves.david@octobus.net>
Thu, 18 Apr 2019 11:13:14 +0200
branchstable
changeset 4532 659b6f548fc1
parent 4531 1d1f8f56daac
child 4533 51317ce90bdc
topic: only wrap workingctx.__init__ for repo with topic This helps repository with and without topic to coexist in the same process.
hgext3rd/topic/__init__.py
--- a/hgext3rd/topic/__init__.py	Thu Apr 18 11:12:58 2019 +0200
+++ b/hgext3rd/topic/__init__.py	Thu Apr 18 11:13:14 2019 +0200
@@ -565,6 +565,8 @@
 
 def wrapinit(orig, self, repo, *args, **kwargs):
     orig(self, repo, *args, **kwargs)
+    if not hastopicext(repo):
+        return
     if constants.extrakey not in self._extra:
         if getattr(repo, 'currenttopic', ''):
             self._extra[constants.extrakey] = repo.currenttopic