diff mercurial/hgweb/hgwebdir_mod.py @ 36863:1a1972b1a1ff

hgweb: use our new request object for "style" parameter The "style" parameter is kind of wonky because it is explicitly set and has lookups in random locations. Let's port it to qsparams first because it isn't straightforward. There is subtle change in behavior. But I don't think it is worth calling out in a BC. Our multidict's __getitem__ returns the last set value for a key, not the first. So if the query string set a variable multiple times, before we would get the first value and now we would get the last value. It makes no sense to specify these things multiple times. And I think last write wins is more sensible than first write wins. Differential Revision: https://phab.mercurial-scm.org/D2779
author Gregory Szorc <gregory.szorc@gmail.com>
date Sat, 10 Mar 2018 11:46:52 -0800
parents da4e2f87167d
children 3d60a22e27f5
line wrap: on
line diff
--- a/mercurial/hgweb/hgwebdir_mod.py	Sat Mar 10 12:35:38 2018 -0800
+++ b/mercurial/hgweb/hgwebdir_mod.py	Sat Mar 10 11:46:52 2018 -0800
@@ -510,7 +510,7 @@
             url += '/'
 
         vars = {}
-        styles, (style, mapfile) = hgweb_mod.getstyle(wsgireq, config,
+        styles, (style, mapfile) = hgweb_mod.getstyle(wsgireq.req, config,
                                                       self.templatepath)
         if style == styles[0]:
             vars['style'] = style