[PATCH evolve-ext] fold: allow folding one revision with --exact if rewriting is necessary

Pierre-Yves David pierre-yves.david at ens-lyon.org
Wed Mar 9 09:08:16 EST 2016



On 03/07/2016 05:47 PM, Siddharth Agarwal wrote:
> On 3/7/16 07:57, Pierre-Yves David wrote:
>>
>>
>> On 03/02/2016 01:01 AM, Siddharth Agarwal wrote:
>>> # HG changeset patch
>>> # User Siddharth Agarwal <sid0 at fb.com>
>>> # Date 1456876756 28800
>>> #      Tue Mar 01 15:59:16 2016 -0800
>>> # Branch stable
>>> # Node ID def16bbc29a4c23ea7dd2dcb00abbcaa6e89b575
>>> # Parent  160968654581eb83f58f2b913124a16f7bef56ee
>>> fold: allow folding one revision with --exact if rewriting is necessary
>>
>> I'm not super enthousiastic at the idea of seeing `hg fold` used as a
>> command to rewrite a random commit meta-data. I'll have to think about
>> it a bit more.
>
> FWIW, I believe the requirements should be:
> - allow rewriting one or rewriting + combining a linear series of
> multiple changesets in the same command
> - lets you rewrite all commit metadata
> - do it to any series of non-public commits in the DAG even if unrelated
> to the working copy
> - the operation shouldn't trigger any merge logic
>
> I'm ok with a new 'hg rewrite' command or similar, but I thought that
> 'fold' was a fairly straightforward fit.

Git have a "git filter branch" stuff that do this kind of magic iirc.

* Having for batched metadata rewrite in evolve make sense.

* I would rather gain a new command for now that expand "fold" role too 
far. My current approach for evolve UI experimentation is to focus on a 
single usecase/semantic for each command. Then we'll have all the 
feature we need we can start thinking how to reorganised thing in less 
commands while keeping them with a fairly weel defined semantic.

Feel free to send patch for a metadata update command.

Cheers,

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list