[RFC] revision sets

Nicolas Dumazet nicdumz at gmail.com
Tue Apr 20 19:45:23 CDT 2010


Hello!

I'm very interested in those ideas :)

2010/4/21 Greg Ward <greg-hg at gerg.ca>:
>> Further, we'd be able to add lots of interesting primitives:
>>
>>  hg log -r "descendant(parent2(1.0)) and ancestor(2.0) and
>> author(george) and sorted(date) and reversed()"
>>
>> Read that as: every cset that is descended from the second parent of
>> revision 1.0 and is also an ancestor of 2.0 and was written by george,
>> sorted by date in reverse order.
>
> I was right with you up until sorted() and reversed().  The others are
> predicates, which makes sense... and then you introduce something that
> *looks* like a predicate but actually has a completely different
> effect.

Same feeling here.
We must have a clear way to separate revision predicates that allow
selection, and other sorting/ordering structures

It could be a simple column, or semi-column?
* "descendant(parent2(1.0)) and ancestor(2.0) and author(george)
[separator] date, reversed"
* "descendant(parent2(1.0)) and ancestor(2.0) and author(george)
[separator] sorted(date, reversed)"

By the way, this sort of syntax could allow chaining constructs:
" selection : sort : selection : sort "

"descendant(parent2(1.0)) and ancestor(2.0) and author(george) :
sort(date, reversed) : even() and not(merge()) : sort(author)"

I know, use cases are getting rare =)

Cheers,
-- 
Nicolas Dumazet — NicDumZ


More information about the Mercurial-devel mailing list