简体   繁体   中英

How do I copy source code maintained in SVN and move the code to a different SVN repository

We would like to move our code from the local SVN server to a hosted solution, how should we copy and re-import the code into the hosted SVN server. The main problem is we don't want to point to the older svn data files while re-importing.

I think the svnsync command will do what you want. It allows to replicate repositories remotely, you don't need admin access to source or destination repositories. But you need Subversion 1.4 or newer. For details please read the section on repository replication in the Subversion book .

Edit: I think the intention is to copy the repository including the revision history . AFAIK this will not be accomplished with a simple "checkout + import", like in @splash's answer.

I have read your question several times and I really don't see where your problem is. It should by easy to make a clean checkout of your project from your local svn server and then import the working copy to your hosted server.

svn checkout svn://localhost/projectXY c:\working_copy
svn import c:\working_copy svn://remotehost/projectXY    

You can load your repository's dump to the hosted Subversion repository remotely by using svnrdump tool .

Get a dump of your local repository using svnadmin dump and then load the dump to the remote repo using svnrdump load command.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM