topic: only wrap workingctx.__init__ for repo with topic
This helps repository with and without topic to coexist in the same process.
--- 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