##// 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 error,
34 error,
35 hg,
35 hg,
36 profiling,
36 profiling,
37 pycompat,
37 scmutil,
38 scmutil,
38 templater,
39 templater,
39 ui as uimod,
40 ui as uimod,
@@ -106,7 +107,7 b' def geturlcgivars(baseurl, port):'
106 if not path.startswith('/'):
107 if not path.startswith('/'):
107 path = '/' + path
108 path = '/' + path
108
109
109 return name, str(port), path
110 return name, pycompat.bytestr(port), path
110
111
111 class hgwebdir(object):
112 class hgwebdir(object):
112 """HTTP server for multiple repositories.
113 """HTTP server for multiple repositories.
@@ -293,7 +294,7 b' class hgwebdir(object):'
293 msg = encoding.strtolocal(inst.strerror)
294 msg = encoding.strtolocal(inst.strerror)
294 raise ErrorResponse(HTTP_SERVER_ERROR, msg)
295 raise ErrorResponse(HTTP_SERVER_ERROR, msg)
295 except error.RepoError as inst:
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 # browse subdirectories
299 # browse subdirectories
299 subdir = virtual + '/'
300 subdir = virtual + '/'
@@ -53,7 +53,7 b" testmod('mercurial.dispatch')"
53 testmod('mercurial.encoding')
53 testmod('mercurial.encoding')
54 testmod('mercurial.formatter')
54 testmod('mercurial.formatter')
55 testmod('mercurial.hg')
55 testmod('mercurial.hg')
56 testmod('mercurial.hgweb.hgwebdir_mod', py3=False) # py3: repr(bytes) ?
56 testmod('mercurial.hgweb.hgwebdir_mod')
57 testmod('mercurial.match')
57 testmod('mercurial.match')
58 testmod('mercurial.mdiff')
58 testmod('mercurial.mdiff')
59 testmod('mercurial.minirst')
59 testmod('mercurial.minirst')
General Comments 0
You need to be logged in to leave comments. Login now