# HG changeset patch # User Gregory Szorc # Date 2015-08-22 23:41:02 # Node ID 13d664127ee9ea65b8d8f0c47a16fe1d06a554e1 # Parent ab1c6e4efda47281b14a4f5a46cc0d4a114fff7d hgweb: regenerate web substitutions when repo is refreshed Previously, changes to the configuration would not be picked up by a running server. That feels like a bug. Regenerate the web substitutions table when the repository changes. 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 @@ -238,7 +238,6 @@ class hgweb(object): self.repostate = None self.mtime = -1 self.reponame = name - self.websubtable = webutil.getwebsubs(r) def _getview(self, repo): """The 'web.view' config controls changeset filter to hgweb. Possible @@ -280,6 +279,8 @@ class hgweb(object): # mtime is needed for ETag self.mtime = mtime + self.websubtable = webutil.getwebsubs(r) + def run(self): """Start a server from CGI environment.