tags:

views:

247

answers:

2

I'd like to know if there is an easy way to duplicate a subversion repository without having access to the filesystem. Meaning that I have read-only access with the HTTP interface.

Basically, I'd like to have my own locally-hosted copy of a repository for an open-source project. They provide anonymous access to the subversion repo as usual.

I've looked through the docs, and I guess my Google-fu is good enough because I couldn't find any reference to doing something like this.

So basically I want to download all the revisions, and be able to import them into my own repo using svnadmin.

A: 

svnadmin dump

Khurram Aziz
This only works if you have filesystem access. The OP specifically said he did not.
Danny
+3  A: 

I think you're wanting svnsync:

svnadmin create /localsvn
svnsync init file:///localsvn http://domain/svn
synsync sync file:///localsvn

You'll have to enable the pre-revprop-change hook in your local repository or svnsync will complain.

But, just repeat the last command as necessary.

Note that svnsync commands require URL arguments.

Jonathan Lonowski
It's worth noting that svnsync only grabs the necessary changes to bring your repository up to date, so is quite efficient.Also you must not modify the local repository yourself - just use svnsync.
Jim T
It turns out that Mercurial has several tools along these lines, including something built in as well as hgsvn.
@James Graves: you can pass username and password with these options: --sync-username svnsync --sync-password syncpassword
Wim Coenen