[PATCH 4 of 4 NEW-CONCEPT] track-tags: write all tag changes to a file

Pierre-Yves David pierre-yves.david at ens-lyon.org
Wed Apr 5 19:09:47 EDT 2017



On 04/05/2017 10:54 PM, Jun Wu wrote:
> I don't think "writing things that hook *may* need to filesystem" is a good
> approach. It introduces unnecessary overhead if the hook does not need that
> information.

I do not find the overhead concerning.

The thing to keep in mind is that if they are many things to write down, 
this also means many thing changed during the transaction. So the 
overhead is likely minimal. In the tags cases, just updating the various 
tags related cache is going to be much more expensive that writing this 
to disk.

> I think a better way is to have per-hook config to let hooks explicitly
> declare what they need, before we run them.

I afraid it is too fragile. Forgetting to configure the hook properly 
will be easy and the error will likely pass silently as hook will run 
normally with the same data as if the transaction touched no tags.

Cheers,

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list