开发者

Merge unversioned directory structure into SVN repository

I committed a 3rd party project into my own svn repository. Now, I got a new version of that project and I'd like to substitute it in my repository.

The project is quite big (1.2GB) and the new version has new files/directories and also deleted开发者_StackOverflow中文版 files/directories.

The trivial solution is

svn rm project
mv /path/to/new/project .
svn add project
svn ci

However, I loose the history for everything. Additionally, the svn server won't be able to use delta-compression (Yes, server space does matter).

Another way is to just overwrite all files in the working directory and then commit it. However, the deleted files remain in the repository. svn add --force * also "forgot" to add some files.

What are the other possibilities to commit the new version? Is this an unusual use-case so there is no built-in support for this? (With Tortoise SVN I'd mess around with the .svn folders, Tortoise offers to delete missing files/folders in the commit dialog, but the command line version refuses to commit if it encounters files/folders not deleted using svn rm)

Extra 1: How to avoid changes in my repository to be overridden? (There only few, so re-applying is acceptable at the moment)

Extra 2: I replaced all symlinks with copies of the destination (To get rid of special status changed errors). How to avoid this?

Extra 3: How to cope with renamed files/directories? Since I just get the new version without change history, it is impossible to determine those automatically. svn mv before committing?


The fs2svn tool, part of svn2svn does the basics of what you're looking for. Start with this post.


You might try the method that subverion reccomends for merging in vendor code via a vendor branch then trunk merge. They've also got a tool, svn_load_dirs.pl, to help with additions, removals, and moves in the upstream version.

Details can be found at: http://svnbook.red-bean.com/en/1.6/svn.advanced.vendorbr.html

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜