auto-publish: issue the capabilities in all cases
It seems better to message client that we support the capabilities in all cases.
--- 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):