For a long time, in the open source world, CVS (Concurrent Versions System) has always been the first choice for version control. But now the user has another choice, it is Subversion. Subversion is the next generation of version control system, can replace CVS, the project home page is http://subversion.tigris.org. Subversion is a free, open source version control system. It is a general system that can manage any type of file, including the program source code. Its initial goal is clear, achieving the existing CVS's existing CVS; fully considering existing CVS users, imitating CVS in the way, and develops a series of tools, making CVS-based projects to migrate to Subversion . Compared to CVS, it has many advantages, such as directory version control, unseutive submission, consistent data processing mode, and more efficient branches and tags. Installing and initializing Subversion is built on a transparent APR (Apache Portable Runtime, Link Library). This allows Subversion to work on any operating system that can perform Apache. Subversion has two ways of operation. First, it can be used as a module of Apache 2.0, connects with the WebDAV / DELTAV protocol; in addition, small server programs comes with Subversion. The program uses the own communication protocol, which can easily be used in Tunnel through SSH. The simplest way to install the Subversion is to use the binary version (on the project website, downloading files in the format of RPM, DEB, and PORTS). Select the downloaded file according to the system, the RED HAT used here, so the RPM format is selected.
# rpm -UVH APR-0.9.5-0.2.I386.RPM
# rpm -uvh apr-design.9.5-0.2.i386.rpm
# rpm -UVH APR-UTIL-0.9.5-0.1.i386.rpm
# rpm -uvh apr-util-wevel-0.9.5-0.1.i386.rpm
# rpm -uvh neon-0.24.4-1.i386.rpm
# rpm -uvh neon-wevel-0.24.4-1.i386.rpm
# rpm -uvh subversion-1.0.0-1.rh90.i386.rpm
# rpm -uvh subversion-design- 1.0.0-1.r90.i386.rpm
# rpm -uvh subversion-server-1.0.0-1.r90.i386.rpm
#rpm -uvh subversion-Tools-1.0.0-1.r90.i386.rpm
Set the environment variable, the command is as follows: #EXPORT Editor = VI Create a file library, the command is as follows: #svnadmin create / opt / proj / fox The content of the directory DOC, imported directly into the FOX directory of the file library, the command is as follows: #SVN import After the / root / doc file: /// Opt / Proj / Fox Subversion component is installed, Subversion will have several different tools, mainly divided into two categories: client components and server components. The client component is used by the user, mainly including the following two components: SVN is the command line client program for managing data. SVNVERSION is used to view the mixed version of the work copy. Server components are used by administrators, including the following components: Svnlook is used to view the tool for Subversion's file library. Svnadmin is used to create a tool for the file library that adjusts the Subversion. MOD_DAV_SVN The module used by the Apache 2.0 web server; can be used to open the user's file library through the network. SVNserve a separate server program that can be executed as a server process, or started by SSH, allowing the user's file library to access to other people on the network. The Subversion in use is similar to CVS in use, but some new features are different from design and CVS. Let's talk about the difference between the two and let users feel the advantage of Subversion. Different revisions are in CVS, each file revisions are different. This is because CVS is based on RCS. Each file has a corresponding RCS file in the file library, and the structure of the file library is generally expanded in accordance with the directory structure. The directory version Subversion also tracks the file tree structure, not just the content of the file. Like a recorded file in the Subversion, there is also a revision number. "SVN Add" with the "SVN RM" command can be used on the directory, just like using the file. "SVN Copy" is also true of "SVN Move". But these directories will not change the file library immediately. Conversely, work items are only "predetermined" to be added or deleted. Unless the user performs "svn commit", otherwise the file library will not have any changes. This is a bit like Windows to delete files, just in the FAT table to delete tags, not really deleted. Offline function Subversion's work is optimized for network bandwidth bottlenecks. . SVN is the same as the CVS directory, is a directory for management, but SVN also stores the original copy of the file. This allows users to make many things offline. For example, "SVN Status" displays local updates; "SVN DIFF" displays detailed update details; "SVN Revert" removes the user's local update. In addition, the Subversion client transmits only the difference when submitting a file copy. This is not there. Distinguish the status and update in the Subversion, we try to solve the confusion between the "CVS Status" command between the "CVS Update" command. The "CVS Status" command has two purposes, one is to display the local changes in the work replica; the other is the file that displays the user's outdated. However, the content displayed by CVS is not easy to understand, and many CVS users are completely unable to use this command. Instead, it is to perform "CVS UP" to see their updates. Subversion tries to let the data output from "svn status" easy to understand, to solve the above problem.