问题描述
我正在尝试通过将主干合并到分支中来使功能分支保持最新状态.问题是,创建分支时大约有2000个文件,而分支和主干上未更改的文件正在使用svn:mergeinfo进行更新.该项目的规模很大,并且对我们的SVN历史的影响是如此之大,以致于合并提交历史无法使用,因为它实际上标记了成千上万个文件已更改,即使这些文件的唯一更改是由SVN完成的本身.
I am trying to keep a feature branch up to date by merging trunk into the branch. Problem is, that about 2000 files that was there when the branch was created, and that has been left untouched on both the branch and on trunk is getting updated with nothing but svn:mergeinfo.The project is rather large in scale, and the impact on our SVN history is so big, that it renders the merge commit history unusable as it is marking literally thousands of files changed, even though the only change to these files, is done by SVN itself.
我尝试过
- 使用与Repo(1.5.2)相同的客户端版本
- 使用我当前的客户端版本1.6.10
- 合并了从分支开始到开始的一系列修订版本
我应该提到,在尝试此操作时,我一直在仔细查看SVN文档.因此,不应违反任何规则(例如,不得切换子树,清除本地副本等)
I should mention, that I've been looking closely at the SVN documentation when trying this. So no rules should be broken ( eg. no switched subtrees, clean local copy etc.)
推荐答案
基本上,要清理存储库,您需要在集成分支上运行以下命令,以使更改从那里散开:-
Bascially to clean up the repository you need to run the following on your integration branch so that the change fans out from there:-
C:> svn propdel svn:mergeinfo –R
C:> svn propdel svn:mergeinfo –R
即您可以在主干中执行此操作,以免将来的发行版和功能分支受到污染.合并现有分支时,您可以忽略合并根"下的所有svn:merginfo更改,因为它们仍然会被继承.
i.e. you do it in the trunk so that future release and feature branches are not polluted. When merging existing branches you can ignore all svn:merginfo changes below the "merge root" as they will be inherited anyway.
我前不久就这个问题写了一个博客,其中对此进行了更详细的介绍:-
I wrote a blog on this issue a while back which covers it in more detail:-
清理svn:mergeinfo粪便 http://chrisoldwood.blogspot.com/2010/03/cleaning -up-svnmergeinfo-droppings.html
Cleaning up svn:mergeinfo Droppingshttp://chrisoldwood.blogspot.com/2010/03/cleaning-up-svnmergeinfo-droppings.html
这篇关于将主干合并到SVN中的功能分支时,如何避免使用大量svn:mergeInfo的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!