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

Jason Harris jason.f.harris at gmail.com
Sun Dec 26 06:14:22 CST 2010


On Dec 26, 2010, at 10:33 AM, Adrian Buehlmann wrote:

> 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.

Thanks. I will push a combined patch with the test case changes.

Cheers,
  Jas




More information about the Mercurial-devel mailing list