Search in SVN repository for a file name

Baljeet picture Baljeet · Apr 1, 2009 · Viewed 88.1k times · Source

We have a bulk repository for code contain thousands of folder and sub folder, i want to search under this repositor with file name or with some word.

Root folder
    a\
    b\
    c\
    d\
    e\
    f\ab\
    f\ab\cd.txt

I want to search for cd.txt but dont know where it is in SVN Repository, for that i want to perform a search on the root folder of SVN where i will put the file name cd.txt and run the command, will check in each folder and will display the file details result....

Hope requirement is clear. Can you please help me on this.

Answer

lmop picture lmop · Apr 1, 2009

If the file is in your working copy, then if you are using svn 1.5:

svn list --depth infinity | grep <filename>

or an earlier version of svn:

find . -name <filename> -not -path '*.svn*'

If you need to find the file in history (deleted or moved):

svn log -v | less

and search for it with:

\<filename><return>