27

Co-worker is sure he checked in a file: foo_oustanding.dpr but isn't sure when/where (we have lots of "tools" and "utility" ancillary branches, lots of project branches, etc..
I need a way to search the entire repository for this file. I could check the whole source tree out to my HD, but that would take several hours. Is there a faster way? I tried the Repo Browser (Tortoise) and it didn't seem to have a search. I also thought about dumping the log, from the beginning of time. But that seemed silly.

I have, at my disposal:

  • Tortoise SVN 1.6
  • Subversion 1.5.6 running on Apache It runs on a Windows 2003 server.
  • Remote Desktop access to the server, with admin rights.
Nakilon
  • 34,866
  • 14
  • 107
  • 142
Chris Thornton
  • 15,620
  • 5
  • 37
  • 62
  • appears to be a duplicate of http://stackoverflow.com/questions/391718/how-can-i-search-an-svn-repository-for-the-existance-of-files-in-any-revision – Eli Bendersky Apr 05 '10 at 13:29
  • 1
    oops - sorry, it IS a duplicate! However, I'm glad I asked anyway, as the answers here are better, particularly @Ken's example of the svn log command. Voted close. – Chris Thornton Apr 05 '10 at 13:52
  • possible duplicate of [Search in SVN repository for a file name](http://stackoverflow.com/questions/704901/search-in-svn-repository-for-a-file-name) – Fabio Marreco Aug 05 '15 at 19:04

6 Answers6

15

To see a list of all the files, send grep to text file in Command Prompt:

svn list -R myurl >> results.txt 
live-love
  • 48,840
  • 22
  • 240
  • 204
10

With Subversion 1.8+ client:

svn log -v URL-OF-REPO-ROOT --search foo_oustanding.dpr

bahrep
  • 29,961
  • 12
  • 103
  • 150
Lazy Badger
  • 94,711
  • 9
  • 78
  • 110
10

If it was checked in fairly recently, you could do a verbose remote svn log from the top of the tree and see a history of all the commits across all the branches. You could then grep the output for the file and user name. (You would need the command line svn to do this.)

svn log -v -l 500 http://myserver/svn_root

Ken Liu
  • 22,503
  • 19
  • 75
  • 98
  • 3
    FWIW [Subversion 1.8](http://subversion.apache.org/docs/release-notes/1.8.html#svn-log-search) now allows you to `--search` the log directly instead of having to grep the result of the `svn log` command. – Sameer Singh Aug 22 '13 at 11:44
7

Good question! There doesn't seem to be an official "search" function in Tortoise, but it seems to be possible to search the log in TortoiseSVN for file names, which can be enough in many cases.

Community
  • 1
  • 1
Pekka
  • 442,112
  • 142
  • 972
  • 1,088
2

See this question and answers:

SVN Repository Search

svnquery is probably what you need.

Community
  • 1
  • 1
Erikk Ross
  • 2,173
  • 13
  • 18
1

I search like this:

svn list -R url_to_repo | grep Maintain.jar

It outputs this:

trunk/Project/pkg/Release/Maintain.jar