[Updated] D8898: hgweb: simplify a constant-length list by converting to literal tuple

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Thu Aug 6 00:49:40 UTC 2020


Closed by commit rHG2901133ec982: hgweb: simplify a constant-length list by converting to literal tuple (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D8898?vs=22280&id=22296

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D8898/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D8898

AFFECTED FILES
  mercurial/hgweb/hgweb_mod.py

CHANGE DETAILS

diff --git a/mercurial/hgweb/hgweb_mod.py b/mercurial/hgweb/hgweb_mod.py
--- a/mercurial/hgweb/hgweb_mod.py
+++ b/mercurial/hgweb/hgweb_mod.py
@@ -79,8 +79,7 @@
                 and pycompat.osaltsep in style
             ):
                 continue
-            locations = [os.path.join(style, b'map'), b'map-' + style]
-            locations.append(b'map')
+            locations = (os.path.join(style, b'map'), b'map-' + style, b'map')
 
             for location in locations:
                 mapfile = os.path.join(path, location)



To: martinvonz, #hg-reviewers, indygreg
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20200806/d25cecba/attachment-0002.html>


More information about the Mercurial-patches mailing list