Mercurial > evolve
changeset 5930:8d36bfe9968a stable
topic: add more variables to make a condition fit on one line
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Wed, 19 May 2021 16:28:47 +0800 |
parents | d46cd7cfff39 |
children | 6357551cb66f |
files | hgext3rd/topic/__init__.py |
diffstat | 1 files changed, 4 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/topic/__init__.py Wed May 19 10:18:43 2021 +0800 +++ b/hgext3rd/topic/__init__.py Wed May 19 16:28:47 2021 +0800 @@ -590,7 +590,9 @@ 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 @@ 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)