Mercurial > public > mercurial-scm > evolve
diff hgext3rd/topic/__init__.py @ 5251:2de59d916266 stable
auto-publish: issue the capabilities in all cases
It seems better to message client that we support the capabilities in all cases.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 07 Apr 2020 15:39:23 +0200 |
parents | 0cb07fb5d158 |
children | 426f2800b793 |
line wrap: on
line diff
--- 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):