comparison mercurial/hgweb/hgweb_mod.py @ 34702:b2316265a32e

hgweb: rewrite two X or Y and Z ad-hoc ternaries with Y if X else Z Just easier to muddle through for my brain now that I don't see the old pattern much anymore. Differential Revision: https://phab.mercurial-scm.org/D1077
author Augie Fackler <augie@google.com>
date Thu, 05 Oct 2017 14:48:31 -0400
parents c2cb6be4212f
children d1fccbd50fcd
comparison
equal deleted inserted replaced
34701:6db536bed7ec 34702:b2316265a32e
185 styles, (style, mapfile) = getstyle(req, self.config, 185 styles, (style, mapfile) = getstyle(req, self.config,
186 self.templatepath) 186 self.templatepath)
187 if style == styles[0]: 187 if style == styles[0]:
188 vars['style'] = style 188 vars['style'] = style
189 189
190 start = req.url[-1] == '?' and '&' or '?' 190 start = '&' if req.url[-1] == '?' else '?'
191 sessionvars = webutil.sessionvars(vars, start) 191 sessionvars = webutil.sessionvars(vars, start)
192 192
193 if not self.reponame: 193 if not self.reponame:
194 self.reponame = (self.config('web', 'name', '') 194 self.reponame = (self.config('web', 'name', '')
195 or req.env.get('REPO_NAME') 195 or req.env.get('REPO_NAME')