Syntax for "hg fold"

Pierre-Yves David pierre-yves.david at ens-lyon.org
Tue Jun 3 21:54:38 UTC 2014



On 06/03/2014 11:35 AM, Ingo von Borstel wrote:
> Am 03.06.2014 19:17, schrieb Greg Ward:
>> On 02 June 2014, Pierre-Yves David said:
>>> Currently: `hg fold X` and `hg fold --rev X` have different
>>> behavior (yes this is something we needs to improve)
>>
>> Yes, that's what I am proposing. 'fold' should just take the list
>> of revisions you want to fold, and not do any funny business like
>> "revisions from your current working directory to the given one".
>> It's one of those things that feels obviously right when you right
>> the code, but actually makes things harder to explain. If it's hard
>> to explain, it's probably the wrong interface.
>
> I have to agree with this. I wasn't aware of this difference and it's
> surely not obvious.
>
> If one needs the idea of "fold everything from XXX to checkout", a
> slightly more explicit naming would make sense, e.g. like
> hg fold --from XXX
> hg fold --start XXX


The current state is know to be confusing and bad.

Initially the behavior was `hg fold <revset>` fold everything in 
<revset> but it proved to a be a far less common case than "fold me with 
my parent" (or my grand parent)

So we should focus on a better flag for the --fold-all-in-this-revset 
version.

-- 
Pierre-Yves David



More information about the Evolve-testers mailing list