Ir a contenido

Switch/Migration of Subversion repository without admin access (svn2svn)


Hello fellows.
My latest adventure was about moving a project (unmaintained) from its public subversion repository which of course I was not admin (which means no admin access) over to my own server.

Usually, to do this you’d dump the whole thing with svnadmin into one file (svnadmin dump > file_dump) and load it again at the new location (svnadmin load file_dump). After searching for any similar command without admin access into documentation I figured that something similar might exist for plain svn to svn migration.
I founded a ruby version and a python. I chose python one because it’s recent, it’s python and it’s under google code site.
There was other cause, the ruby version went through all revisions, from 1 till infinity, although many of them didn’t have any change. In the other hand, python version uses subversion logs and made a efficient use of it.

The real action

Create a repository in my server was easy:

root@aristoteles:/var/lib/svn$ rm -rf MY-PROJECT-PATH
root@aristoteles:/var/lib/svn$ svnadmin create MY-PROJECT-PATH
root@aristoteles:/var/lib/svn$ chgrp svn-user MY-PROJECT-PATH/ -R
root@aristoteles:/var/lib/svn$ chmod g+ws MY-PROJECT-PATH/ -R
root@aristoteles:/var/lib/svn$ chmod o-rx MY-PROJECT-PATH/ -R

After solving the problems I talk about, duplicating the repo was not so difficult.

user@othermachine:~$ mkdir tmp
user@othermachine:~$ cd tmp
user@othermachine:~$ svn co URL-DEST-MY-PROJECT-PATH
user@othermachine:~$ python svn2svn-0.1.1.py -r 7382 URL-ORIG URL-DEST-MY-PROJECT-PATH

This process took a while but the new directory was now ready for action.

Be careful with your subversion config files. It may cause conflicts with file in repositories.
As an example, I had some troubles because I use to ignore files like Makefile.in and so. The project I was trying to import did have files like that and svn2svn did bring svn errors because those files were not under revision. When I realized I modified my subversion config without that rules for a while.

References and links
Etiquetas: , , , , ,
Te interesará:

Información y Enlaces


Otras Entradas
Siguiente:
Anterior:

Últimos comentarios

patrocinio

¿Cómo PATROCINAR?

Entérate al instante

Del archivo…


Comentarios


Agregue un Comentario

Consejos

Escribe correctamente, esto es la Web, no un SMS. (No te vamos a cobrar por mas de 150 caracteres) ;-).
No insultes a los demás, respeta a las personas que hay al otro lado de la pantalla y que van a leer tu opinión.


Advertencia

Los comentarios de los usuarios no se corresponden necesariamente con la opinión de El Demonio Negro.
No está permitido verter comentarios contrarios a las leyes españolas o injuriantes. Por ello, nos reservamos el derecho a eliminar los comentarios que consideremos incumplen dichos preceptos.