- 浏览: 106884 次
- 性别:
- 来自: 南京
最新评论
-
jirihua:
你好 麻烦你能详细的说下 Mac上 ImageMagick的安 ...
ImageMagic的安装使用 -
java-admin:
看bu懂。
EPSG:4326 代表的是坐标系吗?
EPSG:900913 与 EPSG:4326 转换方法 -
qichunren:
你说的是什么东西啊?是gg的地图吗?要不,发一个截图上来看看啊 ...
OpenLayers Rails Plugin 使用 -
robbin:
szpapas 写道总不能为每个重命令写一个Ruby代码吧,呵 ...
Rubycook 学习心得 -
szpapas:
总不能为每个重命令写一个Ruby代码吧,呵呵。
并且这个脚本是 ...
Rubycook 学习心得
This Subversion cheat sheet was created during the initial setup of Subversion on Apache 2.0 on Windows and Mac OS X. A detailed tutorial covering most of the features of Subversion can be found in the online Subversion book. However, to make Subversion more useful for me, I created this Readers' Digest version.
Create a Repository
To store projects in Subversion, first you must create a repository. This must be done to a local drive on a local machine. Creating a repository on a network drive is not supported. To create a repository type:
UNIX
svnadmin create /path/to/repository
Windows
svnadmin create d:/path_to_repository
By default this sets up a Berkeley database to store the repository. Individual projects should be created as subdirectories of the repository directory (see the next section). Notice that the Windows version includes a drive letter, but also uses forward slashes instead of back slashes. The forward slashes are required even on Windows.
Add a New Project - svn import
To add a project, the Subversion documentation suggests that you create a directory structure like the following:
A root project directory contains three subdirectories, branches, tags, and trunk. Your files and directories are stored under the trunk directory.
Create the directories as described. Assuming the project directory is a subdirectory of the current directory, you would enter the following command
UNIX
svn import project file:///repository_name/project -m "First Import"
Windows
svn import project file:///d:/repository_name/project -m "First Import"
Network
svn import project http://host_name/svn_dir/repository_name/project -m "First Import"
Notice the Network example includes an svn_dir. This assumes you are using Apache 2.0 and the Subversion modules. When setting up Subversion on Apache, a virtual directory is created on the server that points to your repository directory. More information on Apache 2 setup is described later in this document.
This creates the initial project which you can work from. To get the files under version control, you must checkout a project to begin working on it.
Checking Out a Project - svn checkout
To start using the version control features check out a project into your local working directory. This is done with the following command:
UNIX
svn checkout file:///repository_name/project/trunk project
Windows
svn checkout file:///d:/repository_name/project/trunk project
Network
svn checkout http://host_name/svn_dir/repository_name/project/trunk project
In these examples, project is the name of the directory where you want to store the checked out project on your local file system.
Getting a List of Projects - svn list
To get a list of the current projects stored in a repository, you can use the following command.
UNIX
svn list --verbose file:///repository_name/project
Network
svn list --verbose http://host_name/svn_dir/repository_name/project
This will show you a list of each project directory in that repository.
Reviewing Changes - svn status
To see what files you have changed or added to your checked out work, use the update command:
UNIX
svn status
This command will give you a listing of new files, files that have been changed, and files that have been deleted. New files or deleted files must be added or removed using the add and delete commands (see more below.)
Adding New Files and Directories - svn add
When you add a new file or directory to a project that has been checked out, you must tell Subversion to include that file or directory in its version control.
UNIX
svn add file_or_dir_name
Adding a directory will add the directory and all the files and directories in it. However, this does not add the file or directory to the repository, you must still issue a commit to update the repository.
Deleting Files and Directories - svn delete
If you can add, you can also delete. If you wish to remove a file your directory from be versioned, you use the delete command:
UNIX
svn delete file_or_dir_name
Like add, you must perform a commit before the file is actually deleted from the repository.
However, the delete command does have another option not found in add. With the delete command you can remove files or directories from the repository. For example, the following command would remove a project and all the files under it.
Network
svn delete -m "Deleting project dir" http://localhost/svn_dir/repository/project_dir
This version of the command comes in particulary useful if someone has accidently imported files into the wrong place (I wouldn't know about that myself of course.)
Committing Changes - svn commit
Once you have added, deleted, or changed files or directories, you can then commit those changes to the repository. This command is pretty straightforward:
Network
svn commit -m "Saving recent changes" http://localhost/svn_dir/repository/project_dir
Updating Your Local Files - svn update
If you have a set of files checked out and would like to update them to the most recent version of files in the repository, use the update command.
Network
svn update
If there are newer files in the repository, they will overwrite any files you have locally. Before using this command, you may want to use the svn diff command to find out what the differences are between your local files and the repository.
Tagging Projects or Creating Project Specific Versions
Subversion does not track the version numbers for individual projects automatically. Instead, it tracks each update to the repository and tracks the versions of these updates. To create interim project releases, you must create "Tags" which identify a specify version of a project. This is done by making a virtual copy of a project in the tags directory. For example:
svn copy http://host_name/repos/project/trunk http://host_name/repos/project/tags/0.1.0 -m "Tagging the 0.1.0 release of the project"
This creates a sort of bookmark or snapshot which records the current state of the project. Then, you can checkout the project in this state at any time by simply referring to that release number.
To get a list of the releases for a project.
svn list http://192.168.0.4/svn/repos/prj1/tags
0.1.0/
Then to check out a release you would type:
svn list http://192.168.0.4/svn/repos/prj1/tags/0.1.0
A 0.1.0\dir1
A 0.1.0\dir1\file3
A 0.1.0\dir1\file4
A 0.1.0\file1
A 0.1.0\file2
A 0.1.0\textfile.txt
A 0.1.0\file3
Checked out revision 13.
Since the project has been saved in the tags directory. Release 0.1.0 can be retrieved at any time in the future.
Basic Apache Setup
You must use Apache 2.0 to install Subversion. Just compile and copy or copy the Subversion Apache module into the Apache modules directory. The following two files must be uncommented or added to the httpd.conf file:
LoadModule dav_module modules/mod_dav.so
LoadModule dav_svn_module modules/mod_dav_svn.so
Next, you must setup a location directive in the httpd.conf file to associate a directory with Subversion repositories. This example uses the SVNParentPath setting to point to a parent directory which contains repository subdirectories. This is convenient as it allows you to add as many repositories as you need without having to restart Apache or modify the httpd.conf file.
<Location /svn>
DAV svn
# All repos subdirs of d:/svn
SVNParentPath D:/svn
</Location>
Note:When using Fink to install Subversion on Mac OS X, the Subversion Apache module is stored in the Fink package listing with the prefix: libapache2. The package full name is libapache2-mod-svn. If you are using Fink, it will automatically install the modules into the correct directory.
General Notes
Below are a list of notes from initial setup and testing.
Subversion versions the repository, not individual projects. For example, I have two projects, project 1 and project 2, and check out each project when the current repository version is 3. I make changes to each project and commit those changes back to the repository. For each change, the revision number is incremented in the repository and its current version is now 5. The current revision of each project will also be 5 as they have no separate revision number.
To setup the Subversion module on Apache for Windows, I had to give the Apache Service access to the local file system. This is done on Windows by setting up a login account for the service. Setup an account in the Users application in Control Panel, make sure to set the password. Once this is done, go to the Services tool in Control Panel. Change the login for the Service to the account you created. XP will automatically give the Login as a Service privilege to the account (the OS must do this as the tools are not available XP Home, only in XP Pro). Once you do this and start and stop the Apache Service, you should be able to read and write to the repository directories. Note: Setting up a log in account for a Service can create a security hole. Consider your security requirements before doing this.
Individual files and directories that did not exist during the initial import, must be added individually using the svn add command.
发表评论
-
收藏图片
2010-09-09 00:07 0LITU100-2010.08.13 祖儿 - 3 http ... -
VMWare 7.1 key
2010-07-10 22:39 4325VMware Workstation 7.1注册机(序列号/注 ... -
iPhone IDP 申请
2010-07-10 06:34 1653现在确实好像不需要激活码了。 申请后,一天就受到扣款的邮件, ... -
Install R on mac OSX
2010-02-10 12:22 11421. 下载 安装 R R-2.10.1.pkg ... -
Macbook Pro 休眠模式
2009-12-11 09:09 31560 - 安全模式 1 - 直接写到硬盘,恢复也从硬盘恢复 ... -
100G Ethernet
2009-11-30 08:41 1027100 GE 模块 PHY 40 Gigabit E ... -
Ruby Tutorial from _why
2009-11-27 09:31 973HTML version http://mislav.uniq ... -
Martians
2009-11-26 12:54 743Prefix bits of 0.0.0.0 /8 were ... -
make point in postgres
2009-11-20 16:41 680select astext(transform(setsrid ... -
ruby multi thread 多线程 编程
2009-11-13 18:29 2147$key = 0 def thread_draw(i ... -
ubuntu mongrel-cluster nginx
2009-11-13 08:34 10481. custer gem install mongre ... -
OpenLayers 添加 map 移动后的事件
2009-10-01 23:13 1327其实很简单了,就是增加一个Openlayers map 的 “ ... -
c2k license
2009-09-29 07:29 856license.key.signature = 60q0453 ... -
tar 的用法
2009-09-19 08:10 639转自:http://dev.csdn.net/ar ... -
Snow Leopard x86_64 安装Postgres
2009-09-17 10:50 11491. 安装snow leopard 64位的postgres ... -
ipTables portforwarding 的安装方法
2009-07-04 22:52 1120下面是ipTables 的安装方法,供日后参考。 Iptab ... -
Google Earth 图片处理
2009-06-25 18:31 2145从Google Earth上抓回来的地图是4326坐标系的,J ... -
CPAN Install 过程
2009-04-21 18:15 14101. 解压缩, tar zxvf yourmodul ... -
SCP 的用法
2009-03-01 15:21 1340scp 就是 secure copy, 是用来进行远程文件拷贝 ... -
PostGis 查询
2009-02-17 11:38 19681. 查询一个网格内的所有Feature select b. ...
相关推荐
Subversion Subversion Subversion Subversion Subversion
Jenkins Subversion 插件使得Jenkins能够与Subversion仓库进行交互,进行代码的检出、更新和提交等操作。在设置Jenkins与Subversion的集成时,正确安装和配置相关插件至关重要。 首先,我们需要了解Jenkins ...
Subversion 是一个开源的版本控制系统,它用于管理文件和目录的变更历史,使得多人协作开发成为可能。在给定的压缩包文件中,包含了 `subversion-1.7.2.tar.gz` 和 `subversion-deps-1.6.1.tar.gz` 两个文件,它们是...
### Subversion Edge 详细安装与使用手册 #### 一、Subversion Edge 下载与安装 ##### 1.1 下载地址 Subversion Edge 的下载地址为:[http://www.collab.net/svnedge](http://www.collab.net/svnedge)。 ##### ...
Apache Subversion(简称SVN)是一个开源的版本控制系统,用于管理软件项目的源代码和其他文件的变更。这个"Apache-Subversion-1.14.0.zip"压缩包包含的是Subversion 1.14.0版本的命令行工具,适用于Windows操作系统...
**SubVersion 应用详解** SubVersion(简称SVN)是一种广泛使用的版本控制系统,它能够跟踪文件和目录的变更,使多个用户协同工作在同一个项目上成为可能。本讲解将深入探讨SubVersion的基础概念、安装配置、基本...
Subversion 1.2x 插件是针对Eclipse集成开发环境的一个版本控制系统插件,主要用于支持Subversion(SVN)版本控制系统的操作。Subversion是一个开源的版本控制系统,允许用户跟踪文件和目录的更改历史,便于团队协作...
Subversion(简称SVN)是一款开源的版本控制系统,它用于管理对文件和目录的更改,以便在多人协作的环境中保持数据的一致性和完整性。Subversion 1.5.1是Subversion项目的一个重要版本更新,它带来了许多改进和新...
Subversion,快速入门教程,本文是使用Subversion最快速的教程,在最短的时间里帮助您建立起一套可用的服务器环境,只需略加调整就可以应用到实际项目当中。
《使用Subversion进行版本控制 PDF中文版》这一资源,深入介绍了Subversion(SVN)这一流行版本控制系统的基本概念、操作流程以及高级功能,对于想要深入了解或学习版本控制系统的开发者来说,无疑是一份宝贵的学习...
Subversion(简称svn)是一个广泛使用的版本控制系统,用于管理和跟踪文件和目录的变更。这个"subversion-1.6.1.tar.gz"文件是Subversion 1.6.1版本的服务器端源码包,特别设计用于Linux操作系统。源码包意味着你...
Subversion是一个自由开源的版本控制系统。在Subversion管理下,文件和目录可以超越时空。Subversion将文件存放在中心版本库里,这个版本库很像一个普通的文件服务器,不同的是,它可以记录每一次文件和目录的修改...
Subversion(SVN)是一个开源的版本控制系统,用于管理对软件项目源代码的更改。它在软件开发领域中广泛使用,特别是在多人协作的环境中,帮助团队成员协同工作,跟踪文件的修改历史,以及解决合并冲突等问题。...
### 版本控制与Subversion 1.3 #### 一、版本控制概念与Subversion简介 **版本控制**是一种管理计算机程序、文档以及其他类型文件变更历史的技术。它允许开发人员跟踪不同版本之间的差异,回滚到早期版本,并且在...