Patchwork D3343: hgweb: these strings should be sysstrs, not bytes

login
register
mail settings
Submitter phabricator
Date April 16, 2018, 11:21 p.m.
Message ID <c897b4b950088776b793f7af307b8946@localhost.localdomain>
Download mbox | patch
Permalink /patch/31126/
State Not Applicable
Headers show

Comments

phabricator - April 16, 2018, 11:21 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGa1110db1e455: hgweb: these strings should be sysstrs, not bytes (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3343?vs=8311&id=8337

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

AFFECTED FILES
  mercurial/hgweb/common.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/hgweb/common.py b/mercurial/hgweb/common.py
--- a/mercurial/hgweb/common.py
+++ b/mercurial/hgweb/common.py
@@ -133,7 +133,8 @@ 
 
 def _statusmessage(code):
     responses = httpserver.basehttprequesthandler.responses
-    return responses.get(code, ('Error', 'Unknown error'))[0]
+    return pycompat.bytesurl(
+        responses.get(code, (r'Error', r'Unknown error'))[0])
 
 def statusmessage(code, message=None):
     return '%d %s' % (code, message or _statusmessage(code))