“天真" SVN从分支合并到主干? [英] "Naive" svn merge from branch into trunk?

查看:124
本文介绍了“天真" SVN从分支合并到主干?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为我的C ++项目使用TortoiseSVN,并试图将分支重新集成"到主干中.

I am using TortoiseSVN for my C++ project, and am trying to "reintegrate a branch" back into the trunk.

我的情况很简单,因此对于分支中每个已更改的文件,我希望它完全覆盖主干中的匹配文件.不幸的是,TortoiseSVN比我聪明,因此它合并了每对文件-导致代码不一致.例如,某些在分支中已删除的代码行将还原为合并版本.

My case is simple enough so that for every file which has changed in the branch, I would like it to completely overwrite the matching file in the trunk. Unfortunately, TortoiseSVN is smarter than me, so it merges each pair of files - resulting in some inconsistent code. For example, some code lines which have been deleted in the branch are restored in the merged version.

有没有办法强迫TortoiseSVN使用天真的合并行为来覆盖所有修改过的文件?

Is there any way to force TortoiseSVN to use the naive merge behaviour of overwriting all the modified files?

谢谢, 丹

推荐答案

仅使用SVN即可做到这一点(文件系统中不存在污物):

Here's how to do it just using SVN (no mucking about in the filesystem):

  1. 签出创建分支的主干修订版(不是 HEAD修订版).
  2. 将其提交到存储库(这将撤消所有随后的中继更改).
  3. 进行重新合并(您的主干工作副本现在应与分支相同).
  4. 提交合并的主干,您就完成了!
  1. Check out the trunk revision from which you created the branch (not the HEAD revision).
  2. Commit it to the repository (this undoes all subsequent trunk changes).
  3. Do your reintegrate-merge (your trunk working copy should now be identical to the branch.)
  4. Commit the merged trunk, and you're done!

这篇关于“天真" SVN从分支合并到主干?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆