# HG changeset patch # User Anton Shestakov # Date 1621412927 -28800 # Node ID 8d36bfe9968a3f8a4f9d5eb096e82ee2f692013c # Parent d46cd7cfff396086e6f4279f940724d63d04724c topic: add more variables to make a condition fit on one line diff -r d46cd7cfff39 -r 8d36bfe9968a hgext3rd/topic/__init__.py --- 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)