开发者

Find files containing text recursively in subversion repository

开发者 https://www.devze.com 2023-03-04 17:04 出处:网络
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 nam

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

精彩评论

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

关注公众号