comparison hgext3rd/topic/__init__.py @ 5253:426f2800b793

branching: merge with stable
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 23 Apr 2020 03:06:30 +0200
parents 5cfec61b872b 2de59d916266
children 27d57ca86865
comparison
equal deleted inserted replaced
5244:4da1d21231ae 5253:426f2800b793
404 hastopicext = True 404 hastopicext = True
405 405
406 def _restrictcapabilities(self, caps): 406 def _restrictcapabilities(self, caps):
407 caps = super(topicrepo, self)._restrictcapabilities(caps) 407 caps = super(topicrepo, self)._restrictcapabilities(caps)
408 caps.add(b'topics') 408 caps.add(b'topics')
409 if self.ui.configbool(b'experimental', 409 if self.ui.configbool(b'phases', b'publish'):
410 b'topic.publish-bare-branch'): 410 mode = b'all'
411 caps.add(b'ext-topics-publish=auto') 411 elif self.ui.configbool(b'experimental',
412 b'topic.publish-bare-branch'):
413 mode = b'auto'
414 else:
415 mode = b'none'
416 caps.add(b'ext-topics-publish=%s' % mode)
412 return caps 417 return caps
413 418
414 def commit(self, *args, **kwargs): 419 def commit(self, *args, **kwargs):
415 configoverride = util.nullcontextmanager() 420 configoverride = util.nullcontextmanager()
416 if self.currenttopic != self[b'.'].topic(): 421 if self.currenttopic != self[b'.'].topic():