[PATCH] revset: add hook after tree parsing

Pierre-Yves David pierre-yves.david at ens-lyon.org
Mon Mar 30 17:37:02 CDT 2015



On 03/30/2015 03:28 PM, Matt Mackall wrote:
> On Mon, 2015-03-30 at 13:08 -0700, Laurent Charignon wrote:
>> # HG changeset patch
>> # User Laurent Charignon <lcharignon at fb.com>
>> # Date 1427232295 25200
>> #      Tue Mar 24 14:24:55 2015 -0700
>> # Node ID 3ca44121d0afad1aee19675e45ae78d4bbef3cf1
>> # Parent  5b85a5bc5bbb9d8365953609d98e4dce7110e9b0
>> revset: add hook after tree parsing
>>
>> This will be useful to execute actions after the tree is parsed and before the
>> revset returns a match. It can be used to enable direct hash access of revs
>> that are hidden.
>
> This is not very clear. Apparently "enable direct hash access of revs
> that are hidden" means "a user can do hg log -r <hiddenhash> without the
> --hidden flag", amirite?
>
> And I guess you'll do this by walking the parse tree and finding nodes
> of the form ('symbol', 'abcd') and unhiding them before evaluating the
> revset, right? This would be very hard for anyone to guess who wasn't
> already vaguely aware of what you were working on.

The actual logic about that  lives into a dedicated extension in evolve, 
discussion regarding this should probably happen on of patch touching 
this extension. I do not believe more context is required in this hook.

> What about revision numbers and other symbols?

The current plan (and implementation) implement direct access for 
explicit hash only. I think this a good minimalist version that will 
achieve our goal here (have a simple UI for git-refugee to access hidden 
changesets until the evolve UI is more polished and full featured).

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list