SVN設置同步後,不能同步服務器

之前都是正常提交,因爲沒有涉及到衝突問題,這次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不同步問題

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章