Window SVN local Build

Source: Internet
Author: User
Tags tortoisesvn

1. Download SVN server and client from official website;

2, install the server and the client, after installing the client requires restart;

3. Build Repository (repository)

Method One: Command line mode

First, create the Svnroot folder under the E-drive,

Then, open the Command window, type

Svnadmin Create E:\svnroot\repository

This creates the Repository folder under the E:\svnroot directory and generates the appropriate files under the Repository folder. (note cannot be created recursively, E:\svnroot must be established beforehand.)

Method Two: Graphical way

Still create a new E:\svnroot\repository folder, where the Repository folder must be empty.

Go to the Repository folder, right-select Tortoisesvn->create repository here, as

You can create a repository in either of two ways, as shown below:

4. Modify the configuration file

Under E:\svnroot\repository\conf, you will see three files of Authz, passwd and svnserve.conf, where we will modify both the svnserve.conf and the passwd configuration files.

Modify the svnserve.conf as follows:

# # # This file controls the configuration of the Svnserve daemon, if you### with it to allow access to this repository. (If you are allow### access through http:and/or file:urls, then this file is### irrelevant.) # # # Visit http://subversion.apache.org/for more information. [general]### the Anon-access and auth-access options control access to the### repository for unauthenticated (a.k.a. Anony MOUS) Users and### Authenticated users, respectively.### Valid values are "write", "read", and "None". # # # Setting The Valu E to "None" prohibits both reading and writing;### "read" allows read-only access, and "write" allows complete # # # # READ/WR ITE access to the repository.### the sample settings below is the defaults and specify that anonymous### users has read- Only access to the repository, while authenticated### users has read and write access to the repository.anon-access = Rea  Dauth-access = write### The PASSWORD-DB option controls the location of the the password### database file. UnlessSpecify a path starting with a/,### the file's location was relative to the directory containing### this configuration fil e.### If SASL is enabled (see below), this file won't be used.### uncomment the line below to use the default password  File.password-db = passwd### The AUTHZ-DB option controls the location of the authorization### rules for path-based access  Control. Unless specify a path### starting with a/, the file's location is relative to the the### directory containing this fi  Le. If you don ' t specify an### authz-db, no path-based access control are done.### uncomment the line below to use the default Authorization file.# authz-db = authz### This option specifies the authentication realm of the repository.### If the repos  Itories has the same authentication realm, they should### has the same password database, and vice versa. The default realm### is repository ' s uuid.# realm = My First repository### the force-username-case option causes svnserve To case-normalize###Usernames before comparing them against the authorization rules in the### AUTHZ-DB file configured above. Valid values is "upper" (to upper-### case the usernames), "lower" (to lowercase of the usernames), and### "None" (to Compar e usernames as-is without case conversion, which### are the default behavior). # Force-username-case = none[sasl]### this op tion Specifies whether you want to use the Cyrus sasl### library for authentication. Default is false.### the This section would be ignored if svnserve are not built with cyrus### SASL support; To check, the run ' Svnserve--version ' and look for a line### reading ' Cyrus SASL authentication is available. ' # USE-SASL = true### These options specify the desired strength of the security layer### that you want SASL to provide. 0 means no encryption, 1 means### integrity-checking only, values larger than 1 is correlated### to the effective key Len Gth for encryption (e.g. means 128-bit### encryption). The values below is the defaults.# min-encryption =0# max-encryption = 256 

Even if anon-access = read, auth-access = write, and password-db = passwd are in effect, be careful not to cancel the comment authz-db = Authz, otherwise the authentication will fail later.

The meanings of each field are explained in detail in the comments.

Modify the passwd as follows:

# # # This file is a example password file for svnserve.### It format is similar to that of svnserve.conf. As shown in the### example below it contains one sections labelled [users].### the name and password for each user follow, One account per line. [users]# Harry = harryssecret# sally = Sallyssecretjack = Jack

Here we have added a user jack, the password is jack. The format is user = passwd, one row per account.

5. Start Subversion Service

Method one, command line startup

At the command line, type

Svnserve-d-R E:\svnroot\repository

-d/--daemon: Run as Daemon

-r/--root: Set Svn://localhost, Svn://localhost here for E:\svnroot\repository

The default port is 3690, and if the port number is already occupied, it can be set by the option--listen-port= port number.

Method Two, Windows service startup

Setup has not yet installed itself as a Windows service and requires manual installation, as follows: Open a command window and execute the following command:

SC create Svnserve binpath= "F:\Develop\Subversion\bin\svnserve.exe--service-r e:\svnroot\repository" Displayname= " Subversion "Depend=tcpip Start=auto

If the execution succeeds, it will show

[SC] CreateService success

Explanation of the parameters in the command:

    • SC is a service configuration program that comes with Windows.
    • The parameter binpath represents the installation path of the Svnserve executable file, and if the installation path contains spaces, escape it, as
Binpath= "\" F:\Program files\subversion\bin\svnserve.exe\ "--service-r d:\svnroot\repository"
    • The--service parameter means to run as a Windows service,
    • -r/--root indicates the location of the SVN repository, the service parameter and the root parameter are all part of the binpath, so the path to the Svnserve.exe is enclosed in a pair of double quotes, and the double quotes do not need to be escaped.
    • DisplayName represents the name displayed in the Windows Services list
    • DEPEND=TCPIP indicates the operation of the Svnserve service requires TCPIP service
    • Start=auto indicates automatic operation after power-on
    • To uninstall the SVN service, execute the SC delete svnserve to

Win+r, type services.msc Enter, and you will see the service subversion that you just created:

After installing the service, Svnserve to wait for the next boot to run automatically, of course, we can also start the service manually now.

6. Initialize the Import project

(1) Select the items you want to import

(2) Insert URL and message

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/".

(3) Type the user name and password

(4) Successful file import

At this point we basically completed the SVN server installation, configuration, start, import projects and a series of operations. Here are some basic operations.

1. Remove (check out)

Remove Repository to a working copy:

Create an empty folder like work, right-->svn Checkout, enter "Svn://localhost/cppproj" in "URL of repository" so we get a working copy of the content in Cppproj.

Now the Work folder icon is as follows, you can find the lower left corner more a check.

Work folder content is as follows, can be found to be cppproj project content.

2. Deposit (check in)/Submit (Commit)

Make changes in the working copy and submit:

Once the file has been modified, there will be a change mark in the lower left corner of the icon, as follows Main.cpp:

At this point, "right-click SVN Commit ... ", we submitted the changes to the repository, and the repository stores the data we submitted, depending on the situation.

On the modified file, "right-TortoiseSVN, Show Log", you can see all the commits to this file.

On the different revision entries, right-Compare with working copy, we can compare the difference between the working copy file and the selected revision version.

At this point, we will be able to export the previous version by selecting a revision on the work folder "right-TortoiseSVN, Show Log"

SC create svnserve binpath= "\" D:\Program files\subversion\bin\svnserve.exe\ "--service-r E:\svnroot\repository" Displayname= "Subversion" depend= Tcpip start= Auto

Window SVN local Build

Related Article

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.