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

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Mon Apr 16 19:21:25 EDT 2018


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

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))



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


More information about the Mercurial-devel mailing list