##// END OF EJS Templates
py3: fixed mercurial clone
super-admin -
r1052:d4272d07 python3
parent child Browse files
Show More
@@ -175,7 +175,7 b' def _call_hook(hook_name, extras, writer'
175
175
176
176
177 def _extras_from_ui(ui):
177 def _extras_from_ui(ui):
178 hook_data = ui.config('rhodecode', 'RC_SCM_DATA')
178 hook_data = ui.config(b'rhodecode', b'RC_SCM_DATA')
179 if not hook_data:
179 if not hook_data:
180 # maybe it's inside environ ?
180 # maybe it's inside environ ?
181 env_hook_data = os.environ.get('RC_SCM_DATA')
181 env_hook_data = os.environ.get('RC_SCM_DATA')
@@ -94,13 +94,14 b' class HgWeb(mercurial.hgweb.hgweb_mod.hg'
94
94
95 def _runwsgi(self, req, res, repo):
95 def _runwsgi(self, req, res, repo):
96
96
97 cmd = req.qsparams.get('cmd', '')
97 cmd = req.qsparams.get(b'cmd', '')
98 if not mercurial.wireprotoserver.iscmd(cmd):
98 if not mercurial.wireprotoserver.iscmd(cmd):
99 # NOTE(marcink): for unsupported commands, we return bad request
99 # NOTE(marcink): for unsupported commands, we return bad request
100 # internally from HG
100 # internally from HG
101 log.warning('cmd: `%s` is not supported by the mercurial wireprotocol v1', cmd)
101 from mercurial.hgweb.common import statusmessage
102 from mercurial.hgweb.common import statusmessage
102 res.status = statusmessage(mercurial.hgweb.common.HTTP_BAD_REQUEST)
103 res.status = statusmessage(mercurial.hgweb.common.HTTP_BAD_REQUEST)
103 res.setbodybytes('')
104 res.setbodybytes(b'')
104 return res.sendresponse()
105 return res.sendresponse()
105
106
106 return super(HgWeb, self)._runwsgi(req, res, repo)
107 return super(HgWeb, self)._runwsgi(req, res, repo)
General Comments 0
You need to be logged in to leave comments. Login now