Getting Started with SVN (command Rollup)

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

In the process of learning to install SVN, I feel that the reference articles provided by http://svnbook.subversion.org.cn/are 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 http://svnbook.subversion.org.cn/), 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 http://svnbook.subversion.org.cn Chapter I simple server assumptions section I installation and configuration of the system environment

On the official website http://subversion.tigris.org/Download 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):

C:/>svnserve-i

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.

Help-Helping

Grammar:

SVN help [subcommand ...]

Describe:

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

Alias:

?, h

checkout-remove a working copy from the repository.

Grammar:

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

Describe:

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.

Alias:

Co

Example:

D:/>SVN Co svn://127.0.0.1/svnhome/d:/svnprj/

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

Slightly

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: http://tortoisesvn.tigris.org

Ankhsvn-visual Studio.NET's SVN client plugin

Official website: http://ankhsvn.tigris.org/

In Http://www.tigris.org/servlets/ProjectList 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.

E-mail: liyue80@gmail.com

[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: info-contact@alibabacloud.com 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.