changeset 4543:7f1e1ba3d16b stable

topic: only wrap _pushb2phases for repo with topic This helps repository with and without topic to coexist in the same process.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 18 Apr 2019 13:02:52 +0200
parents f5127bfc1588
children 75b414b298f5
files hgext3rd/topic/discovery.py
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/topic/discovery.py	Thu Apr 18 13:02:44 2019 +0200
+++ b/hgext3rd/topic/discovery.py	Thu Apr 18 13:02:52 2019 +0200
@@ -189,10 +189,11 @@
 handlecheckheads.params = frozenset()
 
 def _pushb2phases(orig, pushop, bundler):
-    checktypes = ('check:heads', 'check:updated-heads')
-    hascheck = any(p.type in checktypes for p in bundler._parts)
-    if not hascheck and pushop.outdatedphases:
-        exchange._pushb2ctxcheckheads(pushop, bundler)
+    if common.hastopicext(pushop.repo):
+        checktypes = ('check:heads', 'check:updated-heads')
+        hascheck = any(p.type in checktypes for p in bundler._parts)
+        if not hascheck and pushop.outdatedphases:
+            exchange._pushb2ctxcheckheads(pushop, bundler)
     return orig(pushop, bundler)
 
 def wireprotocaps(orig, repo, proto):