合并工作流 [英] svnmerge workflow

查看:48
本文介绍了合并工作流的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你是如何在 svn 中使用 svnmerge 进行合并和分支的?

我之所以这么问是因为我已经开始使用 svnmerge 来跟踪我所从事的项目中的特定分支.我做了 svnmerge 合并,最后得到了很多奇怪的文件,比如 .merge-left.merge-right.working.现在,我想看看其他人如何使用它来最终学习如何恢复我的更改并以最佳方式应用合并.

Specifically I ask because I have started using svnmerge to track a specific branch in a project I work on. I did svnmerge merge and ended up with lots of strange files like .merge-left, .merge-right, .working. Now, I want to see how others use it to end up learning how I can revert my changes and apply a merge the best proper way.

推荐答案

如果您看到合并左/右/工作文件,则表示您尝试应用的合并中存在冲突.这意味着在源分支(您从中合并的分支)和目标分支(您要合并到的分支)上以不同方式更改了同一部分代码.

If you are seing the merge-left/right/working files then it means that there's been a conflict in a merge you've tried to apply. This means that the same section of code has been changed in different ways on the source branch (the branch you've merged from) and the destination branch (the branch you're merging to).

  • 'file.py.merge-left.rxxx` 显示了冲突左边的合并结果
  • 'file.py.merge-right.ryyy` 显示合并结果取右边冲突的一方
  • 'file.py.working` 显示您未更改的工作副本
  • 'file.py` 显示 SVN 尝试合并两者

参见 SVN 手册 有关冲突的更多信息.要解决它们,您需要查看左右文件并找出如何最好地组合冲突更改.如果您有一个 SVN GUI,例如 TortoiseSVN 或 SmartSVN,那么您应该能够打开客户端的冲突查看器.我强烈建议不要尝试从原始文本文件中执行此操作.如果您是 emacs 用户,ediff 也非常适合解决冲突.

See the SVN Book for more information on conflicts. To resolve them you need to look at the left and right files and work out how best to combine the conflicting changes. If you have an SVN GUI such as TortoiseSVN or SmartSVN then you should be able to open the client's conflict viewer. I'd highly recommend that over trying to do it from the raw text files. If you're an emacs user than ediff is great for resolving conflicts too.

一旦您对更改感到满意,那么您需要在 SVN 中将文件标记为已解决",这样您就可以检入文件.

Once you're happy with the change then you need to mark the file as 'resolved' in SVN, which allows you to check the file in.

这篇关于合并工作流的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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