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

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Sat Apr 14 04:31:51 UTC 2018


durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

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
@@ -131,7 +131,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
Cc: mercurial-devel


More information about the Mercurial-devel mailing list