Home >Common Problem >What is the difference between svn and cvs

What is the difference between svn and cvs

青灯夜游
青灯夜游Original
2022-06-21 11:40:413549browse

Difference: 1. The version number of CVS is based on the self-increasing serial number of the file, while the SVN is based on the global self-increasing serial number, not only for files, but also for directories; 2. CVS is based on RCS files , while SVN is based on a relational database or a series of binary files; 3. CVS allows arbitrary rollback, but SVN does not allow rollback after submission; 4. SVN supports the "zero or one" transaction principle, but CVS does not; 5. CVS does not support local file rename submission, but SVN supports it; 6. CVS has four permissions, while SVN only has three permissions.

What is the difference between svn and cvs

The operating environment of this tutorial: Windows 7 system, Subversion version 1.14, Dell G3 computer.

CVS (Concurrent Versions System):

is a concurrent version system for developing source code. It is available for various platforms, including Linux, Unix and Windows NT/2000/XP, etc. CVS is free and open source and provides version management for projects.

Function introduction:

1. Unified code management, saving the history of changes to all code files. Centralized and unified management of code makes it easy to view newly added or deleted files and track all traces of code changes. You can restore to any previous historical version at will. And avoid deep BUG introduced due to different versions.

2. The complete conflict resolution solution can easily solve file conflict problems without the need to use other file comparison tools and manual pasting and copying.

3. Management of code permissions. Different permissions can be set for different users. Passwords, read-only, modification and other permissions for access users can be set, and through scripts in the CVS ROOT directory, an interface for corresponding function expansion is provided, which can not only complete fine-grained permission control, but also complete more personalized functions.

4. Support convenient version release and branch functions.

SVN (Subversion):

  • ## The full name of SVN is Subversion, which is the version control system. SVN is the abbreviation of Subversion. It is an open source version control system. Compared with RCS and CVS, it adopts a branch management system. Its design goal is to replace CVS. Many version control services on the Internet have migrated from CVS to Subversion.

  • SVN is a centralized file version management system.

  • The core of centralized code management is the server. All developers must obtain code from the server before starting a new day's work, then develop, and finally resolve conflicts and submit. All version information is placed on the server. If you are disconnected from the server, developers basically cannot work.

(SVN) Centralized management workflow:

The core of centralized code management is the server. All developers start a new day The work must be done before getting the code from the server, then developing it, and finally resolving conflicts and submitting it. All version information is placed on the server. If you are disconnected from the server, developers basically cannot work.

The management process is as follows:

What is the difference between svn and cvs

The difference between svn and cvs


CVS SVN
About version number File-based auto-incrementing serial number. Based on the global self-increasing serial number, not just for files, but also for directories, etc.
Storage type format CVS is a version control system based on RCS files. Every CVS file is just a regular file with some extra information. These files simply repeat the local file tree structure. Therefore, there is no need to worry about any data loss, you can modify the RCS file manually if necessary. SVN is based on a relational database (BerkleyDB) or a series of binary files (FS_FS). On the one hand this solves many problems (e.g. parallel reading and writing of shared files) and adds many new features (e.g. transactional features of the runtime.). On the other hand, data storage becomes opaque or not so user-friendly. That's why software tools have become so important for warehouses (databases).
Access speed is relatively slow; because it is based on one-way (server-->client) differentiated file transfer as a whole In other words, due to different architecture implementations, SVN is indeed much faster than CVS; because it uses two-way differentiated file transfer.
It transmits very little information over the network and supports more offline mode features. But it comes at a cost. The price for speed is huge storage (full backup of all working files).
Metadata Only allowed to store files Allows a file to have any nameable attributes. The function is very complete, but I don’t know what it is used for
File type was originally designed for text file storage. Therefore, there is almost no support for other file types (binary, Unicode). If necessary, additional information must be provided, and both client and server must be adjusted. SVN will care about all file types and does not require you to do manual operations; because its storage is based on binary
Roll back CVS Allows arbitrary rollback of any committed version, although it takes some time (all files must be processed separately). SVN does not allow rollback after submission. We recommend adding the good version in the repository to the end and overwriting the corrupt version. The corrupted version will be stored in the database anyway.
Transaction The "zero or one" transaction principle in CVS is not implemented at all. If you check in several files (add them to the server), it is possible that some of them will be completed but others will not. As a rule of thumb, correct these manually and check in again for the remaining files (not all files). These files will then be checked in in two phases. But so far, there has been no case of data warehouse damage caused by the lack of this function. Supports the "zero or one" transaction principle, which is a major advantage of SVN
Architecture, code, scalability CVS is an old system. At first, CVS was just some script files using RCS. Later these scripts were grouped into a single application, but the internal structure still needed improvement. To this day, there are still people trying to rewrite CVS from scratch, but they have failed. We once tried to rewrite the client code for better integration, but it was unsuccessful. Now we don't think CVS can go very far in terms of functionality. Subversion developers do spend a lot of time on internal architecture. We still don’t know how true these decisions were and so on. But one thing is certain, the code has good scalability and enhancement work is also in progress.
Renaming and deletion operations Does not support local file rename submission;
Deletion is divided into remove and erase. The former deletes both local and library files. , the latter only deletes local files;
cannot delete folders
supports file renaming and submission, the system will prompt to delete old files and create new files
Deleting local files and submitting files in the library will also be deleted
User access permissions There are four permissions: read, write, creat, none. No one can delete the folder. (Admin can only run to the server and brutally delete the corresponding folder? I only know this method for the time being...) There are only three permissions: read, write, and none. The creat and delete permissions seem to be tied to write. Together
Creating branches and baselines CVS When creating a branch, all branched files need to be operated in sequence, so the cost of establishing the branch ( Mainly the time required to establish a branch, or the computing resources consumed) is proportional to the number of files participating in the branch. The larger the project, the larger the version library, the more files, the higher the cost of establishing the branch; the establishment of the baseline (tag) Similar to this. SVN's branches and baselines are established by performing "copies": Recall how we performed so-called "branch" and "baseline" management before version management tools were introduced? The answer is obviously "copy" - we establish a baseline through "copy" or "backup"; similarly, to support multiple developers developing at the same time, we create a "copy" for each developer.

(Learning video sharing: Basic Programming Video)

The above is the detailed content of What is the difference between svn and cvs. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:What is Pinduoduo?Next article:What is Pinduoduo?