Move Subversion repository without history

会有一股神秘感。 提交于 2019-12-12 12:35:49

问题


There are a lot of posts on moving a Subversion history with version history but i am looking to do something different.

Basically we have a repository that has been used as a proof of concept and we want to archive this. However we want to create a new repository with the latest version of some the code but with author histroy saved but it's a fresh start so we aren't interested in keeping the version history. Plus we are trying to keep the repository size down as there were binaries saved in the past that is causing the repository to be far too large.

I will also at the same time want to remove some of the folders which I think I can use the dump filter on?

As I want to keep user information checking out and checking back into the new place wouldn't be the preferred option.


回答1:


To have the latest version of the files with their author, commit date and commit message, you will have to use svnadmin dump to create a dump file from your repository and svndumpfilter to filter out the revisions you don't want to keep.

Working with svndumpfilter is in general a very frustrating exercise and you might need to rely on derived (and often ill-maintained) programs such as svnfiltereddump, svndumpsanitizer, svndumpfilter2 or svndumpfilter3.

In the end you should ask yourself the question if the cleanup in the history is really worth the effort.




回答2:


You can simply do an svn export of the projects you want to continue to have and do on the new repository a svn import. Before the import just remove the files you don't want to import.



来源:https://stackoverflow.com/questions/8433292/move-subversion-repository-without-history

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!