Subversion is better than CVS

xiaoxiao2021-03-06  37

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.

Installation and initialization

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

Import the contents of the directory DOC into the FOX directory of the file library, the command is as follows: #SVN import / root / doc file: /// opt / proj / fox

Subversion component

After installation, Subversion has several different tools, mainly divided into two categories of 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.

Advantageous

Subversion 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

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.

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

The copy of the Subversion is optimized for the network bandwidth bottleneck. . 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, as follows:

"SVN Status" displays local updates;

"SVN DIFF" shows detailed update details;

"SVN Revert" removals the user's local update.

In addition, the Subversion client transmits only the difference when submitting a file copy. This is not there.

Distinguish status and update

In the Subversion, we tried to solve the confusion between "CVS Status" and "CVS Update" commands. 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. In addition, "SVN Update" will only display the updated file information without displaying local updates.

Attributes

A new feature of the Subversion is that the user can attach any information to the file and directory. These materials are called attributes. The user wants to set or acquire the name of the attribute, and you can use the "SVN Propset" command; to list all the properties on an object, you can use the "SVN PROPLIST" command.

Conflict

CVS places "conflict tag" in the file to mark the conflict, but CVS is not enough. Many users can't remember (or not see) the code with conflict markers with conflict markers on the terminal.

Subversion Solving this problem is to make conflicts more clearly. It remember that the file is in a conflict, unless the user performs the "SVN Resolved" command, otherwise it will not allow the user to submit.

Binary file with text file

Subversion is more good than CVS to process binary files. Because CVS uses RCS's relationship, it is stored for two binaries in a variation, it stores each updated copy. But Subversion regardless of the document or binary type, the internal difference comparison algorithm is used to represent the update section of the file. This means that all files are stored in the form of the file library. And it is transmitted on the network, which is a smaller file difference. CVS users must mark binary files as "-kb". Subversion does not make any keyword or column symbol conversion unless the user needs to do this. Subversion inside the maintenance file is a record of the "Text" or "Binary" file, saved it in a copy. During executing "SVN Update", Subversion will consolidate local text files, but will not do such things to binary files.

summary

Subversion has a good document - "Version Control with Subversion" (http://svnbook.red-bean.com/). It provides all aspects of Subversion, such as usage, management, and development.

After several years of development, Subversion, which is the target of CVS, finally out of version 1.0. I believe that in its powerful function, there will be good development to CVS.

转载请注明原文地址:https://www.9cbs.com/read-60162.html

New Post(0)