diff mercurial/hgweb/webcommands.py @ 35323:1fe3c8296cfe

hgweb: rewrite `template = A and B or C` to be a proper ternary operator
author Anton Shestakov <av6@dwimlabs.net>
date Fri, 08 Dec 2017 22:27:14 +0800
parents d61f2a3d5e53
children b963750b125f
line wrap: on
line diff
--- a/mercurial/hgweb/webcommands.py	Wed Dec 06 18:37:49 2017 -0800
+++ b/mercurial/hgweb/webcommands.py	Fri Dec 08 22:27:14 2017 +0800
@@ -413,7 +413,7 @@
     else:
         nextentry = []
 
-    return tmpl(shortlog and 'shortlog' or 'changelog', changenav=changenav,
+    return tmpl('shortlog' if shortlog else 'changelog', changenav=changenav,
                 node=ctx.hex(), rev=pos, symrev=symrev, changesets=count,
                 entries=entries,
                 latestentry=latestentry, nextentry=nextentry,