# HG changeset patch # User Gregory Szorc # Date 2015-08-22 23:54:52 # Node ID 7917746c9a670349808400b35fe6e6fafe622d71 # Parent c87566ac3c498b3355c3c95f2a878749eb4853c7 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. diff --git a/mercurial/hgweb/hgweb_mod.py b/mercurial/hgweb/hgweb_mod.py --- a/mercurial/hgweb/hgweb_mod.py +++ b/mercurial/hgweb/hgweb_mod.py @@ -324,7 +324,7 @@ class hgweb(object): 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.