[issue2263] hgweb cache doesn't take into account bookmark modifications

Brodie Rao bugs at mercurial.selenic.com
Thu Jul 1 01:01:13 UTC 2010


New submission from Brodie Rao <brodie at bitheap.org>:

If "hg serve" is running and someone modifies .hg/bookmarks, these changes 
aren't reflected in listkeys. hgweb only checks .hg/store's mtime to 
determine whether or not to invalidate its cache.

Test case:

$ hg init foo
$ cd foo
$ echo a > a
$ hg ci -Am a
$ hg serve

In another terminal:

$ hg clone http://localhost:8000/ bar 
$ cd foo
$ hg bookmark test
$ cd ../bar
$ hg in -B
comparing with http://localhost:8000/
searching for changes
no changes found

I initially thought localrepo could grow a new attribute to complement 
spath. It would contain a list alternative stores (.hg/bookmarks in this 
case) that extensions could add to and that hgweb would check instead of 
spath. But this doesn't work if hgweb isn't running bookmarks.

Perhaps hgewb could just check .hg/'s mtime? Or, if that's not ideal, a list 
of alternate stores could be kept in .hg/altstores and hgweb could check 
there. When bookmarks creates .hg/bookmarks it can add that path altstores.

----------
messages: 12957
nosy: brodie, djc, mpm
priority: bug
status: unread
title: hgweb cache doesn't take into account bookmark modifications
topic: bookmarks, hgweb

____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue2263>
____________________________________________________


More information about the Mercurial-devel mailing list