How to display list of repositories from subversion server

I'm looking for a way to search a whole subversion server.

I already got a piece of the puzzle to search within a repository. Now I need to do this for every repository.

Update:

I have to access this list from some unix shell script (perl, bash, etc.)

--------------Solutions-------------

I was also looking to list repositories in SVN. I did something like this on shell prompt:

~$ svn list https://www.repo.rr.com/svn/main/team/gaurav

Test/
Test2/
Test3/
Test4/
Test5/
Test6/

If you enable svn via apache and a SVNParentPath directive, you can add a SVNListParentPath On directive to your svn location to get a list of all repositories.

Your apache conf should look similar to this:

<Location /svn>
DAV svn
SVNParentPath "/net/svn/repositories"
# optional auth stuff

SVNListParentPath On # <--- Add this line to enable listing of all repos
</Location>

Sometimes you may wish to check on the timestamp for when the repo was updated, for getting this handy info you can use the svn -v (verbose) option as in

svn list -v svn://123.123.123.123/svn/repo/path

Doesn't your access to SVN work just like a Web service? When I access the top directory of my SVN server, I get a page that's essentially a Table Of Contents of the whole works. It's an Unordered List that I can simply scan through.

EDIT: Here's how I would do it from the command line:

wget http://user:[email protected]/ -O - | grep \<li\>

If you know your way around Java, you can use SvnKit to do browse, search and God knows what with your Subversion server.

After that, you can package your program and invoke it either via an Ant task or a shell script.

It's quite a "brute force" solution, but once you master SvnKit, you can really do lots of cool things.

You can run svn log --search ARG --search-and ARG if you use Subversion 1.8 (or newer) command-line client. This allows you to search the repository history by

  • revision's author,
  • commit date,
  • commit's log message text,
  • list of changed paths.

It does not search by code itself, however it's still handy for simple repository search.

See SVNBook 1.8 | svn log command-line reference.

If your server is Apache, you should be able to configure it to see the repository list with viewvc - this is the most basic one, other more complex interfaces exist but this is not your purpose here.

In some versions, ViewVC is an option of the standard installation now, for instance from Collabnet.

Edit: Nevermind my previous idea just above, Peter has a much simpler way of sending the repository list.

From there, you will have to:

  • get the HTML page,
  • extract the list, and
  • process it for the individual repository search.

Unfortunately in this case I cannot think of something more straightforward.

There are examples on SO on how to extract text from HTML pages in Python, this would be a good option since Python also has bindings for SVN, to perform the repository search - you can still call svn directly from Python if you prefer.

If Python is not your cup of tea, you will have to process that differently with GNU tools (wget, then parsing tools or existing packages - I can't be of much help there, Carl gave you some more details in this post).

At my company they didn't configure the server to provide a list of repositories, so svn list worked for a specific repository but not at a higher level to list all repositories.

However they installed FishEye which gives you a GUI listing the repositories https://www.atlassian.com/software/fisheye

It's a paid option, so it's not for everyone, but the functionality is nice.

Category:svn Time:2009-11-07 Views:0

Related post

  • How to drop and create new repositories with a subversion server? 2008-12-05

    Ok so I just did something boneheaded. I'm setting up a subversion server for the first time ever that will be used by contractors. I did the 1 click setup, created my project and did my first check in of our application thinking that I'll go through

  • How to find my subversion server version number? 2008-09-26

    I want to know if my server is running Subversion 1.5. How can I find that out? Also would be nice to know my svn client version number. svn help hasn't been helpful Note: I don't want my project's revision number, etc. This question is about the sub

  • Subversion server on 64-bit Windows? 2008-10-27

    I want to set up a Subversion server installation on Windows Server 2003 64-bit and I'm considering using VisualSVN Server. Does this work OK in a 64-bit environment? Are there any issues or gotchas I should be aware of before installing the software

  • Can I see who checked out what when from my subversion server? 2008-12-11

    Does anyone know where a log of who connected to my subversion server and what they did with it is? I'm looking to find out what time and which files were checked out. I'm assuming that it has something like a webserver log somewhere and I just can't

  • subversion server vs. network repository access through tortoise 2009-01-30

    There are currently 5 developers on my team and we all access a repository through a shared drive on computer X which is on our network. Since we all have access to computer X, and we can manage who has and who doesn't have access to computer X, we c

  • Subversion Server to use on Windows 2009-03-05

    What Subversion (SVN) Server would recommend a newbie get started on the Windows Server OS? I think I'll be using TortoiseSVN on the client and will be doing .NET development mostly. UPDATE: Great advice. I'm picking my answer based on votes. I will

  • Using SVNSERVE to host Subversion server, configuration files, etc 2009-04-26

    I have a SVNSERVE server set up to host multiple repositories. Short question here My question is really this: I have authz, passwd, and svnserve.conf in the main directory outside the repositories, and this seems to work, in the sense that changes h

  • How to change from https:// to svn:// protocol in subversion server 2010-02-02

    UPDATE : svn and http protocol benchmarking is in.. How long it took to checkout the trunk of a project (in minutes and seconds).. svn protocol : 5:32 http: protocol : 5:33 svn protocol (with AVG folder exception) : 2:22 http protocol (with AVG folde

  • sharpsvn - get list of all projects on subversion server 2011-05-29

    I need to list all projects on a subversion server from sharpsvn. This is equivalent to command: wget http://me:@subversion-server/root/ I cannot find the function in sharpsvn api. Does the function exist? Update: Sorry for not being clean. I will gi

  • Initializing private repositories on production server 2012-02-24

    What I want to do now is to initialize a private repository on my production server in to app's www folder (ex: /var/www/app.com/web/) and then clone it as a staging repository to my testing site (ex: /var/www/test.com/web/app.com/) and finaly clone

  • Possible solutions for a public Redmine to access a private/local subversion server? 2012-04-30

    I have a Subversion (Apache2 + mod_dav) server running on a Debian server on my private network. I also have a Redmine installation running on a Internet-publicly available server. This can't be changed: Subversion server must stay local/private and

  • Our subversion server has a new IP address - now what? 2009-09-11

    We connect to the repository by ip address - a quick hack introduced by the guy before me, since we don't have a real server, just an old pc running apache, svn etc. We recently moved offices and it seems the "server" is using DHCP - it booted to a n

  • Basic question: Is a subversion server necessary in this scenario? 2010-02-28

    Right now: I have a few personal software projects I develop (just me, and on just one PC) extensively use TortoiseSVN for version-control run CollabNet Subversion Server on the same PC Is there really any advantage in having a server instead of just

  • How to block access to Subversion server for clients below 1.6 version 2010-06-04

    My Subversion server access is through Apache HTTP. For instance, I don't want TortoisSVN not at version 1.6 and above be able to access it. The blockage should happen for any client not at 1.6 or above. --------------Solutions------------- According

  • copying a directory of repositories to another server 2010-10-11

    CentOS 5.3 I have a directory called repos. Inside that directory I have repositories and subdirectories of repositories. There are more than 30 repositories in all. We are now moving our repositories to another server. I am just wondering what is th

  • I need to create webpart to display % of project completed from project server value into my share point 2010 page? 2010-10-27

    I need to create webpart to display % of project completed from project server value into my share point 2010 page ? --------------Solutions------------- Have a look at Business Connectivity Services (BCS). You can manage External Content Types to us

  • subversion server import remote server 2011-01-17

    I have a subversion server running with a repository at /srv/repos/project. What i like to do is import all the files from a remote webserver. How can i do this, i have tried to use the import command. svn import http://www.domain.nl/ file://srv/repo

  • Imported project to online Subversion server - but Tortoise SVN does not have commit as right click option 2011-02-26

    I imported a project to an online Subversion server. I changed a file and I want to commit - but Tortoise SVN only has the options: Repo-Browser, Settings, Help and About. What could be the problem? --------------Solutions------------- The commit act

  • How can I redirect a working copy from a subversion server to a different location? 2011-05-02

    Direct Question: With a working copy checked-out from a subversion server, is there a way ??.svn/entries?? to redirect the working copy to a different location from where I originally checked it out? Background: I have a small subversion server which

Copyright (C) pcaskme.com, All Rights Reserved.

processed in 0.802 (s). 13 q(s)