# HG changeset patch # User Pierre-Yves David # Date 1555585299 -7200 # Node ID 22cde12d9467b5b27512df535f5d20fafc7a4f42 # Parent 91628e5c0f6d16f2f1f5ed5ca914d9bb37a7d8d5 topic: only wrap _headssummary for repo with topic This helps repository with and without topic to coexist in the same process. diff -r 91628e5c0f6d -r 22cde12d9467 hgext3rd/topic/discovery.py --- a/hgext3rd/topic/discovery.py Thu Apr 18 12:41:41 2019 +0200 +++ b/hgext3rd/topic/discovery.py Thu Apr 18 13:01:39 2019 +0200 @@ -12,6 +12,9 @@ extensions, util, ) +from . import ( + common, +) try: from mercurial import wireproto @@ -26,7 +29,10 @@ publishing = ('phases' not in remote.listkeys('namespaces') or bool(remote.listkeys('phases').get('publishing', False))) - if ((publishing or not remote.capable('topics')) + + if not common.hastopicext(pushop.repo): + return orig(pushop, *args, **kwargs) + elif ((publishing or not remote.capable('topics')) and not getattr(pushop, 'publish', False)): return orig(pushop, *args, **kwargs)