Patchwork [4,of,4,V2] hgweb: also monitor change to bookmarks

login
register
mail settings
Submitter Pierre-Yves David
Date July 3, 2015, 6:29 p.m.
Message ID <dc6d4bd2372ad6adbd42.1435948147@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/9889/
State Accepted
Headers show

Comments

Pierre-Yves David - July 3, 2015, 6:29 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@fb.com>
# Date 1435733722 25200
#      Tue Jun 30 23:55:22 2015 -0700
# Node ID dc6d4bd2372ad6adbd420c01553a6cecb61d544c
# Parent  5348203dbc672e64dec0ba2e3271ea4a5d90c597
hgweb: also monitor change to bookmarks

This make change to bookmark visible to hgweb through the official way. There
is not changes to test because there is currently another hack in place to
ensure the same behavior. See next changeset for details.
Matt Mackall - July 7, 2015, 7:48 p.m.
On Fri, 2015-07-03 at 11:29 -0700, Pierre-Yves David wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david@fb.com>
> # Date 1435733722 25200
> #      Tue Jun 30 23:55:22 2015 -0700
> # Node ID dc6d4bd2372ad6adbd420c01553a6cecb61d544c
> # Parent  5348203dbc672e64dec0ba2e3271ea4a5d90c597
> hgweb: also monitor change to bookmarks

These are queued, but I suspect we need to unify this mechanism with the
stronger cache checks already used by the command server.

Also, bear in mind that these are only relevant to (relatively rare)
single-repo hgweb, since we don't yet keep a repo object between
requests for hgwebdir.

Patch

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
@@ -30,10 +30,11 @@  perms = {
 # used to check if the repository has changed looking at mtime and size of
 # theses files.  This should probably be relocated a bit higher in core
 foi = [('spath', '00changelog.i'),
        ('spath', 'phaseroots'), # ! phase can change content at the same size
        ('spath', 'obsstore'),
+       ('path', 'bookmarks'), # ! bookmark can change content at the same size
       ]
 
 def makebreadcrumb(url, prefix=''):
     '''Return a 'URL breadcrumb' list