Move Subversion repository without svnadmin

November 12, 2008

Update (2008-11-13)
Okay, so I did actually end up finding a way to move from SF.net for real. It seems they provide read-only rsync access straight to the repository directory. So here is what I did instead.

Update (2008-11-12)
Made a small performance change then ran it on the ClearPass repository. Worked flawlessly.

I have been having a terrible time trying to figure out how I can get the Subversion repository for ClearPass out of SourceForge. I could not find a single reference to svnadmin on the SourceForge and no examples of exporting without it. So I took matters into my own hands. Below is a quick and dirty shell script that exports and imports a repository one revision at a time, using common Linux command line tools and the svn command. I’m going to do more testing before using it for real, but so far it has done well. Hope this helps someone else in my position.

Download it: svncrossload

Comments

  1. Tom Boutell says:

    Thanks for writing this, it’s very clever even if you did find a way to avoid using it in the long run. It’s the first ‘copy a repository without svnadmin’ script I’ve seen that seems likely to actually do the job.

    I wrote ‘svnforeigncopy’ which doesn’t attempt to copy history, just ignores and externals. It’s good as a way of copying projects with those crucial details intact without copying the entire history, which makes sense if you’re copying a sample project to your own repo to start your own project (something we encourage people to do with our work):

    http://sourceforge.net/projects/svnforeigncopy/

    (Would your version handle externals, ignores, etc. correctly? Looks like it probably wouldn’t, I don’t see anything about handling properties here…)

  2. john says:

    Thanks Tom, it’s been a while since I’ve looked at this, seems brutish to me now, but it did the job.

    I’ve always been an amateur SVN user, so I don’t mess much with props beyond setting execute.

    Thanks for the link, hopefully someone will find that useful if they land here. I’ve never really done PHP on the command line, but that’s pretty cool for only 61 lines. If it works, it works, who cares about language wars :-)

  3. Hey, John. I know it’s an old post, but your tool was very useful at work. I’ve improved it and published it into my blog (http://bubble-tales.blogspot.com) and into github (http://github.com/bolhoso).

    Thank you!

  4. john says:

    Awesome! I love it when old code finds a new use and new life! Thanks for extending it and for sharing!

Leave A Comment

Your email will not be published.