Subversion is a new generation of open source version control tools that are now expected to replace CVS as the preferred system for version control. Subversion is also easy to install and use under Windows.
1, download subversion:http://subversion.tigris.org/servlets/projectdocumentlist?folderid=91
Latest Version:
Svn-1.4.4-setup.exe
2, download the client
TortoiseSVN is a set of tools to extend the Windows shell as a plug-in for Windows Explorer, and Windows will be able to identify the working directory of Subversion after installation.
Http://tortoisesvn.net/downloads
Tortoisesvn-1.4.4.9706-win32-svn-1.4.4.msi
3, installation
Double-click the Setup program to install the Subversion server and the client separately.
4. Create a version library
The Subversion version library (repository) is where data is centrally managed and stored on the server side. To create a version library, you first need to determine which type of data storage to use. In subversion, there are two ways to store data for a version library, one is to store data in the Berkeley DB database, and the other is to use a normal file, stored in a custom format, called a FSFS.
There are advantages and disadvantages to the two methods of storage, there is a concise comparison.
Characteristics |
Berkeley DB |
Fsfs |
Sensitivity to operational disruption |
very sensitive; system crashes or permissions issues can cause the database to "plug in" and require regular recovery. |
Not sensitive |
Can be read-only loading |
No |
OK |
Storage Platform Independent |
No |
OK |
Accessible from the network file system |
No |
OK |
Version Library size |
Slightly larger |
Slightly smaller |
Extensibility: Number of revision trees |
Unlimited |
Some local file systems may have problems processing a single directory containing thousands of entries. |
Extensibility: Directories with more files |
More slowly |
More slowly |
The speed of checking out the latest code |
More quickly |
OK |
The speed of a large number of submissions |
Slower, but time is allocated throughout the commit operation |
Faster, but the last longer delay may cause the client operation to timeout |
Group Access Processing |
is sensitive to the user's umask settings and is best accessed by only one user. |
Insensitive to Umask settings |
Functional Maturity Time |
2001 |
2004 |
The specific data storage type is determined, as long as you execute the svnadmin command in the command line, you can create a Subversion version library, which commands the following:
Svnadmin Create D:/www/svn_repository
You can also create in the resource manager through TORTOISESVN
Create a good repository structure as follows:
5. Configure users
Open d:/www/svn_repository/conf/svnserve.conf with Notepad
Cancel Password-db = passwd The previous comment, modified to:
[General]
Password-db = passwd
Open D:/WWW/SVN_REPOSITORY/CONF/PASSWD
Remove the comment before the user name and modify it to:
[Users]
Harry = Harryssecret
Sally = Sallyssecret
Save the file.
6. Start Subversion Server
To run at the command line:
Svnserve-d-R D:/www/svn_repository
Note: Do not close the command line window, otherwise the Subversion server will be stopped.
7, initialization of the import
Right-click on the folder you want to import, and select
Tortoisesvn->import ...
URL location fill: svn://localhost or svn://youripaddress
Username/password Prompt box to enter the username and password in passwd, import the successful interface:
8, the client basic operation
Create a project folder D:/svn_test
Right-click on the folder, choose SVN Checkout ..., url location input: Svn://localhost or svn://youripaddress
You can get a copy of the project file, modify the file and save, right-click on the file, select SVN Commit ... You can update the version.
Right-click on the project file to see TORTOISESVN more options:
If you choose Show Log, you can see the operation history of the file, right-click on version 1, select Compare with working copy to see the difference between the current working file and version 1.
9. Start Subversion as a service
Windows command SC can be used to create a service that executes the following command at the command Line window:
SC Create svn binpath= "/" d:/www/subversion/bin/svnserve.exe/"--service--root/" d:/www/svn_repository/"
The [SC] CreateService success indicates that the service installation was successful, and this time you can see the SVN service in the system service, set to Manual or auto start as you like.
It should be noted that the spaces and/or binpath= after the command line are required to be retained for the statement following the SC command parsing.