# HG changeset patch # User Pierre-Yves David # Date 1586266763 -7200 # Node ID 2de59d916266e60224db292219c0adcfe4f2426f # Parent 49cabb2d16f8f9fc4fa235770f9332c4e127ada2 auto-publish: issue the capabilities in all cases It seems better to message client that we support the capabilities in all cases. diff -r 49cabb2d16f8 -r 2de59d916266 hgext3rd/topic/__init__.py --- a/hgext3rd/topic/__init__.py Thu Apr 16 18:32:14 2020 +0800 +++ b/hgext3rd/topic/__init__.py Tue Apr 07 15:39:23 2020 +0200 @@ -414,9 +414,14 @@ def _restrictcapabilities(self, caps): caps = super(topicrepo, self)._restrictcapabilities(caps) caps.add(b'topics') - if self.ui.configbool(b'experimental', - b'topic.publish-bare-branch'): - caps.add(b'ext-topics-publish=auto') + if self.ui.configbool(b'phases', b'publish'): + mode = b'all' + elif self.ui.configbool(b'experimental', + b'topic.publish-bare-branch'): + mode = b'auto' + else: + mode = b'none' + caps.add(b'ext-topics-publish=%s' % mode) return caps def commit(self, *args, **kwargs):