开发者

SVN - create a new repository and add trunk and branches from an old repository

I'd 开发者_如何学Pythonlike to rename my SVN repository. I've tried an svn copy command to copy from one repository to another, but this doesn't work:

F:\Old>svn copy https://devserver2.sockltd.local/svn/Dantooine https://devserver2.sockltd.local/svn/IOCPTest

svn: Repository moved permanently to 'https://devserver2.sockltd.local/'; please relocate

When I have a look at the list of repositories IOCPTest doesn't exist.

Is there some way to rename a repository, or should I just export the old repository and dump its content into the new one. The problem is, with that approach, I'll loose branches and revision history.

thanks


I've found a feature on the main application window of the VisualSVN server - "Import Existing Repository..."

It automates the task of copying one repository to a new one, while at the same time giving the facilty to specify the new repository name. It works fine for my needs and copies the branches and revision history too :)


This depends how VisualSVN is organising your repository(ies) under the covers. If Dantooine is a separate repository (i.e. has its own independent version numbers) then easiest thing to do would be to copy / rename the Dantooine directory on the server. The name isn't included in the repository data - as far as subversion is concerned that's just the URL for data transport, it recognises repositories by a GUID revprop - so a rename followed by a svn switch --relocate on your clients should be enough to move it.

If instead you want to create a complete copy / fork of the repository you can again just copy the Dantooine directory.

Or if you actually want to copy / filter the branches from the reposistory you can use svnadmin dump to make a backup of the old repository and the svndumpfilter python script to strip out branches you don't want, then svnadmin load to load the filtered backup into a fresh repository.

All of this might not be the VisualSVN way to do things, though - I've never used that myself.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜