本节向大家描述一下SVN创建项目方法,内容主要包括创建Repository和.添加项目到SVN中,在这里和大家分享一下,希望通过本文的学习大家能够对SVN创建项目方法有一定的认识。下面是具体介绍。
1.创建Repository
运行命令:
svnadmincreateC:Repository
就会创建一个仓库。SVN创建项目就放在仓库下。注意:运行命令前这个目录不能存在,否则不能创建。
在仓库下将会生产这些目录:
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
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
- 14.
- 15.
- 16.
- 17.
hook是很有用的,因为通过hook,更新代码时,可以触发事件,来帮助我们autobuild我们的程序。关于这方面的知识可以参考《pragmaticprojectautomation》,里面讲得很详细
2.添加项目到SVN中
2.1选择仓库的Layout
SVN创建项目中通常仓库有两种布局:
a.以项目分
/
Project1/
trunk/
tags/
branches/
Project2/
trunk/
tags/
branches/
关于什么是trunk,tags,branches我就不解释,查看相关资料,网上有很多。
b.以分支为主
/
trunk/
project1/
project2/
tags/
project1/
project2/
branches/
project1/
project2/
SVN创建项目中具体使用哪种布局要看实际情况。
这里我使用a。
在workspace,创建目录
project
/trunk
/tags
/branch
然后进入project目录
svnimport.file:///C:/BillProject/-m'init'
这样,SVN创建项目就添加成功。就可以用eclipse来checkout项目了。
【编辑推荐】