顯示具有 SVN 標籤的文章。 顯示所有文章
顯示具有 SVN 標籤的文章。 顯示所有文章

2013年10月24日 星期四

Subversion, TortoiseSVN 介紹

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:

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

2011年8月4日 星期四

subversion

1. # yum install mod_dav_svn 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