專家講解 如何使用SVN創(chuàng)建項(xiàng)目
本節(jié)向大家描述一下SVN創(chuàng)建項(xiàng)目方法,內(nèi)容主要包括創(chuàng)建Repository和.添加項(xiàng)目到SVN中,在這里和大家分享一下,希望通過本文的學(xué)習(xí)大家能夠?qū)VN創(chuàng)建項(xiàng)目方法有一定的認(rèn)識。下面是具體介紹。
1.創(chuàng)建Repository
運(yùn)行命令:
svnadmincreateC:Repository
就會創(chuàng)建一個倉庫。SVN創(chuàng)建項(xiàng)目就放在倉庫下。注意:運(yùn)行命令前這個目錄不能存在,否則不能創(chuàng)建。
在倉庫下將會生產(chǎn)這些目錄:
- conf/dav/db/formathooks/locks/README.txt
- conf
- Adirectorycontainingrepositoryconfigurationfiles
- dav
- AdirectoryprovidedtoApacheandmod_dav_svnfortheirprivatehousekeepingdata
- db
- ThemainBerkeleyDBenvironment,
- fullofDBtablesthatcomprisethedatastoreforSubversion'sfilesystem(whereallofyourversioneddataresides)
- format
- Afilewhosecontentsareasingleintegervaluethatdictatestheversionnumberoftherepositorylayout
- hooks
- Adirectoryfullofhookscripttemplates(andhookscriptsthemselves,onceyou'veinstalledsome)
- locks
- AdirectoryforSubversion'srepositorylockingdata,usedfortrackingaccessorstotherepository
- README.txt
- AfilewhichmerelyinformsitsreadersthattheyarelookingataSubversionrepository
hook是很有用的,因?yàn)橥ㄟ^hook,更新代碼時,可以觸發(fā)事件,來幫助我們autobuild我們的程序。關(guān)于這方面的知識可以參考《pragmaticprojectautomation》,里面講得很詳細(xì)
2.添加項(xiàng)目到SVN中
2.1選擇倉庫的Layout
SVN創(chuàng)建項(xiàng)目中通常倉庫有兩種布局:
a.以項(xiàng)目分
/
Project1/
trunk/
tags/
branches/
Project2/
trunk/
tags/
branches/
關(guān)于什么是trunk,tags,branches我就不解釋,查看相關(guān)資料,網(wǎng)上有很多。
b.以分支為主
/
trunk/
project1/
project2/
tags/
project1/
project2/
branches/
project1/
project2/
SVN創(chuàng)建項(xiàng)目中具體使用哪種布局要看實(shí)際情況。
這里我使用a。
在workspace,創(chuàng)建目錄
project
/trunk
/tags
/branch
然后進(jìn)入project目錄
svnimport.file:///C:/BillProject/-m'init'
這樣,SVN創(chuàng)建項(xiàng)目就添加成功。就可以用eclipse來checkout項(xiàng)目了。
【編輯推薦】
- SVN創(chuàng)建項(xiàng)目方法揭曉
- 名師講解 SVN項(xiàng)目和用戶權(quán)限配置
- SVN項(xiàng)目---目錄布局詳解
- 多項(xiàng)目中SVN權(quán)限管理精辟解析
- 兩個簡單操作介紹TortoiseSVN項(xiàng)目