Linux下搭建SVN+版本冲突
環境:CentOs 6.5(最小化安裝)
參考資料:http://www.iusesvn.com/subversion/tortoisesvn_doc/
[root@localhost?~]#?yum?-y?install?subversion [root@localhost?~]#?mkdir?/svn/?-p [root@localhost?~]#?useradd?svn [root@localhost?~]#?chown?svn:svn?/svn/?-R [root@localhost?~]#?chmod?775?/svn/?-R [root@localhost?~]#?cd?/svn/ [root@localhost?svn]#?svnadmin?create?test [root@localhost?svn]#?ls test [root@localhost?svn]#?cd?test/conf/ [root@localhost?conf]#?ls authz??passwd??svnserve.conf [root@localhost?conf]#?grep?-v?^#?passwd?|grep?-v?^$ [users] admin?=?redhat yfshare=?redhat [root@localhost?conf]# [root@localhost?conf]#?grep?-v?^#?authz?|grep?-v?^$ [aliases] [groups] test?=?admin,yfshare [/] @test?=?rw [root@localhost?conf]# [root@localhost?conf]#?grep?-v?^#?svnserve.conf?|grep?-v?^$ [general] anon-access?=?none auth-access?=?write password-db?=?passwd authz-db?=?authz [sasl] min-encryption?=?0 max-encryption?=?256 [root@localhost?conf]# [root@localhost?conf]#?svnserve?-d?-r?/svn/ [root@localhost?conf]#?netstat?-tunlp|grep?svnserve tcp????????0??????0?0.0.0.0:3690????????????????0.0.0.0:*???????????????????LISTEN??????1372/svnserve???????? [root@localhost?conf]#安裝TortoiseSVN后,右鍵桌面點擊SVN checkout
提交之前,先要執行SVN update從服務器下載最新的版本,然后在執行SVN commit,可避免版本沖突
右鍵test文件夾,選擇SVN commit
上傳成功
SVN解決版本沖突:
A、B用戶執行SVN update,test文件當前版本為1
A用戶編輯后執行SVN commit后,test文件當前版本為2
B用戶編譯后執行SVN commit,由于B用戶此時的test文件版本仍為1,會同步出錯
如果B用戶對這個文件夾直接執行SVN update,由于版本不同,會生成幾個狀態文件
這時B用戶需要消除這些狀態文件,對test文件執行TortoiseSVN---Resolved
這時test文件內容會發生改變。注:如果test是純文本文件,則可以執行Resolved;如果是非純文本文件,則只能放棄修改,執行TortoiseSVN---Revert
這時B用戶就可以test文件執行SVN commit提交了
注:提交之前,先要執行SVN update從服務器下載最新的版本,然后在執行SVN commit,可避免版本沖突
工作拷貝中的每一個目錄都有一個叫作.svn的管理目錄,工作目錄中的每一個文件,Subversion在管理區域為它保留了一個備份,這是上一個版本(叫做“BASE”版本)沒有修改的(沒有關鍵字變化,沒有行結束符號轉化,沒有任何改動)拷貝,我們把這個文件當作原始拷貝或基準文件使用,它與版本庫中的文件完全一樣
轉載于:https://blog.51cto.com/yfshare/1674963
總結
以上是生活随笔為你收集整理的Linux下搭建SVN+版本冲突的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Matlab中mat2cell的使用
- 下一篇: Android在ListView滑动数据