diff hgext3rd/topic/server.py @ 5935:aff365171309

branching: merge with stable
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 25 May 2021 18:46:09 +0200
parents 6357551cb66f
children a87abe69a2f8
line wrap: on
line diff
--- a/hgext3rd/topic/server.py	Wed Mar 03 12:40:59 2021 +0530
+++ b/hgext3rd/topic/server.py	Tue May 25 18:46:09 2021 +0200
@@ -71,6 +71,13 @@
     caps = orig(repo, proto)
     if common.hastopicext(repo) and repo.peer().capable(b'topics'):
         caps.append(b'_exttopics_heads')
+        if repo.ui.configbool(b'phases', b'publish'):
+            mode = b'all'
+        elif repo.ui.configbool(b'experimental', b'topic.publish-bare-branch'):
+            mode = b'auto'
+        else:
+            mode = b'none'
+        caps.append(b'ext-topics-publish=%s' % mode)
     return caps
 
 def setupserver(ui):