English 中文(简体)
How to search for file in subversion server?
原标题:

Is there a way to search for a file in a subversion repository?

Something similar to Unix find command, with which I can find the location of a file in a repository.

I know there is svn list, but this gives me a list of all the files in a directory. I want to find the directory a file is in.

最佳回答

You can use the following command, together with a grep, on the server:

svnlook tree --full-paths <repository path> | grep <file>

That s the fastest option if you need to look into a big repository.

If you only have access to the client side, again with a grep:

svn list -R <URL> | grep <file>

should do what you need.

Both will recurse through the directories, with the client you may start elsewhere than the root of the repository though, but it will be somewhat slower as the information has to go through the network (possibly).

Edit: Also, both gives you the option of looking into a past revision (should the file be deleted):

  • svn list -R -r <revision/revision range> <URL> and
  • svnlook tree -r <revision> <path>.

Simply type svn help list or svnlook help tree for further details.

问题回答

暂无回答




相关问题
Tracking Versions, Builds, Revisions, with TortiseSVN

I am the sole developer on a project and have been using tortoiseSVN for quite a while. Now Id like to start getting version information working correctly in the project I.E. show Major Version, Minor ...

Tips on upgrading CVS to git/hg?

We still use CVS, I use git and hg for my personal use though I m still a novice at both, but I realize they re much more modern and better, faster, distributed, etc. It s just everyone is so ...

How to handle different csproj [closed]

I am working in a team of five. We are working on a C# application with five csprojects. The problem is that for each csproject, each of my colleagues has their own ideas on how to reference a DLL; ...

Changing username in SVN+SSH URI on the fly in working copy

I am using SVN+SSH to check out a working copy of repository from an SVN server on which all developers are members of a developer group and have full read/write permissions on the repository ...

How to search for file in subversion server?

Is there a way to search for a file in a subversion repository? Something similar to Unix find command, with which I can find the location of a file in a repository. I know there is svn list, but ...

热门标签