[PATCH] revset: add ^ and ~ operators from parentrevspec extension

Sune Foldager cryo at cyanite.org
Sat Apr 30 11:00:01 CDT 2011


On 30-04-2011 17:57, Kevin Gessner wrote:
> On Apr 30, 2011, at 5:54 PM, Sune Foldager wrote:
>
>> On 30-04-2011 17:50, Kevin Gessner wrote:
>>> # HG changeset patch
>>> # User Kevin Gessner<kevin at kevingessner.com>
>>> # Date 1304178184 -7200
>>> # Node ID 807f6a98276777adab4c0895e585ce15f1dfff07
>>> # Parent  bcfe78c3d15c928cd0ab80625c640c81a0ae7d62
>>> revset: add ^ and ~ operators from parentrevspec extension
>>
>> (slightly) unfortunate that the two operators, together with&  and |, look like logical negation operators instead. One might expect
>>
>> ~(a | b),
>>
>> which is pretty standard syntax for 'not'...
>
> True. But you'll get a parse error (like "~ is not a prefix operator"), rather than bogus output. And we're dealing with sets, here, rather than boolean algebra; it's shame the union "∪" and intersection "∩" are so hard to type, as they'd be more correct for | and&.

Well, a set algebra is a boolean algebra, so "not" is well-defined as 
set-complement. Anyway, I just realize we already have not as ! which is 
also pretty standard syntax.

/Sune



More information about the Mercurial-devel mailing list