Introduction
Introduction Statistics Contact Development Disclaimer Help
### Migrating SVN content from one hosting to another (svnsync) ###
Recently, I migrated one of my OSS projects from SourceForge to OSDN. This
required migrating the SVN tree with its entire history. I initially thought
this would be either very difficult or impossible, but then I learned about
svnsync.
The svnsync utility is a specialized tool that is able to synchronize one svn
repository to another, preserving the original commits with their proper
timestamps, authors, etc. The operation turned out to be very easy.
1. Allow revision properties to be modified on the target repository. On a
vanilla SVN server this would require to create a 'pre-revprop-change' hook
that exits with a 0 return code.
On the OSDN hosting it is as easy as setting up a single checkbox named
"Allow to modify revision properties for projects members" in the
Subversion admin screen.
2. Initialize the target repository. This will set up the target repository so
it knows what is the original location of the code:
$ svnsync init svn://svn.osdn.net/svnroot/amb svn://svn.sf.net/p/amb/code
Copied properties for revision 0.
3. Execute the synchronization - this will clone every commit made on the
source repository to the target repository:
$ svnsync synchronize svn+ssh://[email protected]/svnroot/amb
Committed revision 1.
Copied properties for revision 1.
Transmitting file data ...
Committed revision 2.
Copied properties for revision 2.
Transmitting file data ..
Committed revision 3.
(etc)
The above step may take a while, it's hard work.
4. Disable revprop modification on the target repository.
All done! Now, it is possible to checkout the new repository and use it as
the new location for the project's source code.
$ svn co svn+ssh://[email protected]/svnroot/amb/ amb
You are viewing proxied material from gopher.viste.fr. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.