项目需要做一个大的改动,在上线之前从trunk上打了一个branch下来,由于改动比较大,所以这次的改动就在branch修改、打包、测试;
测试完成以后,问题来了,我们需要branch代码merge到trunk上,网上查了一下资料,但是有些人为了赚取所谓的“分儿”,都没有验证的解决方案一顿狂发,下面是经过验证的解决方案:
1. 将branch的代码验证没有问题后,全部提交(此时的提交,是提交到了branch上)
2. 在trunk上,点击右键,选择“team->merge”,会弹出merge对话框,我们的merge应该属于第二种方式,所以选择"Reintegrate a branch",勾选"perForm pre-merge best practices checks",点击"next"(附件3.jpg)
3. 在merge from后,点击"select",从svn目录中选择我们的branch,点击"next"
4. 出现对解决冲突的默认处理,默认就可以,不用选择,默认选择出现冲突会提示我们(prompt me for each conflict and let me decide),对于text files 、Binary files、Property conflicts同样选择默认选项,点击"finish"
5. 此时svn开始从branch上逐个文件merge到trunk上,如果发现文件冲突,系统会弹出提示框询问如何处理冲突,记着我们千万不要选择不处理,冲突一定要解决,要不然很有可能,把其他项目组成员辛辛苦苦写的东西冲突掉得,所以我们应该:
a. 从冲突询问对话框中,我们可以看到我们冲突的资源是什么(Resouce:/xxx/src/com/xxx/xx/xxfile),针对于冲突系统会给出5中选项(what do you want to do?)-附件2.jpg
1. Mark as conflicted, i will deal with it later.
2. Resolve the conflict by using my version of the file.
3. Resolve the conflict by using the incoming version of the file.
4. Let me edit the file with coflict markers inserted.
5. Launch a graphical conflict resolution editor.
显然最稳妥的还是选择最后一项,使用图形编辑器解决这个冲突(就是我们平时提交代码时,解决conflict的界面),至于如何解决冲突,svn使用基本功不说了,解决完成以后,保存
b. 将冲突解决编辑器关闭,系统会自动提示"Are you done resolving conflicts for this file?",显然 i'm sure,所以我们选择"Yes, I resolved all of the conflicts in the file, Mark conflict resolved."(附件1.jpg)
c. svn会继续merge,如果发现冲突系统会继续提示,然后重复以后步骤,直到解决完成,merge工作结束。
d. merge时,可能会由于两个workspace的设置文件不同会有冲突,针对于该冲突,千万不要把branch workspace settings 拿过来,否则我们当前的workspace就不能用了,还得重新down。
相关推荐
NULL 博文链接:https://linleizi.iteye.com/blog/1962031
多分支开发,Merge是一个绕不过的话题,不管是Git还是SVN,公司用的是SVN,之前对于SVN的Merge没有很好的研究,出了些状况,这个问题不解决,顺畅地进行多分支开发就是海市蜃楼,下定决心把这块给完全搞透,在百度上...
Araxis Merge是一款比对软件工具,不仅支持单个文件的比对,而且支持对两个文件夹的所有文件进行对比,并实时修改。用了蛮久感觉很好用,所以分享给大家。 里面给大家内嵌了Araxis Merge v6.5和Araxis Merge 2017两...
Merge enables you to compare and work with different revisions of text files, such as program source code, xml and html files. Merge can extract and compare the text from Microsoft Office, ...
WinMerge uses Qt's qmake to manage projects. To create makefiles you'll need to run command: > qmake -recursive in shell/command prompt. To create VS project files, run: > qmake -recursive -tp vc ...
# how to use ? 包含使用教程,使用中有任何问题可以私信作者。 # For windows:打开 cygwin 终端,执行 vim .bashrc ,键入:alias merge='bash merge文件的路径/merge.sh',保存并退出,再执行:source .bashrc # ...
merge 比较工具 merge 比较工具merge 比较工具
Merge enables you to compare and work with different revisions of text files, such as program source code, xml and html files. Merge can extract and compare the text from Microsoft Office, ...
免费Merge比较工具 win Merge
做项目的时候通常版本与版本比较,因为下一个版本跟前一个版本差一点,可一般我们做多后查不出来,用WinMerge能很简单的查出来增加了哪里........
Araxis Merge 软件入门使用教程 Araxis Merge 软件入门使用教程 Araxis Merge 软件入门使用教程 Araxis Merge 软件入门使用教程 pdf
where human beings and robots/technology may merge to create superior beings – the era of transhumanism. Throughout the text, the work of leading researchers is presented in depth, which helps to ...
WinMerge文件比较工具,WinMerge文件比较工具
diff and merge tools, praxis merge
Araxis Merge v6.5(含破解补丁),Araxis merge是windows下最优秀的merge软件
程序员私藏的工具轻松实现项目开发一个命令发起Merge Request项目代码提交合并,可以指定代码Code View审核人。 不会用,随时私信作者。 最新git项目开发中一键发起merge request工具,自动识别本地环境,支持...
Mybatis批量foreach merge into的用法,这是介绍Mybatis批量foreach merge into的用法的文档
借助 CHM Merge 特有的功能,可以轻松构建属于自己的电子图书馆(类似 MSDN ),或者创建大型的帮助系统,方便资料的收集整理和搜索利用等。 CHM Merge 支持多层次合并,合并后生成的 CHM 文件依然可以被再次合并。...
3.3.4 Pulling New Changes from Upstream Branch 3.4 Working with Gerrit 3.4.1 Enabling Gerrit for a repository 3.4.2 Pushing a change to a Gerrit Code Review Server 3.4.3 Fetching a change from ...
SVNMerge源代码SVNMerge源代码SVNMerge源代码