[PATCH] move tags.cache and branchheads.cache to a collected cache folder .hg/caches/

Adrian Buehlmann adrian at cadifra.com
Sun Dec 26 03:33:02 CST 2010

On 2010-12-25 11:46, Adrian Buehlmann wrote:
> On 2010-12-24 23:22, Jason Harris wrote:
>> # HG changeset patch
>> # User jfh <jason at jasonfharris.com>
>> # Date 1293195683 -3600
>> # Node ID 53a4b25e7165c3842c8cd9e376a4240738070aab
>> # Parent  5314cbb775f6e2034be96bc64a54a0ec7c553a19
>> move tags.cache and branchheads.cache to a collected cache folder .hg/caches/
>> The generation of cache files like tags.cache and branchheads.cache is not an
>> actual reflection of things changing in the whole of the .hg directory (like eg
>> a commit or a rebase or something) but instead these cache files are just part
>> of bookkeeping. As such its convienant to allow various clients to ignore file
>> events to do with these cache files which would otherwise cause a double
>> refresh. Eg one refresh might occur after a commit, but the act of refreshing
>> after the commit would cause Mercurial to generate a new branchheads.cache which
>> would then cause a second refresh, for clients.
>> However if these cache files are moved into a directory like eg .hg/caches/ then
>> GUI clients on OSX (and possibly other platforms) can happily ignore file events
>> in this cache directory.
> Sounds reasonable.
> Perhaps you can implement it a bit differently though. See inline
> comment below

I just noticed your patch also misses to adapt a couple of test cases.

A search for '.cache' inside the *.t files of the tests directory will
show you which ones.

More information about the Mercurial-devel mailing list