How to move my SVN project to a different server
I have some threads which talk about doing a svndadmin and a svnload, I don't have admin privileges hence I would want to just copy the existing project devoid of the .svn directories and开发者_如何学运维 just do a svn add on the target repository. I am not that keen on migrating the existing revisions/comments along with it.
Are there any scripts available to do this?
What do you mean devoid of .svn
directories? The repo doesn't have those, only the working directory does.
Since you do not care about history, you can do svn export
to get the contents of the repo and then svn import
or svn add
it into the repo on the other server. It should be pretty straight forward.
You most likely want to use svnsync
http://svnbook.red-bean.com/en/1.4/svn.ref.svnsync.html
It isn't that complicated, and why lose history if you don't have to.
You'll need two clean folders, source and target, to achieve this. You need it both for SVN CheckOut and SVN Export.
Assuming you have created that Target Repository, here are the steps:
- Do an "svn checkout" of the Target Repository.
- Do an "svn export" of the Source Repository.
- Copy the exported files and folders from the source to the target on your local filesystem. The files and folders would then show as new or unversioned files.
- Now do an "svn commit" from the target folder.
If I'm not mistaken, the SVN EXPORT will try to export also External Definitions. If you want to omit these you need to use the "--ignore-externals" switch.
Good luck.
精彩评论