I used CVS in the past few days. On the one hand, it was not very easy to use. On the other hand, I did not need to use it officially.
This time I updated my QQ Farm Timer Program and found that it was easy to mix up without version control. So the original intention is to create a local server. Later, I handed over the data to someone else for help, so I set up the svn server to a remote host.
1. Download Software
Subversion: http://subversion.tigris.org/servlets/ProjectDocumentList? Folderid = 8100
Tortoisesvn client: http://tortoisesvn.net/downloads
Eclipse plug-in subclips: http://subclipse.tigris.org/servlets/ProjectProcess? Pageid = p4wyua (online installation)
2. Installation
Server: first install subversion, then tortoisesvn, and then restart
Client: eclipse-> help-> Software Updates...-> Add site...
3. Create a repository
I managed it like this. On the server, I created two folders, sources (put the source code farmtimer) and SVN (the repository), on drive D ). Create a new farmtimer in SVN, right-click it, and choose tortoisesvn-> Create repository here, which will be completed soon. Right-click sources/farmtimer and select tortoisesvn-> Import.... In the dialog box, enter file: // D:/SVN/farmtimer. The import is completed soon.
Now you can see the code file in the local server: tortoisesvn-> repo-browser. Enter (the file will be automatically filled in) file: // D:/SVN/farmtimer. File: // The local protocol.
4. Remote
The Internet IP address of my server is 11x. 2XX. 9X. x3x. To use SVN remotely, you must install the service: Run svnserve-D-r d:/SVN In the CMD window
(I didn't use svnserve-D-R D:/SVN/farmtimer here, so pay attention to the connection address on the client below). Keep the window open after running.
Now, input SVN: // 11x. 2XX. 9X. x3x/farmtimer in tortoisesvn-> repo-browser. (If svnserve-D-r d:/SVN/farmtimer is used, the current address is SVN: // 11x. 2XX. 9X. x3x ).
But now it is anonymous login, only read.
5. Configuration
Open Server D:/SVN/farmtimer/CONF/svnserve. conf
Find:
# Anon-access = read
# Auth-access = write
# Password-DB = passwd
The meanings of these three statements are as follows: anonymous users only have read permission, Authenticated Users can write (or read), and usernames and passwords are in the passwd file.
Then open D:/SVN/farmtimer/CONF/passwd.
Add
Thy38 = thy
That is, the password of thy38 is thy.
In this case, you can set other group permissions or other permissions. Do not care about them for the time being. You can try again later.
6. Connection
Tortoisesvn-> export on the client, SVN address or SVN: // ip/farmtimer, local address D:/farmtimer, you can export.
Now D:/farmtimer can see a lot of files, for example, uiapp. PY, save the modification, exit the editing, right-click the file, and select SVN commit ..., at this time, you will be asked to write a short comment. After you click OK, you will be asked to enter authentication. Here are thy38 and thy. OK!
7. subclipse
After installing subclipse in eclipse, select Windows> show View> other..., find SVN> SVN resource library, and click OK. The SVN repository view is shown below. Right-click "new"> "repository location" and enter "SVN: // ip/farmtimer" to view the file. Right-click on the root and check it as.... Export it as a project. Right-click the team on any file of the project to find the svn settings.
Okay. Here you are. SVN has a lot to learn. I will definitely come back!
PS: 2012-03-26
Okay, I'm back. A svn server should be deployed in the company, which is different from the previous one. If there are many online tutorials, you should pay attention to some important points.
1. Install SVN as a system service
SC create SVN binpath = "C: \ Programs \ subversion \ bin \ svnserve.exe -- service-R C:/SVN" displayname = "Subversion server" depend = TCPIP start = auto
-The R path is good/, and the \ service cannot be started.
2. SVN directory structure
A better structure is:
Svn-
-Repo1
-Repo2
Each repo * is a version Library
SVN is root. In Apache:
<Location /repos> DAV svn SVNParentPath "d:/svn"</Location> |
Http: // ip/repos/repo1 during access
3. The SVN protocol and HTTP protocol have different addresses when accessing the same version library. The preceding example is as follows:
SVN: // ip/repo1
Http: // ip/repos/repo1
4. different passwords
AuthUserFile /etc/svn/passwordfile
In Apache, This is the user name and password for enabling http: // ip/repos/repo1.
The passwd file in each version library is the user name and password of the version library.