svn 冲突处理
C:\workspace\test>svn upConflict discovered in 'test.txt'.
Select: (p) postpone, (df) diff-full, (e) edit,
(mc) mine-conflict, (tc) theirs-conflict,
(s) show all options:
svn detects that theres a conflict here and require you to take some kind of action.
If you type ‘s’ here you will get a list of the commands and meaning
如果你输入s选项,则会列出所有svn解决冲突的选项,如下所示:
(e) edit - change merged file in an editor #直接进入编辑
(df) diff-full - show all changes made to merged file #显示更改至目标文件的所有变化
(r) resolved - accept merged version of file
(dc) display-conflict - show all conflicts (ignoring merged version) #显示所有冲突
(mc) mine-conflict - accept my version for all conflicts (same) #冲突以本地为准
(tc) theirs-conflict - accept their version for all conflicts (same) #冲突以服务器为准
(mf) mine-full - accept my version of entire file (even non-conflicts)#完全以本地为准
(tf) theirs-full - accept their version of entire file (same) #完全以服务器为准
(p) postpone - mark the conflict to be resolved later #标记冲突,稍后解决
(l) launch - launch external tool to resolve conflict
(s) show all - show this list
【选择处理方式一:df】
If you type ‘df’ it will show you a all the conflicts in the following format
选择选项df,则会按如下格式显示所有冲突
Select: (p) postpone, (df) diff-full, (e) edit,
(mc) mine-conflict, (tc) theirs-conflict,
(s) show all options: df
--- .svn/text-base/test.txt.svn-base Tue Aug 10 10:59:38 2010
+++ .svn/tmp/test.txt.2.tmp Tue Aug 10 11:33:24 2010
@@ -1 +1,3 @@
-test
\ No newline at end of file
+<<<<<<< .mine +test User2 making conflict======= +User1 is making a conflict test>>>>>>> .r3
‘e’ option will open the conflicted file in the text editor that you configured for svn to use. In this case it will show
<<<<<<< .mine test User2 making conflict======= User1 is making a conflict test>>>>>>> .r3
You can resolve the conflict here by changing the text to what you desire.
For example:
你可以解决冲突通过改变文件内容,例如vim test.txt
User1 is making a conflict test User2 making conflict
save your changes and exit your text editor and it will give you the conflict options again. Now if you use the ‘r’ it will mark the file is merged with a ‘G’. A status of ‘G’ means there was a conflict and it has been resolved.
保存更改,又出现刚才的选项。此时你使用r选项,则会合并文件。如下所示:
Select: (p) postpone, (df) diff-full, (e) edit, (r) resolved,
(mc) mine-conflict, (tc) theirs-conflict,
(s) show all options: e
Select: (p) postpone, (df) diff-full, (e) edit, (r) resolved,
(mc) mine-conflict, (tc) theirs-conflict,
(s) show all options: r
G test.txt
Updated to revision 3.
you can now check the status with svn status. You see that test.txt is marked as ‘M’ all thats left to do is commit.
检查svn状态,你会发现文件test.txt前面已变成M
C:\workspace\test2>svn st
M test.txt
C:\workspace\test2>svn ci -m "conflict resolved"
Sending test.txt
Transmitting file data .
Committed revision 4.
【选择处理方式二:p】
Sometimes the conflicts are a bit more extensive and it requires more time or better tools to resolve the conflict in these cases you can chose ‘p’ to postpone the resolution.
有时,冲突会复杂一些,可能需要借助其他工具才能解决,这时你可以使用选项p
Select: (p) postpone, (df) diff-full, (e) edit, (r) resolved,
(mc) mine-conflict, (tc) theirs-conflict,
(s) show all options: p
C test.txt
Updated to revision 3.
Summary of conflicts:
Text conflicts: 1
Now if you look in your directory you will see that svn has created a few extra files for you.
此时,查看当前文件夹下,出现了如下几个文件
08/10/2010 11:44 AM 94 test.txt
08/10/2010 11:44 AM 26 test.txt.mine
08/10/2010 11:44 AM 27 test.txt.r2
08/10/2010 11:44 AM 31 test.txt.r3
The test.txt file is now a file with both User2 and User1′s changes but marked.
文件test.txt包含了用户1和用户2的更改。
svn 冲突处理的更多相关文章
- SVN冲突
svn冲突,导致工程打不开,报错:xxx..xcodeproj cannot be opened because the project file cannot be parsed. 解决方法: ...
- 项目优化经验分享(六)SVN冲突和处理
上一篇博客我们分享了新增需求的确定思想<站在全局看问题>.今天我们来分享项目开发中SVN冲突的解决经验:SVN冲突和处理! 引言 开发过项目的人都知道,公司开发一个项目都会使用到版本号控制 ...
- svn冲突文件解决方法
svn冲突文件解决方法 工具/原料 svn客户端 方法/步骤 1 通过SVN客户端更新需要的文件,如果出现有感叹号的文件,找到出现感叹号的文件. 2 选择感叹号文件,即冲突文件,单击鼠标右键对冲突文件 ...
- 【转】svn冲突问题详解 SVN版本冲突解决详解
(摘自西西软件园,原文链接http://www.cr173.com/html/46224_1.html) 解决版本冲突的命令.在冲突解决之后,需要使用svnresolved来告诉subversion冲 ...
- svn冲突的解决
svn文件冲突的解决 冲突后,会产生三个多余的文件. ①文件名.扩展名.mine 这是你的文件,在你更新你的工作副本之前存在于你的工作副本中--也就是说,没有冲突标志.这个文件 除了你的最新修改外没有 ...
- eclipse svn 冲突解决
eclipse svn 冲突解决
- tortoise svn冲突解决
Tortoiese svn 冲突解决 当文件被别人修改并提交到SVN服务器后,如果自己本地的文件没有被更新为最新的版本,而且已经做了修改,这时候提交将会被成功,系统会提示你的版本已经过期,并要求你先进 ...
- Tortoise svn 冲突解决主要办法
Tortoise svn 冲突解决主要办法 1.先备份自己的修改文件后,然后revert自己的更新内容,然后提交,再以更新后的代码为基准,将备份的代码移入进来.在这种方式下不需要使用svn resol ...
- svn冲突问题详解 SVN版本冲突解决详解
svn冲突问题详解 SVN版本冲突解决详解 (摘自西西软件园,原文链接http://www.cr173.com/html/46224_1.html) 解决版本冲突的命令.在冲突解决之后,需要使用svn ...
- SVN学习总结(2)——SVN冲突解决
在我们用VS进行项目合作开发的过程中,SVN的提交控制是至关重要的,大家不可避免的都遇到过SVN冲突的问题,开发的时候,应该认真学习SVN的知识,减少冲突,集中时间放在开发上. 解决冲突有三种方式: ...
随机推荐
- 用Web技术开发客户端(一)
http://www.cnblogs.com/lefan/archive/2012/12/27/2836400.html 范怀宇(@duguguiyu)分享了<豌豆荚2.0重构时遇到的坑> ...
- html5物理定位误差大 解决办法
学生党在做比赛作品,项目中需求要用到定位功能并以地图形式展现.所以思路就是用h5的geolocation 获取经纬度,通过百度地图api将经纬度转换成详细的地址以及地图.在笔记本电脑做测试,定位总有超 ...
- VC++使用socket进行TCP、UDP通信实例总结
1. 两台计算机通信需要协议,通信的两台计算机IP必须唯一 2. 同一个计算机可以进行多个应用程序与其他计算机通信,IP地址唯一,而端口号是区别同一计算机(同一IP)的唯一 ...
- 【题解】洛谷P1373 小a和uim之大逃离(坐标DP)
次元传送门:洛谷P1373 思路 设f[i][j][t][1/0]表示走到(i,j)时 小a减去uim的差值为t 当前是小a取(0) uim取(1) 那么转移就很明显了 f[i][j][t][]=(f ...
- linux内核netfilter连接跟踪的hash算法
linux内核netfilter连接跟踪的hash算法 linux内核中的netfilter是一款强大的基于状态的防火墙,具有连接跟踪(conntrack)的实现.conntrack是netfilte ...
- 多线程系列之 Java多线程的个人理解(一)
前言:多线程常常是程序员面试时会被问到的问题之一,也会被面试官用来衡量应聘者的编程思维和能力的重要参考指标:无论是在工作中还是在应对面试时,多线程都是一个绕不过去的话题.本文重点围绕多线程,借助Jav ...
- [iOS]UIDynamicAnimator动画
创建动画 UIDynamicAnimator *animator = [[UIDynamicAnimator alloc] initWithReferenceView:self.view]; 协议代理 ...
- 多线程编程初探——OO第二单元作业回顾
一.作业设计策略 1)执行FAFS策略的单部电梯 由于对多线程不是很了解,于是采用了理论课上介绍的生产者消费者模型作为设计模板(也是很多同学一开始的做法):将请求队列作为共享对象(托盘),名为In ...
- Linux 三剑客之sed命令总结
sed ### sed ### .关键字取行 sed -n '/jpinsz/p' test.txt sed -n '/^d/p' test.txt .根据行数取行 sed -n '2,5p' tes ...
- cookie的简单认识
1.cookie Cokie又叫会话跟踪技术,实际上就是客户端硬盘上的一个文本文件,该文件用来存储一些数据. 首先,HTTP请求时无状态的,也就是说,你打开一个网页和下一个网页之间没有任何关系,数据不 ...