Jus*_*tin 6 svn tortoisesvn merge branch conflict
假设我有一个名为"branches/BigFeature"的功能分支.我想将这些更改推送到Trunk,对Trunk进行一些更改并将其全部合并回"BigFeature"分支,以便继续开发.
我的步骤是:
将Trunk中的最新更改合并到branches/BigFeature.(Tortoise SVN - >合并一系列修订)
将branches/BigFeature中的更改合并到Trunk.(Tortoise SVN - >重新整合分支)
对Trunk进行一些更改.
将Trunk中的更改合并到branches/BigFeatures.(Tortoise SVN - >合并一系列修订)
问题出现在第4步.当我合并回BigFeature时,我遇到了各种各样的冲突.最初在branches/BigFeature中添加但合并到Trunk的文件似乎有问题.
它给我的消息是"最后一次合并操作试图添加文件'blah',但它已经在本地添加了.
这有点意义,因为文件最初是在branches/BigFeature分支中添加的,然后合并到Trunk.但为什么合并操作不能实现呢?它为什么会出现冲突?
删除的文件会发生同样的错误.
最后一次合并操作试图删除/移动/重命名目录'blah',但它已在本地删除,移动或重命名.
谢谢你的帮助.
不幸的是它是svn的缺陷,它的构建方式.
svn中的步骤必须如下所示:
1. (not modified) Merge the latest changes in Trunk to branches/BigFeature. (Tortoise SVN -> Merge a range of revisions)
2. (not modified) Merge the changes in branches/BigFeature to Trunk. (Tortoise SVN -> Reintegrate a branch)
2a. Delete branch branches/BigFeature
2b. Create branch branches/BigFeature from current trunk
3. (not modified) Make some changes to Trunk.
4. (not modified) Merge the changes in Trunk to branches/BigFeatures. (Tortoise SVN -> Merge a range of revisions)
Run Code Online (Sandbox Code Playgroud)
重新集成操作后,SVN分支不再可用.
更新:还有第二种方法,而不是删除分支.
2a. on branch:
$ svn update
Updated to revision X
$ svn merge --record-only -c X ^/trunk
$ svn commit -m "Block revision X from being merged into the branch."
Run Code Online (Sandbox Code Playgroud)
我不知道这个伎俩,感谢你的问题:D