Concept of the day: filesets?

Nicolas Dumazet nicdumz at gmail.com
Wed Nov 17 00:40:20 CST 2010


2010/11/17 Matt Mackall <mpm at selenic.com>:
> What if we applied the revset query language concept to file patterns?
>
> We have long had the ability to do:
>
>  hg ci "re:(foo|bar).*"
>
> We can specify re/glob/path just about wherever filenames are taken. If
> we add a new set type, we can now do:
>
>  hg ci "set: modified() and contains('mpm') and exec() and not glob('**.py')"

I'm afraid of duplication:

find -not -name "*.py" -executable | xargs grep -l mpm | xargs hg st
-mn | xargs hg ci

>
> Want to check in only files not in a subrepo?
>
>  hg ci "set: not subrepo()"

And here I'd add a flag to status to add/exclude subrepo files to do
hg st --nosubrepo | xargs hg ci


Or are we only targetting users that do not have "proper" shells and
toolchains? *cough* *cough*?


In reality, I feel that it would take us away from the "There should
be one-- and preferably only one --obvious way to do it." Zen, but if
you can do this without affecting other parts of Mercurial, I won't
mind.

Regards,

>
> Discuss.
>



-- 
Nicolas Dumazet — NicDumZ


More information about the Mercurial-devel mailing list