Concept of the day: filesets?

Matt Mackall mpm at selenic.com
Thu Nov 18 13:50:57 CST 2010


On Thu, 2010-11-18 at 08:59 +0900, Nicolas Dumazet wrote:
> 2010/11/18 Matt Mackall <mpm at selenic.com>:
> > That'll work right up until I change the predicate to "not modified()"
> > or make it "or contains('mpm')", etc. Yes, you can be extra clever and
> > work around such bumps, but it's not hard to see that this quickly gets
> > into experts-only territory.
> 
> Fair enough.
> 
> >
> > I'm surprised you can't look over at revsets and think "wow, that really
> > is amazingly powerful and useful, and doing that sort of thing with
> > files would probably also be quite useful." Yes, I could in fact do just
> > about everything revsets does with a hairy pipeline of log -q and uniq
> > commands, but it wouldn't exactly be convenient.
> 
> Actually, from time to time I feel uncomfortable with revsets too.
> Yes, it's super powerful and helpful.
> But then, for instance, most of the options from log are not useful
> anymore, or could be replaced by a revset. log -b foo is log
> -r"branch(foo)"

Yes, but that just means we should have done revsets years ago. Now
-all- commands have the equivalent of log -b, -k, -d, -P, -m, -M, -f,
-u, -l, and a bunch more without having to add tons of new options
everywhere.

Similarly, if we'd started with filesets, we wouldn't need -I and -X in
every command.

> For instance, hg log -r REV FILE was broken in 1.7, but not log -r"REV
> and file(FILE)".

My eventual goal is to rewrite the horror of the current log code in
terms of revsets. This should make it both simpler and faster.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list