[PATCH 2 of 5 hgweb-thread-isolation] hgweb: regenerate web substitutions when repo is refreshed
Augie Fackler
raf at durin42.com
Tue Sep 8 11:58:00 CDT 2015
On Thu, Sep 03, 2015 at 04:16:17PM -0700, Gregory Szorc wrote:
> # HG changeset patch
> # User Gregory Szorc <gregory.szorc at gmail.com>
> # Date 1440286862 25200
> # Sat Aug 22 16:41:02 2015 -0700
> # Node ID 305b554e1ec3be68e6ca28022c2bc243845a4a8d
> # Parent b0e667395fd4c0dbd24d597fd81ce5c7f13b8b3f
> hgweb: regenerate web substitutions when repo is refreshed
Queued patch 1, but this one no longer applies cleanly. I'll drop 2-5
and watch for a resend.
>
> 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,9 +238,8 @@ class hgweb(object):
> hook.redirect(True)
> 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
> values are ``served``, ``visible`` and ``all``. Default is ``served``.
> @@ -278,8 +277,10 @@ class hgweb(object):
> self.repostate = repostate
> # mtime is needed for ETag
> self.mtime = st.st_mtime
>
> + self.websubtable = webutil.getwebsubs(r)
> +
> def run(self):
> """Start a server from CGI environment.
>
> Modern servers should be using WSGI and should avoid this
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel
More information about the Mercurial-devel
mailing list