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:定时任务模块schedule
1.安装 pip install schedule 2.文档 https://schedule.readthedocs.io/en/stable/faq.html#how-to-execute-job ...
- 【bzoj2154】Crash的数字表格 莫比乌斯反演
题目描述 今天的数学课上,Crash小朋友学习了最小公倍数(Least Common Multiple).对于两个正整数a和b,LCM(a, b)表示能同时被a和b整除的最小正整数.例如,LCM(6, ...
- canvas二三事之签名板与视频绘制
今天,不知道怎么的就点开了语雀,然后就看到了<HTML5 Canvas 教程>,开始了canvas的研究(学习)之旅. 首先,想到的第一个东西就是签名板,上代码: <canvas i ...
- Kali-linux使用Metasploitable操作系统
Metasploitable是一款基于Ubuntu Linux的操作系统.该系统是一个虚拟机文件,从http://sourceforge.net/projects/metasploitable/fil ...
- windows下更新npm的命令实现
Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force npm install -g npm-windows-upgrade npm-wi ...
- vlc源码分析(四) 调用libts接收TS流
代码分析前,先要了解TS流基本概念:TS流之基本概念. VLC解析TS流是通过libts库来分离的,libts库使用libdvbpsi库来解TS表.VLC使用模块加载机制来加载libts库,具体调用的 ...
- windows 建立任务执行计划 自动执行脚本
对于windows服务器网站如果要定时执行脚本,则需要在windows控制面板里找到 管理工具,点击任务计划程序,创建任务填写任务名称 触发器里新建触发条件,设置间隔时间 在操作项,新建触发时需要做的 ...
- TCL-事务
一.含义事务:一条或多条sql语句组成一个执行单位,一组sql语句要么都执行要么都不执行二.特点(ACID)A 原子性:一个事务是不可再分割的整体,要么都执行要么都不执行C 一致性:一个事务可以使数据 ...
- ionic ios 打包
1.安装Xcode 从appstore 安装就行 2.安装node.js 3.安装cordova 由于权限问题 网络问题 可以考虑一下方式 1️⃣使用淘宝镜像 npm install ...
- PHP的strtotime()函数2038年bug问题
最近在开发一个订单查询模块的时候,想当然的写了个2099年的日期,结果PHP返回了空值,肯定是发生溢出错误了,搜索了网上,发现下面这篇文章,但是我的问题依然没有解决,要怎么得到2038年以后的时间戳呢 ...