Filesets!

Martin Geisler mg at lazybytes.net
Sun Jun 19 12:49:06 CDT 2011


Arne Babenhauserheide <arne_bab at web.de> writes:

> On Saturday 18 June 2011 17:18:47 Matt Mackall wrote:
>> # Find files based on contents
>> hg cat "set:grep(spinach) and not grep(mushroom)"
>
> That sounds really cool! 
>
> It replaces long bash commands like 
>
> hg cat $(hg sta -cn | grep spinach | sed s/.*mushroom.*// | xargs)
>
> (which can have weird problems with spaces in filenames, escaping and such)
>
> Is there a way to add a file named "set:<something>"? 

Yes, like this

  $ hg add path:set:foobar

See 'hg help patterns' -- you can also use 're:a regexp' and even read
filenames from another file.

-- 
Martin Geisler

Mercurial links: http://mercurial.ch/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20110619/17450fab/attachment.pgp>


More information about the Mercurial-devel mailing list