开发者

Find files containing text recursively in subversion repository

How can I recursively run through an entire subversion a repository and list files containin开发者_高级运维g a specific text?


You could use ack (site: http://betterthangrep.com/ , I like the domain name ;) ):

It does ignore the .svn by default and runs on multiple platform, including Windows, being a Perl program.

Usage Example:

Find all #include files in C programs:

ack --cc '#include\s+<(.*)> --output '$1' -h 

Testimonial example:

"Grepping of SVN repositories was driving me crazy until I found ack. It fixes all of my grep annoyances and adds features I didn't even know I wanted." --


If you have a subversion client installed, then you will be able to grab all the versioned files with this command :

svn info -R repository_root

then extract from this list the files (Path : field) and then make a grep (like this one) to extract correct files.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜