D1078: hgweb: use native strings consistently for querystring parsing

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Sat Oct 14 17:03:34 EDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rHGd1fccbd50fcd: hgweb: use native strings consistently for querystring parsing (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1078?vs=2742&id=2754

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

AFFECTED FILES
  mercurial/hgweb/hgweb_mod.py
  mercurial/hgweb/hgwebdir_mod.py

CHANGE DETAILS

diff --git a/mercurial/hgweb/hgwebdir_mod.py b/mercurial/hgweb/hgwebdir_mod.py
--- a/mercurial/hgweb/hgwebdir_mod.py
+++ b/mercurial/hgweb/hgwebdir_mod.py
@@ -508,7 +508,7 @@
         if style == styles[0]:
             vars['style'] = style
 
-        start = '&' if url[-1] == '?' else '?'
+        start = r'&' if url[-1] == r'?' else r'?'
         sessionvars = webutil.sessionvars(vars, start)
         logourl = config('web', 'logourl')
         logoimg = config('web', 'logoimg')
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
@@ -187,7 +187,7 @@
         if style == styles[0]:
             vars['style'] = style
 
-        start = '&' if req.url[-1] == '?' else '?'
+        start = r'&' if req.url[-1] == r'?' else r'?'
         sessionvars = webutil.sessionvars(vars, start)
 
         if not self.reponame:



To: durin42, #hg-reviewers, indygreg
Cc: mercurial-devel


More information about the Mercurial-devel mailing list