topic: only wrap handlecheckheads for repo with topic stable
authorPierre-Yves David <pierre-yves.david@octobus.net>
Thu, 18 Apr 2019 13:02:44 +0200
branchstable
changeset 4542 f5127bfc1588
parent 4541 7e98faf278d6
child 4543 7f1e1ba3d16b
topic: only wrap handlecheckheads 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:06 2019 +0200
+++ b/hgext3rd/topic/discovery.py	Thu Apr 18 13:02:44 2019 +0200
@@ -154,7 +154,7 @@
 def handlecheckheads(orig, op, inpart):
     """This is used to check for new heads when publishing changeset"""
     orig(op, inpart)
-    if op.repo.publishing():
+    if not common.hastopicext(op.repo) or op.repo.publishing():
         return
     tr = op.gettransaction()
     if tr.hookargs['source'] not in ('push', 'serve'): # not a push