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.
--- a/mercurial/hgweb/hgweb_mod.py Wed Sep 09 09:07:27 2015 -0700
+++ b/mercurial/hgweb/hgweb_mod.py Sat Aug 22 16:41:02 2015 -0700
@@ -238,7 +238,6 @@
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 @@
# mtime is needed for ETag
self.mtime = mtime
+ self.websubtable = webutil.getwebsubs(r)
+
def run(self):
"""Start a server from CGI environment.