之前都是正常提交,因为没有涉及到冲突问题,这次SVN更新后不能同步WEB服务器,网上找了很多办法,都不行最后找到原因,原来是冲突引起的
当出现电脑本地更新,服务器端不能同步的时候,先用命令更新更新试试
SVN更新命令 cd到SVN同步的目录,比如/www/web
输入:svn up
回车
此时如果提示
Conflict 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.
表示冲突了,输入S 回车
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 #完成文件编辑之后,通知svn你已经解决了文件的冲突
(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 #显示所有选项
选择tf
选项,同步服务器最后上传的内容
参考博客:解决svn不同步问题
网友评论