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的知识,减少冲突,集中时间放在开发上. 解决冲突有三种方式: ... 
随机推荐
- gluoncv voc_detection
			https://github.com/zhreshold/gluon-cv/commit/73b3986aaa2e0d0e6f3f428c12072e3a9d29905e gluoncv可能版本还没更 ... 
- thinkphp3.2.3代码审计
			<?php namespace Home\Controller; use Think\Controller; class UserController extends Controller { ... 
- 图论——最短路径 Dijkstra算法、Floyd算法
			1.弗洛伊德算法(Floyd) 弗洛伊算法核心就是三重循环,M [ j ] [ k ] 表示从 j 到 k 的路径,而 i 表示当前 j 到 k 可以借助的点:红色部分表示,如果 j 到 i ,i 到 ... 
- 【ES6】最常用的es6特性(二)
			1.for of 值遍历 for in 循环用于遍历数组,类数组或对象,ES6中新引入的for of循环功能相似,不同的是每次循环它提供的不是序号而是值. var someArray = [ &quo ... 
- 《metasploit渗透测试魔鬼训练营》学习笔记第六章--客户端渗透
			四.客户端攻击 客户端攻击与服务端攻击有个显著不同的标识,就是攻击者向用户主机发送的恶意数据不会直接导致用户系统中的服务进程溢出,而是需要结合一些社会工程学技巧,诱使客户端用户去访问这些恶意 ... 
- Apache PDFbox开发指南之PDF文档读取
			转载请注明来源:http://blog.csdn.net/loongshawn/article/details/51542309 相关文章: <Apache PDFbox开发指南之PDF文本内容 ... 
- MFC窗体程序中添加调试控制台
			在编写复杂程序的过程中,我们经常需要将一些信息输出到文件或者屏幕上.较控制台应用程序,MFC窗体程序要显得麻烦一些! 下面有2种方法来实现为MFC窗体程序添加调试控制台,方便程序员调试程序和了解当前程 ... 
- linux内存管理---物理地址、线性地址、虚拟地址、逻辑地址之间的转换
			linux内存管理---虚拟地址.逻辑地址.线性地址.物理地址的区别(一) 这篇文章中介绍了四个名词的概念,下面针对四个地址的转换进行分析 CPU将一个虚拟内存空间中的地址转换为物理地址,需要进行两步 ... 
- 排列组合:01转换法之lua实现
			c++ 版连接 https://blog.csdn.net/canguanxihu/article/details/46363375 因为项目用的是lua脚本,看了C++版后自己写了一个lua版本的, ... 
- 【学时总结】 ◆学时·III◆ 二分图
			[学时·III] 二分图 ■基本策略■ 其实本质是图论中的网络流 二分图是两个由多个点组成的集合(上部和下部,且没有重叠),两个集合中的点不与该集合内其他的点连通,但和另一个集合内的点连通.我们称这两 ... 
