Commit fa645e70 authored by Anton Shestakov's avatar Anton Shestakov
Browse files

topic: add more variables to make a condition fit on one line

--HG--
branch : stable
parent d46cd7cfff39
Pipeline #22148 passed with stage
in 4 minutes and 19 seconds
......@@ -590,7 +590,9 @@ def reposetup(ui, repo):
topicmodeserver = self.ui.config(b'experimental',
b'topic-mode.server', b'ignore')
ispush = (desc.startswith(b'push') or desc.startswith(b'serve'))
publishbare = self.ui.configbool(b'experimental',
b'topic.publish-bare-branch')
ispush = desc.startswith((b'push', b'serve'))
if (topicmodeserver != b'ignore' and ispush):
if util.safehasattr(tr, 'validator'): # hg <= 4.7 (ebbba3ba3f66)
origvalidator = tr.validator
......@@ -616,10 +618,7 @@ def reposetup(ui, repo):
else:
tr.addvalidator(b'000-reject-untopiced', _validate)
elif (self.ui.configbool(b'experimental', b'topic.publish-bare-branch')
and (desc.startswith(b'push')
or desc.startswith(b'serve'))
):
elif publishbare and ispush:
origclose = tr.close
trref = weakref.ref(tr)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment