Patchwork D8844: templater: stop accepting a single style to stylemap()

login
register
mail settings
Submitter phabricator
Date July 29, 2020, 6:24 p.m.
Message ID <differential-rev-PHID-DREV-7apaju5h62baqu62h4mm-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/46933/
State Superseded
Headers show

Comments

phabricator - July 29, 2020, 6:24 p.m.
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  The code seems to have been for compatibility across d3dbdca92458 <https://phab.mercurial-scm.org/rHGd3dbdca92458a522f41c0ccdc0c8d46865ee79c8>
  (hgweb: don't choke when an inexistent style is requested (issue1901),
  2009-11-12).

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/templater.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/templater.py b/mercurial/templater.py
--- a/mercurial/templater.py
+++ b/mercurial/templater.py
@@ -1089,9 +1089,6 @@ 
     if path is None:
         path = templatedir()
 
-    if isinstance(styles, bytes):
-        styles = [styles]
-
     if path is not None:
         for style in styles:
             # only plain name is allowed to honor template paths