changeset 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
files mercurial/hgweb/hgweb_mod.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hgweb/hgweb_mod.py	Sat Aug 22 16:44:36 2015 -0700
+++ b/mercurial/hgweb/hgweb_mod.py	Sat Aug 22 16:54:52 2015 -0700
@@ -324,7 +324,7 @@
                     raise ErrorResponse(HTTP_NOT_FOUND)
                 if cmd in perms:
                     self.check_perm(rctx, req, perms[cmd])
-                return protocol.call(self.repo, req, cmd)
+                return protocol.call(rctx.repo, req, cmd)
             except ErrorResponse as inst:
                 # A client that sends unbundle without 100-continue will
                 # break if we respond early.