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的知识,减少冲突,集中时间放在开发上. 解决冲突有三种方式: ...
随机推荐
- python中的BaseManager通信(二)文件二分
提供服务部分(运行时在接收端未打开前不能关闭) #mainsec.py from multiprocessing import Process, Queue from multiprocessing. ...
- QTP基本方法
1.for循环: m代表间隔循环长度: 如果m>0,则j要大于i: 如果m<0,则i要大于j: for i to j [step m] 语句块 [exit for]//强制退出循环 nex ...
- C# foreach遇到async和await
一个简单的列子,需要把一个集合的数据添加到数据库中. 我先这样写了,然后报错了 public async Task<IHttpActionResult> Test([FromUri]str ...
- fdfs上传图片成功在浏览器中访问不到404 Not Found
1.检查自己nginx配置文件,看是否有 user root这行 . 在nginx.conf文件里加一条:user root; 2.检查自己配置文件: storage.conf中的文件路径是否正确 ...
- mybatis的Mapper.xml文件SQL语句BadSqlGrammarException之FUNCTION错误系列
想必各位在开发过程中一定使用过:统计的功能,用到了很多SQL的函数,于是就直接写在Mapper文件中了: 比如: member_num,MAX(ID) AS newestLoanID,MIN (ID) ...
- Servlet基础知识总结
Servlet是JavaWeb应用开发的核心组件.Servlet运行在Servlet容器中(例如最常用的Tomcat),它可以为各种客户请求提供相应服务.Servlet可以轻松完成以下任务: 动态生成 ...
- node多图或者单图上传
<form id="form" enctype="multipart/form-data"> <input type="text&q ...
- BZOJ1969: [Ahoi2005]LANE 航线规划(LCT)
Time Limit: 10 Sec Memory Limit: 64 MBSubmit: 587 Solved: 259[Submit][Status][Discuss] Description ...
- mysql如何批量删除数据表
-- 注意这里的`是英文输入法状态下,主键盘数字1的左边的键.drop table `user`,`c_class`;
- 大数据:Map终结和Spill文件合并
当Mapper没有数据输入,mapper.run中的while循环会调用context.nextKeyValue就返回false,于是便返回到runNewMapper中,在这里程序会关闭输入通道和输出 ...