##// END OF EJS Templates
py3: remove use of str() in hgwebdir...
Yuya Nishihara -
r34354:8cbcee0b default
parent child Browse files
Show More
@@ -34,6 +34,7 b' from .. import ('
34 34 error,
35 35 hg,
36 36 profiling,
37 pycompat,
37 38 scmutil,
38 39 templater,
39 40 ui as uimod,
@@ -106,7 +107,7 b' def geturlcgivars(baseurl, port):'
106 107 if not path.startswith('/'):
107 108 path = '/' + path
108 109
109 return name, str(port), path
110 return name, pycompat.bytestr(port), path
110 111
111 112 class hgwebdir(object):
112 113 """HTTP server for multiple repositories.
@@ -293,7 +294,7 b' class hgwebdir(object):'
293 294 msg = encoding.strtolocal(inst.strerror)
294 295 raise ErrorResponse(HTTP_SERVER_ERROR, msg)
295 296 except error.RepoError as inst:
296 raise ErrorResponse(HTTP_SERVER_ERROR, str(inst))
297 raise ErrorResponse(HTTP_SERVER_ERROR, bytes(inst))
297 298
298 299 # browse subdirectories
299 300 subdir = virtual + '/'
@@ -53,7 +53,7 b" testmod('mercurial.dispatch')"
53 53 testmod('mercurial.encoding')
54 54 testmod('mercurial.formatter')
55 55 testmod('mercurial.hg')
56 testmod('mercurial.hgweb.hgwebdir_mod', py3=False) # py3: repr(bytes) ?
56 testmod('mercurial.hgweb.hgwebdir_mod')
57 57 testmod('mercurial.match')
58 58 testmod('mercurial.mdiff')
59 59 testmod('mercurial.minirst')
General Comments 0
You need to be logged in to leave comments. Login now