ArticleDirectory
- Download the Subversion server program.
- Download the subversion of the Windows client tortoisesvn.
How to quickly create a Subversion server and use it in projects is a major concern for everyone. Compared with CVS, subversion has more options and is easier, several commands can be used to create a server environment.Animation tutorial.
This article is the fastest tutorial using subversion. It helps you establish a set of available server environments in the shortest time, and can be applied to actual projects with just a slight adjustment.
This tutorial is divided into the following sections, not only the Quick Start, but also some advanced functions. To make it simple, the tutorial is used in windows, in order to facilitate the use of resources for limited projects, there is no big difference in UNIX environments.
Software Download
Server and client Installation
Create a version Library (repository)
Configure users and permissions
Run an independent server
Initialize Import
Basic client operations
1. download the software to the Subversion server Program .
Download the binary installation file from the official website, download the Binary Package, find Windows NT, 2000, XP and 2003, and select "this directory ", so we can see a lot of download content, currently you can download svn-1.4.0-setup.exe.
Download the subversion of the Windows client tortoisesvn.
Tortoisesvn is a tool that extends Windows Shell and can be seen as a plug-in for Windows resource manager. After installation, Windows can identify the working directory of subversion.
The official website is tortoisesvn. The download method is similar to that of the svn server. On the download page, we can select the version to download. Currently, the installation file of the highest stable version isTortoiseSVN-1.4.0.7501-win32-svn-1.4.0.msi.
2. server and client Installation
Install the server and run svn-1.4.0-setup.exe directly. Follow the prompts to install svn-1.4.0-setup.exe. In this way, we have an environment where the server can run.
Install tortoisesvn and run it directly.TortoiseSVN-1.4.0.7501-win32-svn-1.4.0.msiFollow the prompts to install it. However, after the installation is complete, the system will prompt whether to restart. In fact, the restart only takes effect for the special style of SVN copy in windows, which has nothing to do with all the actual functions, in order to see the effect immediately, restart the machine.
3. Create a version Library (repository)
To run the Subversion server, you must first create a version Library (repository), which can be seen as a database for storing data on the server. After the Subversion server is installed, you can run it directly, for example:
Svnadmin create E: \ svndemo \ Repository
A version library is created under the directory e: \ svndemo \ repository.
We can also use tortoisesvn to perform this step graphically:
Right-click the directory e: \ svndemo \ repository and choose tortoisesvn> Create repository here... ", then you can select the version library mode. Here you can use the default mode, and then create a series of directories and files.
4. Configure users and permissions
Go to the E: \ svndemo \ repository \ conf directory and modify svnserve. conf:
# [General]
# Password-DB = passwd
Changed:
[General]
Password-DB = passwd, modify the passwd file in the same directory, and remove the following three lines of comment:
# [Users]
# Harry = harryssecret
# Sally = sallyssecret
Finally changed:
[Users]
Harry = harryssecret
Sally = sallyssecret
5. Run the independent server
Run the following command in any directory:
Svnserve-d-r e: \ svndemo \ repository our server program has started.Do not close the command line window. Close the window will also stop svnserve.
6. initialize the Import
Go to the project root directory we want to import. In this example, E: \ svndemo \ initproject. the directory contains a readme.txt file:
Right-click tortoisesvn and choose import...
Enter "SVN: // localhost/" in the URL of repository /"
OK
After that, the directory remains unchanged. If no error is reported, all the data has been imported to the version library we just defined.
Note that this step can be performed on another host with tortoisesvn installed. For example, if the IP address of the host running svnserve is 133.96.121.22, the content entered in the URL section is "SVN: // 133.96.121.22 /".
7. Basic client operations
Extract the version library to a working copy:
Go to any empty directory, in this example, E: \ svndemo \ wc1, right-click-> checkout, enter SVN: // localhost/in URL of repository /, in this way, we get a copy of work.
Make changes in the work copy and submit:
Open readme.txt, modify it, and right-click commit... to submit the modification to the version library. We can run it.
View the modifications:
Right-click readme.txt-> tortoisesvn-> show log, so that we can see all the submissions to this file. Right-click on version 1 and choose compare with working copy. We can compare the differences between the working copy file and Version 1.
Finally, all the content has been recorded as an animation file for your reference.
If you have any comments in this tutorial, you can discuss them in the Forum.
Reprint address: http://www.subversion.org.cn/index.php? Option = com_content & task = view & id = 56 & Itemid = 9
PS
Install subversion into service
SC create svnservice binpath = "\" C: \ Program Files \ subversion \ bin \ svnserve.exe \ "-- service-R E: \ svndemo "displayname =" svnservice "depend = TCPIP start = auto