topic: only affect `hg commit` behavior 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:13:14 2019 +0200
+++ b/hgext3rd/topic/__init__.py Thu Apr 18 11:13:24 2019 +0200
@@ -1122,6 +1122,8 @@
return topicmode
def commitwrap(orig, ui, repo, *args, **opts):
+ if not hastopicext(repo):
+ return orig(ui, repo, *args, **opts)
with repo.wlock():
topicmode = _configtopicmode(ui)
ismergecommit = len(repo[None].parents()) == 2