1

I'm trying to run svnlook as recommended here.

C:\Users\name>svnlook tree svn://svn.compname.com:4345/ | grep Shared.Translation

svnlook: E720123: Can't open file 'svn:\svn.compname.com:4345\format': The filename, directory name, or volume label syntax is incorrect.

I got the repository-name/URL above from the repo-browser in Tortoise SVN. I have TortoiseSVN installed, but assuming I have to use command line to search the entire repository.

We have a large code base. I don't want to download it all. I need to find a program, when I don't know what hierarchy it is hidden under. Is there no way to do this with a full download? Also is there a way to download without getting the branches and tags?

NealWalters
  • 17,197
  • 42
  • 141
  • 251

2 Answers2

2

svnlook is only meant to work directly on the server hosting the repository, by looking at the repository database (directory) itself and not through a Subversion server process (svnserve or Apache). It's an administrative tool that's normally used from hook scripts.

Passing a repostory URL will not work; you must pass a filesystem path instead and that also implies you have access to the repository database via the filesystem. See the documentation

alroc
  • 27,574
  • 6
  • 51
  • 97
  • We have a large code base. I don't want to download it all. I need to find a program, when I don't know what hierarchy it is hidden under. Is there no way to do this with a full download? Also is there a way to download without getting the branches and tags? – NealWalters Mar 12 '18 at 14:03
  • @NealWalters you need to read the Subversion manual, especially the parts about `svn list` (and since you're using TortoiseSVN, the Repository Browser) and *sparse checkouts*. No one could have guessed how to help you from the way you wrote your original question. This comment should have been part of, if not all of, your original question. – alroc Mar 12 '18 at 14:09
  • Yes, I'm having problems with the vocabulary. Since Tortoise SVN has a "repo-browser" that seems to browse the server, I thought the word "repository" refers to the server. We are phasing out SVN for GIT, so have to learn both. – NealWalters Mar 12 '18 at 14:15
  • The repository *is* what's stored on the server. But accessing it via a client is different from the direct filesystem access that `svnlook` requires. – alroc Mar 12 '18 at 14:20
1

This seems to be what I was looking for:

For Windows without Grep command:

svn list -R https://subversion-repo/subfolder | findstr filename

or if you have a "grep" command:

svn list -R https://subversion-repo/subfolder | grep filename

To search just the "Trunk" if you have grep command:

svn list -R https://subversion-repo/subfolder | grep Trunk.*filename

It can take several minutes to run.

Source: http://foldingair.blogspot.com/2013/12/search-whole-svn-repository-for-given.html

NealWalters
  • 17,197
  • 42
  • 141
  • 251