Getting Started with SVN (command Rollup)

Source: Internet
Author: User
Tags documentation parent directory svn svn client tortoisesvn

In the process of learning to install SVN, I feel that the reference articles provided by not easy to find, and many times in the configuration process have taken a lot of time to find the necessary chapters, so decided to write a step by Step-style introductory article.

(For beginners, SVN's official documentation is too long, but in practice, the official documentation provides a solution to the problems most users may encounter)-----April 2007 Add

This article is just a summary of my installation and use of SVN, to make it easier to find the commands you need later. Therefore, the text does not explain the concept of version control, nor write the new SVN features (can see the introduction in, so before reading it is recommended to do a general understanding of the relevant knowledge. I think that both SVN administrators and users should have some idea of the basic concepts and rankings.

Reference books: Version control with Subversion Chapter I simple server assumptions section I installation and configuration of the system environment

On the official website the installation package, which includes both the server side program and the client program. In the following introduction, we will do both the server and client walkthroughs on a single computer.

First install SVN, assuming that we install the program on c:/svn/, the server and client executables are automatically installed in the directory c:/svn/bin/.

The following is a list of the three executables used in the article:

Svn. EXE-SVN Client

SVNADMIN-SVN server-side management tools

Svnserve. EXE-SVN Service Program

CVS users know that the CVS command is not a graphical interface, SVN is the same, so the original use of VSS users need to change the graphical interface since the custom, to enter the Windows Terminal window (Cmd.exe) after the SVN use.

The first step after installing SVN is to set the path and add the route c:/svn/bin/in path.

How to access the terminal window

Select "Run ..." from the Start menu and enter CMD to determine.

How to set Path

Right-click on My Computer and select Properties to open the System Properties dialog box. Select the Advanced property page and click the Environment Variables button to add or modify the value of path in the user variable.

section II start the Svnserve service

The default service port is 3690.

This paper introduces two kinds of starting modes, the first is the inet mode, the passing parameter-I (-inet):


If there is no error message, the service is started.

In general, the use of SVN, the Svnserve as a service installed in the system, and with the system started automatically started. The second way is to install Svnserve as a service, first with the SC command to build a new service,

C:/>SC Create Svnservice binpath= "/" C:/svn/bin/svnserve. exe/"--service" displayname= "Svnservice" depend= Tcpip

Then locate the Svnservice in the services, management tools, Control Panel, change the startup mode to "Automatic" and start the service manually. section III Creating a repository

Very simple, the purpose is simply to specify a directory on the server's hard disk as the root directory of the repository.

C:/>svnadmin Create D:/svnhome

Build the parent directory in advance before building the repository, or you will be prompted for a path error.

After the build, look at the repository's directory, and the next section describes the Conf directory in which to set access permissions. section Fourth password and security

Modify the d:/svnhome/conf/svnserve.conf, and modify the passwd file according to the introduction, in order to realize the user access permission to set the repository. Please refer to the official documentation for more information.

Adding the parameter-R to the command line that starts the service specifies the root of the repository and increases the security of the server.

C:/>svnserve-i-R D:/svnroot

C:/>SC Create Svnservice binpath= "/" C:/svn/bin/svnserve. exe/"--service-r d:/svnroot" displayname= "Svnservice" depend= Tcpip

Use examples to illustrate the role of-R. If the parameter does not have-R, then the URL to access the repository is svn://host/svnhome/, which exposes the repository's path on the hard disk to the user. When you add-r, the access path becomes svn://host/. Chapter Two import and create a new project

The tool for importing the project is SVN.EXE

Provides an example of how to import.

Assuming that the local project file is stored in e:/temp/, run

C:/>SVN Import E:/temp svn://localhost/svnhome/

Tip: It is common to use the MD command in a temporary directory to create a directory structure for comparison, and to import directories into the repository. The files in the repository are then added through operations such as Checkin,checkout,add.

Chapter III SVN client and project development

Import is special, usually pm at the beginning of the project, the real project development process is not necessary, so no longer repeat the introduction.



SVN help [subcommand ...]


When you don't have the book handy, this is your best friend to use subversion.


?, h

checkout-remove a working copy from the repository.


SVN checkout url[@REV] ... [PATH]


Remove a working copy from the repository, if the base name of the Path,url is omitted as the target, if multiple URLs are given, each one will be checked out to a subdirectory of path, using the subdirectory name of the URL base name.




D:/>SVN Co svn://

To export the project to D, there is a hidden. SVN directory in Svnprj, which is used by SVN for versioning, please do not delete it.

Other commands


Fourth SVN third-party tools

Using the command line to manipulate SVN is a hassle for users, so many vendors have developed a number of tools available for graphical interface operations.

TortoiseSVN-provided by the developer of Tortoisecvs, the function is similar. Its operating system is a combination of the resource Manager, ideal for beginners to use.

Official website:

Ankhsvn-visual Studio.NET's SVN client plugin

Official website:

In Http:// you can also view all other SVN-related software, all of which are open source free.

Editor's note:

To be kind, reprint to indicate the source

If you have any suggestions for this article, or if there are any incorrect areas in the article, please contact us.


[end of full text]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.