Eldblom
Eldblom

Reputation: 121

Find files containing text recursively in subversion repository

How can I recursively run through an entire subversion a repository and list files containing a specific text?

Upvotes: 2

Views: 775

Answers (2)

Cédric Julien
Cédric Julien

Reputation: 80851

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.

Upvotes: 0

VonC
VonC

Reputation: 1330012

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." --

Upvotes: 1

Related Questions