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

Re: [Fwd: svn grep -r2:5 "a_word" filename1 filename2 folder3]

From: Nik Clayton <nik_at_ngo.org.uk>
Date: 2006-09-21 20:16:45 CEST

Hanley, James wrote:
> A while back, there was a request for the ability to grep through the
> source tree of subversion.

The Perl module SVN::Log::Index, and the command line tool it provides, sli,
can be used to generate a searchable index of Subversion commits.

You can update this index periodically, or drive it from a post-commit hook
script. You can then use sli to query the index.

For example, to find all commits by 'nik' that affected the path
/trunk/foo.c you could do:

   sli search --query 'author:nik and path:/trunk/foo.c'

You can also search log messages. For example, if your log messages contain
ticket numbers of the format 'rt#<number>', and you want to find all commits
that mention ticket 123 you'd do this:

   sli search --query 'rt#123'

The documentation for SVN::Log::Index, and sli, on CPAN, contain more examples.

N

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Sep 21 23:02:44 2006

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

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