hg diff --branch

Stepan Koltsov yozh at mx1.ru
Sun Feb 15 07:50:02 CST 2009


On Sun, Feb 15, 2009 at 16:27, Martin Geisler <mg at daimi.au.dk> wrote:
>>> please review my patch. I really need this functionality every day :)
>>
>> I think the functionality is great, however I don't like the approach.
>> We've already got too many options. Imagine instead the power of an
>> improved revision specification syntax:
>>
>> hg diff -r branch-base::.
>
> I think the "::" syntax clashes a bit too much with the ":" range
> syntax, and I would suggest using normal parenthesis as in function
> calls:
>
>  parent(.)
>  ancestor(a,b)
>
> I think that will be easier to parse, especially in more complicated
> expressions.

braces are special symbols in shell. In bash

echo parent(6)

produces error. It must be written as:

echo 'parent(6)'

:: does not clash with : , because revision cannot be empty string.

Function-call-like syntax is harder to parse, and requires more typing to user.

S.


More information about the Mercurial-devel mailing list