topic: only affect `hg commit` behavior for repo with topic stable
authorPierre-Yves David <pierre-yves.david@octobus.net>
Thu, 18 Apr 2019 11:13:24 +0200
branchstable
changeset 4533 51317ce90bdc
parent 4532 659b6f548fc1
child 4534 24662f94d126
topic: only affect `hg commit` behavior 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: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