[RFC] revision sets

Matt Mackall mpm at selenic.com
Mon Apr 19 23:23:18 CDT 2010


On Tue, 2010-04-20 at 01:53 +0200, Benoit Boissinot wrote:
> On Mon, Apr 19, 2010 at 05:32:41PM -0500, Matt Mackall wrote:
> > I've been talking about expanding this into a more powerful system that
> > would allow specifying dates, keywords, branches, etc. My current
> > thought is to make it look like this:
> > 
> >  hg log -r "branch(foo) and keyword(bar) and date(mar 1 - apr 1)"
> > 
> > Which would be identical to:
> > 
> >  hg log -b foo -k bar -d "mar 1 - apr 1"
> > 
> > but would magically work anywhere -r ranges were accepted (export, push,
> > etc.).
> 
> for push, it's a bit different. If a range is specified (instead of a
> list of revs), then they should be connected (no "holes" in the ranges).

I don't think so. push(set) == push(heads(set)). 

> > 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()"
> 
> We'd need some way to specify interesting topological orderings too, I
> guess.

Perhaps. The default ordering (by revs) is always a topological
ordering. There's not much that makes other orderings interesting except
how well they compress.

> Being able to mix queries with other repos, would be interesting too
> (e.g. only match from outgoing csets).


-- 
http://selenic.com : development and support for Mercurial and Linux




More information about the Mercurial-devel mailing list