Subversion(svn)是個很有名的revision control system,在許多open source專案都有被使用到,在協同工作的環境中(個人使用也可以),幫助管理檔案的版本,也可回復到之前的版本,方便追蹤軟體或文件的開發過程。Subversion是個集中式的管理機制,大部分的動作都需要與repository連線來完成,所以若是repository不正常或其他原因無法access到就不能做svn的操作了(Git可以),算是svn的缺點。
TortoiseSVN是一隻Subversion的GUI Client程式,可以方便使用者操作svn而不需要透過command line的方式,但前提是使用者還是必須對svn的各個操作有所認識才行。TortoiseSVN也整合了Office的文件,可以做版本差異的比對,方便解決conflict。
一般svn的convention(慣例)是在project的repository下建立三個directory分別是/trunk, /branches, /tags。/trunk裡面放main line of development,後續可merge進其他的branch進來。/branches裡面放各個branch,一個branch取一個directory名子,通常是從/trunk branch(svn copy)進來這裡。/tags裡面放各版的release版本,和branches directory類似,只是通常就是定版了,不會再commit或merge新的東西進來。
一般操作流程
1. Check Out一個project
2. 編輯內容(新增一個功能或是修正bug)
3. Update
4. Commit
若是要先branch,完成後再merge進trunk
1. Branch: svn copy path/trunk path/branches/feature01
2. 在path/branches/feature01做修改
3. Update & Commit
4. Merge: 先cd到path/trunk在svn merge path/branches/feature01
Reference:
個人在學習Linux過程當中的個人筆記,提供個人及有需要的人查閱,若有錯誤歡迎提供指正,謝謝。 This Blog recorded notes about my learning Linux and provides myself and others reference. If there are any incorrect information, welcome to leave a message to correct me, Thanks.
2013年10月24日 星期四
2012年3月14日 星期三
Eclipse設定SVN以及Mercurial
1. install EclipseMercurial
Update Site: http://cbes.javaforge.com/update
2. install SVN Connector:
Update Site: http://download.eclipse.org/technology/subversive/0.7/update-site/
(the site address might be duplicated)
(under Ubuntu)
1. install mercurial
>sudo apt-get install mercurial
2. install subversion
>sudo apt-get install subversion
Update Site: http://cbes.javaforge.com/update
2. install SVN Connector:
Update Site: http://download.eclipse.org/technology/subversive/0.7/update-site/
(the site address might be duplicated)
(under Ubuntu)
1. install mercurial
>sudo apt-get install mercurial
2. install subversion
>sudo apt-get install subversion
2011年8月4日 星期四
subversion
1. # yum install mod_dav_svn subversion
2. # cd /etc/httpd/conf.d/
# vim subversion.conf
3. htpasswd -cm /etc/svn-auth-conf yourusername
New password:
Re-type new password:
Adding password for user yourusername
reference:
http://wiki.centos.org/HowTos/Subversion
2. # cd /etc/httpd/conf.d/
# vim subversion.conf
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
<Location /repos>
DAV svn
SVNPath /var/www/svn/repos
AuthType Basic
AuthName "Subversion repos"
AuthUserFile /etc/svn-auth-conf
Require valid-user
</Location>
3. htpasswd -cm /etc/svn-auth-conf yourusername
New password:
Re-type new password:
Adding password for user yourusername
reference:
http://wiki.centos.org/HowTos/Subversion
訂閱:
文章 (Atom)