Svn lan server Construction

Source: Internet
Author: User
Tags tortoisesvn

 

Step 1: download and install the file
SVN server: http://subversion.tigris.org/servlets/ProjectDocumentList? Folderid = 91
Click to install the downloaded installation package. After the server is installed, the software automatically adds corresponding values to the system environment variables, the test is completed. You can enter "SVN" or "svnadmin" in the CMD command line to test whether the command can be run.

Step 2: deploy the repository and run the server
Create a SVN repository. Take F: \ svnhome as an example. After the file is created, bind the Windows Service so that it can run automatically after each machine restart, the command SC for creating a service in Windows is used here. Run it in command line mode:
SC create svnservice binpath = "C: \ Program Files \ subversion \ bin \ svnserve.exe -- service-R F: \ svnhome" displayname = "svnservice" depend = TCPIP start = auto
Note that the format here, "=" must be left blank. Otherwise, an error will occur. Several of these paths are the Server installation path and the repository path.
After the prompt is successful, you can directly enter "Net start svnservice" to start the service, or directly start the service in "service" of "Administrative Tools.
Step 3: Create a project and configure Access Permissions
Go to the F: \ svnhome directory, right-click and choose [toisesvn]-> [Create repository href...] before creating the directory, make sure that there are no folders or files in the directory. After the creation is successful, Several folders will be automatically generated in the directory: The dav directory is provided to Apache and mod_dav_svn for internal data storage; the DB directory is the data files under all version control; the hooks directory stores the directory of the hook script file. locks is used to place the directory of the data locked by the Subversion file library to track the client that accesses the file library. The format file is a text file, there is only one integer in it, indicating the current file library Configuration
The version number. conf stores the configuration file;
How to Set access permissions:
In the conf directory, use NotePad to open svnserve. conf and set it as follows:

[General]
Anon-access = none
Autn-access = write
Password-DB = passwd

The first one is used to set the permissions of anonymous users. None is used to set the repository to not allow anonymous access.
The second is used to set the permission for the authorized user to write
The third is used to specify the password used by authorized users to store files.

Open passwd in the same directory, which is set above. Of course, you can also change it to another file name, which is set as follows:

[Users]
User1 = pass1

Here we specify the authorized access user name and password in the format of user name = Password
Multiple users can write multiple rows. After the settings are complete, this is done.

Next, you can use totoisesvn to perform import, update, checkout, commit, and other operations.

Initialize penetration

The following describes how to import our data (project) to this version library. In the future, the version library will manage our data. Any changes made to our data will be
The version library is recorded, and even when we lose or correct the data, the version library can help us find the round-trip data
For example, I have a guestbook folder under D: \ wwwroot, which stores the message book program I wrote in this folder.
Right-click and choose tortoisesvn> Import.... In the displayed dialog box, "URL of repository" is infiltrated.
"SVN: // localhost/repos1/Guestbook" in "Import message" infiltration "entire guestbook as a comment
After clicking OK, the penetration account is required. After the user name and password are both entered, the content in the guestbook is completely exported to the penetration test.
SVN: // localhost/SVN/repos1/Guestbook
We can see that there is no change in E: \ SVN \ repos1, and even a guestbook folder is not created. The only change is
E: \ SVN \ repos1 capacity has increased. In fact, the content in the source guestbook has already penetrated the repos1 version library, and the source Guestbook
The folder can be deleted.
Note that this step can be performed on another client with tortoisesvn installed, such
If the IP address of the host is 133.96.121.22, the contents of some URL infiltration are SVN: // 133.96.121.22"

Check out)

Extract the version library to a working copy:
Go to any empty directory, for example, create an empty folder F: \ work "right-click-> SVN checkout" in "URL
Input "SVN: // localhost/SVN/repos1/Guestbook" in repository, so that we can get a copy of the content in the guestbook
Work copy

Check in/commit)

Make changes in the work copy and submit:
In the copy of the guestbook job, open a file and modify it. Right-click the file and choose SVN commit ....
The changes are submitted to the version library. The version library stores the submitted data as needed.
Right-click the modified file and choose tortoisesvn> show log. You can view all the submissions to this file in different
On the revision entry, "right-click-> compare with working copy". We can compare the files that work copies with the selected revision version.
Differences

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.