How to build an SVN server on this machine

Source: Internet
Author: User
Tags tortoisesvn

How to quickly build Subversion server, and used in the project, this is the most concern for everyone, compared with CVS, Subversion has more choices, but also more easy, a few commands can be set up a server environment, can be used, there are animation tutorials .
This is the quickest tutorial to use Subversion to help you set up a server environment that is available in the shortest possible time and can be applied to real projects with a little tweaking.
This tutorial is divided into the following departments, not just QuickStart, finally we have some advanced features of the description, in order to illustrate the simple, the tutorial is used under Windows, in order to facilitate the use of resources limited projects, for the UNIX environment, the difference is not big.

Software download

Server and Client Installation

Build Repository (Repository)

Configure Users and Permissions

Running a standalone server

Initialize Import

Basic client Operations

1, software downloadDownload the Subversion server program.

To the official website of the download binary installation file, come to the binary package download section, find the Windows NT, the 2003 section, and then select "This directory" so that we can see a lot of downloaded content that can now be downloaded Svn-1.4.0-setup.exe.

Download subversion for Windows client TortoiseSVN.

TortoiseSVN is a set of tools for extending Windows shell that can be thought of as a plug-in for Windows Explorer, and Windows can identify the working directory of Subversion after installation.
The official website is tortoisesvn, download way and similar to the previous SVN server, on the download page we can choose to download the version, the current highest stable version of the installation file for Tortoisesvn-1.4.0.7501-win32-svn-1.4.0.msi.

2, Server and client Installation

Server installation, directly run Svn-1.4.0-setup.exe, according to the prompts to install, so that we have a set of servers to run the environment.

Install TortoiseSVN, also directly run Tortoisesvn-1.4.0.7501-win32-svn-1.4.0.msi Follow the prompts to install, but the final completion will prompt whether to restart, In fact, restarting just makes the SVN working copy in Windows Special style effective, regardless of all the actual functions, here in order to see the good effect immediately, or restart the machine.

3, Build repository (Repository)

Running the Subversion server requires first establishing a repository (Repository), which can be viewed as a database of data on the server and can be run directly after the Subversion server is installed, such as:

Svnadmin Create E:/svndemo/repository

A repository is created under directory e:/svndemo/repository.

We can also use TORTOISESVN to graphically complete this step:
In the directory E:/svndemo/repository "right->tortoisesvn->create Repository here ...", then you can choose the repository mode, where the default is used, and then create a series of directories and files.


4, configuring Users and Permissions

Come to e:/svndemo/repository/conf directory, modify svnserve.conf:
# [General]
# password-db = passwd
Switch
[General]
PASSWORD-DB = passwd then modifies the passwd file of the same directory, removing the comments from the following three lines:
# [Users]
# Harry = Harryssecret
# sally = Sallyssecret
Finally becomes:
[Users]
Harry = Harryssecret
sally = Sallyssecret

Here, because in general, the project SVN user name and password is unified authentication, and in order not to enter the password every time, so when using TORTOISESVN, directly remember the password, here the user name and password is best and the project consistent, so as to avoid unexpected situation.

5, running a standalone server

Run in any directory:
Svnserve-d-R e:/svndemo/repository Our server program has started. be careful not to close the command-line window, and close the window will also stop Svnserve.

Found in use, even if you close this window, SVN as well ~ ~ Don't know why ~


6, initialize the import

Come to the root of the project that we want to import, in this case it is e:/svndemo/initproject, and there is a Readme.txt file in the directory:


Right-click->tortoisesvn->import ...
URL of repository input "svn://localhost/"
Ok
After the completion of the directory without any changes, if there is no error, the data has been fully imported into the repository we have just defined.

It is important to note that this step can be done entirely on another host with TortoiseSVN installed. For example, the IP of the host running Svnserve is 133.96.121.22, and the URL part of the input is "svn://133.96.121.22/".

Here, do not know why, the use of svn://localhost/has been uncertain, the last brainwave use of file:///E:/svndemo/repository/ instead of the ~ ~


7, Basic client operation

Remove Repository to a working copy:
Come to any empty directory, in this case E:/SVNDEMO/WC1, run right->checkout, enter svn://localhost/in URL of repository, so we get a copy of the work.
Make changes in the working copy and submit:
Open the Readme.txt, make the changes, then right-->commit ... so we can commit the changes to the repository and we'll run it.

Review the changes made:
Readme.txt Right-->tortoisesvn->show Log so we can see all the commits we have for this file. On version 1 Right-->compare with working copy, we can compare the difference between the working copy of the file and version 1.

If you learn a little bit more, write one less line of code.


How to build an SVN server on this machine

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.