# HG changeset patch # User Pierre-Yves David # Date 1555585372 -7200 # Node ID 7f1e1ba3d16b09c2af8ec01ac4788881361d71fe # Parent f5127bfc15881c9904659f719a7563b62bc9db68 topic: only wrap _pushb2phases for repo with topic This helps repository with and without topic to coexist in the same process. diff -r f5127bfc1588 -r 7f1e1ba3d16b hgext3rd/topic/discovery.py --- 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):