开发者

How to fill a new repository with a working copy

I have a working copy checked out and a new empty repository. How can I fill that new repository using the working co开发者_StackOverflowpy?

I don't have access to the original SVN.

I could delete all .svn dirs and do svn commit, but I'm wondering about some smarter way.

Thanks for tips.


If you want a copy of the repository WITHOUT the ".svn" files, you can do svn export. This will give you a clean copy of the code. Then you simply need to do an svn import or an svn add to get those files into your new repository. Of course, all version history will be lost, but that's what happens when you create a new repository!


I wouldn't delete those .svn directories until I had gathered all the svn properties out of them; if you don't maintain the svn:keywords properties, you might be surprised when your $Id: $ or $Revision: $ or similar tags go missing, or you rely on the crlf-automatic munging to work between Windows and Unix machines.


If there's a change to your server location, svn switch is your friend. Also, svn import can help you to import unversioned files to a new repository.

However, if you want to IMPORT to a clean repository with all Subversion metadata and history, you will need to create a dump of your first repository (as an administrator, which unfortunately you mentioned, you do not have access) and svnadmin load it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜