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

RE: Find in Files/Searching content of files in the repository

From: Reedick, Andrew <Andrew.Reedick_at_BellSouth.com>
Date: 2006-09-19 18:26:58 CEST

> From: Terence Cordes [mailto:Terence.Cordes@reuters.com]
> Sent: Tuesday, September 19, 2006 11:24 AM
> To: users@subversion.tigris.org; users@tortoisesvn.tigirs.org
> Subject: Find in Files/Searching content of files in the repository
>

> I've just had a request from a user that I'm don't think is possible
with any Subversion client, but thought I would ask. The user was
wondering if there is any support to search the content of files in a
repository without having to check out the files, such as the "Find In
Files" functionality in Visual Source Safe.
 
> At this point, the only means I know to search the file contents of a
repository is to checkout the repository and perform a search using the
file system. Do any Win32 Subversion clients support this type of
search without performing a checkout?
 

Bleh. You can use 'svn cat' to dump the contents of a file, and 'svn ls
-R' to feed filenames to 'svn cat'.

Unix or Cygwin
--------------
svn ls -R url |
while read i
do
        echo $i
        svn cat "$i" | grep -i magic_word
done

Windows
-------
for /f %i in ('svn ls -R url') do @echo %i && svn cat "%i" | findstr /i
"magic_word" %i
         
         
         

*****

The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. GA624

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Sep 19 18:33:02 2006

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.