comparison mercurial/hgweb/hgweb_mod.py @ 26209:7917746c9a67

hgweb: don't access self.repo during request processing We want all repository accesses to go through requestcontext.repo so the request is isolated from the application.
author Gregory Szorc <gregory.szorc@gmail.com>
date Sat, 22 Aug 2015 16:54:52 -0700
parents c87566ac3c49
children 7c759f1a056f
comparison
equal deleted inserted replaced
26208:c87566ac3c49 26209:7917746c9a67
322 try: 322 try:
323 if query: 323 if query:
324 raise ErrorResponse(HTTP_NOT_FOUND) 324 raise ErrorResponse(HTTP_NOT_FOUND)
325 if cmd in perms: 325 if cmd in perms:
326 self.check_perm(rctx, req, perms[cmd]) 326 self.check_perm(rctx, req, perms[cmd])
327 return protocol.call(self.repo, req, cmd) 327 return protocol.call(rctx.repo, req, cmd)
328 except ErrorResponse as inst: 328 except ErrorResponse as inst:
329 # A client that sends unbundle without 100-continue will 329 # A client that sends unbundle without 100-continue will
330 # break if we respond early. 330 # break if we respond early.
331 if (cmd == 'unbundle' and 331 if (cmd == 'unbundle' and
332 (req.env.get('HTTP_EXPECT', 332 (req.env.get('HTTP_EXPECT',