hg diff --branch

Martin Geisler mg at daimi.au.dk
Sun Feb 15 08:02:44 CST 2009


Stepan Koltsov <yozh at mx1.ru> writes:

> 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)'

Good point, I hadn't thought of that.

> :: does not clash with : , because revision cannot be empty string.
>
> Function-call-like syntax is harder to parse, and requires more
> typing to user.

But can you quickly tell me what

  ancestor::parent::a:branch-base::b

does?

-- 
Martin Geisler

VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/.


More information about the Mercurial-devel mailing list