Use Subversion on Windows

Source: Internet
Author: User
Tags svn client
Subversion (SVN, the official website for http://subversion.tigris.org) is the successor of the famous CVs, the use method is almost the same as CVS, and in the management of binary files, directories is better than CVs, the author is the father of CVs, so there is no need to worry about any difficulties in transferring from CVS to SVN.
Based on the above advantages, I tried SVN a few days ago. On Windows, not only can SVN client be used, but also SVN server be very convenient. It seems that I will replace CVs with SVN later.
References Article Yes:
[1] http://www.nedbatchelder.com/text/quicksvn.html
[2] http://excastle.com/blog/archive/2005/05/31/1048.aspx

Step 1 First from http://subversion.tigris.org/servlets/ProjectDocumentList? Folderid = 91 download the latest Windows setup Installation File for subversion, and follow the prompts to continue next. This installation package contains all files of the client and server. After installation, you can use SVN, svnadmin, and svnserve in the command line.Program .
Step 2 : Set the comment editor. In the system variable, the value of svn_editoris the name of any edits, such as notepad.exe.
Step 3 : Create SVN repository. For example, if you select C:/svn_repo as our directory, create this folder first, and then enter the following command line:
Svnadmin create C:/svn_repo
Note that this repository is just a repository. You can create a "virtual folder" in it and store different modules in each folder.

The following describes how to access your Repository from the network.
The SVN address is URL-based. If svnserve is used to create a network-accessible server, the URL address is SVN: // your_ip/module_dir. If you only want to access your SVN repository on the local file system, the URL is file: // C:/svn_repo/module_dir (as shown in the preceding example ). In the future, whether you import or checkout, you only need to use this URL as the address. After you log on once, you only need to enter the URL once. SVN will automatically remember your url address, which is simple. The following describes how to set up an SVN network server.

Step 4 : Set network server permissions. Go to the created C:/svn_repo and open CONF/svnserve. conf, remove the # Before [general], and remove the # Before auth-access = write. If you want anonymous users to access the conf file, remove the # Before anon-access #. Remove the # Before password-DB #.
Step 5 : Set the user name and password. Or in that directory, open the passwd file and remove the # Before [user #. Add the accessible user name and password according to the existing example, and remove the previous #. This is very different from the cvsnt practice. cvsnt requires that users with access to CVS repository must have a Windows account on the machine where the user is located. This is too harsh ......, It is simpler to use SVN, although the plaintext password is not very secure .......
Step 6 : Start the network service svnserve. Enter
Svnserve -- daemon -- root "C:/svn_repo"
Then you can access your server through the IP address. If the IP address of the server is 192.168.20.8, your server address (that is, the svn address of C:/svn_repo) is SVN: // 192.168.20.8.
But svnserve will always block on the command line, if you want to make it into a real background service program, also need a third-party program svnservice, you can in the http://dark.clansoft.dk /~ MBN/svnservice/download.

Step 7 : Create a virtual folder for the module. Open a new command line window and enter
SVN mkdir SVN: // 192.168.20.8/proj1
If you log on to the server for the first time, you will be prompted to enter the user name and password.

Step 8 : Import your project. Go to the C:/proj folder and enter:
SVN import. SVN: // 192.168.20.8/proj1
All files (and its subdirectories) in the current directory are imported to the location specified by the URL address.

Step 9: Checkout your project. Go to any folder and enter:
SVN checkout SVN: // 192.168.20.8/proj1 testdir
The proj1 module is downloaded to testdir. The subsequent project management method is the same as that of CVS.

Follow-up questions:
One machine can only run one svnserve, that is, at the same time. One machine can only provide one repository. Of course, you can specify different ports for svnserve to allow one machine to provide multiple repository, but this is obviously not as flexible as CVS. However, there may be multiple repository functions, but we haven't found them yet.
If you like the GUI operation method, tortoisesvn is a powerful tool. It can add the svn function to the right of Windows Resource Manager.

Note: The above content comes from the internet. I am not liable for any joint liability.
Article transferred from: http://windows.chinaitlab.com/accessing/713621.html

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.