[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: How to grep the whole repository for a string?

From: Lutz Dornbusch <svn_at_yogasurftech.de>
Date: Tue, 02 Sep 2008 03:30:00 +0200

Ed Avis wrote:
> Hi, I checked the Subversion FAQ but I can't see how to grep the whole
> repository for a particular string. Ideally, I would like something like
>
> % svngrep foo file:///path/to/repo
> something.c:r3-r10:blah blah foo blah
> something.c:r2:blah blah foo blah fa
> another.c:r3-r5:boo buu foo
>
> so it would list the filename and the range of revisions between which it
> contained that string. Or something like that.
>
> I could manually check out every revision of the repository since r1 and grep
> all of them, but that seems wasteful. Is there an efficient way to search the
> whole repository for a string from the command line?
>

Hi,
I recently found this small script and it worked for me, however it is
not rocket-science, but outputs all(!) files from all(!) revisions and
greps, however if you do not have so many files inside, it may work.

<http://burningthornbush.blogspot.com/2007/11/small-tool-for-searching-in-svn-repos.html>

Greetings,
Lutz

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-09-02 05:56:58 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.