# HG changeset patch # User Gregory Szorc # Date 2015-08-23 00:04:24 # Node ID 7c759f1a056fc81fc5d0c9c29cc6a56c41d4696a # Parent 7917746c9a670349808400b35fe6e6fafe622d71 hgweb: add reponame to requestcontext We have to use object.__setattr__ until the app proxy is gone. 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 @@ -69,6 +69,7 @@ class requestcontext(object): def __init__(self, app): object.__setattr__(self, 'app', app) object.__setattr__(self, 'repo', app.repo) + object.__setattr__(self, 'reponame', app.reponame) object.__setattr__(self, 'archives', ('zip', 'gz', 'bz2')) @@ -176,9 +177,10 @@ class requestcontext(object): sessionvars = webutil.sessionvars(vars, start) if not self.reponame: - self.reponame = (self.config('web', 'name') - or req.env.get('REPO_NAME') - or req.url.strip('/') or self.repo.root) + object.__setattr__(self, 'reponame', + (self.config('web', 'name') + or req.env.get('REPO_NAME') + or req.url.strip('/') or self.repo.root)) def websubfilter(text): return websub(text, self.websubtable)