SVN::Mirror
Mirroring of Subversion repositories isn't very well supported at this point. It seems that the only way to do it without filesystem access to the server is with a perl package, SVN::Mirror.
Installing SVN::Mirror was a bit troublesome. Basically you need to:
- Install Subversion >= 1.0.4
- Install the Subversion Perl bindings (make install-swig-pl)
- Install SVN::Simple from CPAN (an unlisted dependency)
- Install SVN::Mirror from CPAN (say no if it asks you about VCP)
After that, you should have a svm utility, which you can mirror your repository with. There is a documentation bug in the current version where it says that that init takes a skip_to argument. It does not. sync does, however.
In order to get the mirror going, you need to do something like this
$ setenv SVMREPOS ~/svm $ svm init mirror/bob http://svn.red-bean.com/bob $ svm sync mirror/bob 2
The 2 is important, because it's the skip_to argument that allows your mirror's revisions to match your repository. Don't ask. In an earlier version of svm, this number used to be 3.
To check it out, you do:
$ svn co file://$SVMREPOS/mirror/bob bob
And to update the mirror:
$ svm sync mirror/bob
I’m trying to get this thing working with Gentoo linux at the moment. It seems very handy. The current documentation on svm (link above at “svm”) seems to be OK. According to that page, it’s also possible to commit to the local repository and have svm commit the changes back to the master svn repository.
If I have understood the “skip-to” parameter correctly, it will make the three first revisions as only one commit in the local mirror. “skip 6000″ can be very useful, since “svn diff” and “svn blame” tends to be very slow when there are thousands of revisions in the repository.
Comment by Tobias Brox — 2005-04-29 @ 7:45 pm
Ok, but how do I update the “master” repository? It’s not very clear.
Comment by Michele — 2005-06-27 @ 8:40 am