Author: Plasmabalhttp: //www.newzilla.org/2004/06/02/svn_intro/
Foreword
A program's life cycle, you can use a 'change' word. When you grow, you should add new program code; write almost time, you want to start the raw seworm; after writing, add new features. Some changes are just a few lines. Moreover, and some changes are involved in several files. As a programming staff, every day is to cope with these changes. If a program is not able to maintain a person, you have to consider the multiplayer to modify the problem, otherwise it is Step on each other to each other's feet.
If there is no way to record each time more, if you are rarely answering this question correctly: Now, where are you? Who met? What did you do? What is it? Unfortunately, often in the process development process, we must correctly know when to change, for why, and that change involves which files involve.
These issues can be effectively resolved through version control systems.
The version control system is a software for managing file changes. Every time I finish a modification, we log in to the version control system once, it will record each more file, and let the user enter a period of notes. As a text description of this revision. With these records, we can ask us when doing something more, and show the notes entered at the time. Better, we can also request the file reply Go to a record that has been recorded. Want to return the file to the first twice? Do you want to return the file to the status of the file to last week? No problem. These are it Do something.
Cvs
There are currently a lot of business and open source version of the control system. In the open source, the earliest appearance, probably SCCS, after the evolution becomes RCS. These two are all based on individual files. Later, there is The appearance of CVS, it architecture is above the RCS, and can handle the delivery of multiple files (that is, said with version control software, I have these files more moving, please remember these more moving). Although more The delivery of a file, but in fact, each file is all incomprehensible. That is to say, what are the files that do not know more about a file? In addition to the same note There is probably no other way.
The CVS also does not support the file reamer. That is, if we want to change the name of a file, then the fidelity and annotation of the previously tired will be discarded. It does not support changes in directory-based units, so It is impossible to reply to a certain time.
Although there are many shortcomings of CVS, it is not easy to re-develop a set of version control systems, and CVS is also used, so everyone will go.
Subversion debut
However, now we have Subversion - a better CVS! It is also open source, and the architecture, command line program interface, etc., is deliberately imitating CVS, which is to let the user who have learned CVS quickly pick up.
So, what are the Subversion is better than CVS?
Consistent user interface
For CVS, the same option, the difference between the subcommand and after the difference is different, and it is often a different meaning of different son, and therefore takes a lot of time to be familiar with these differences. The Subversion's option has been carefully designed, the same option, no matter where it is in the command column, the representative meaning must be the same, so it can be quickly familiar with the usage of instructions.
Catalog version control
In CVS, a directory is no version history. If the original name is a directory, after a period of time, it is found that it should be called Manual / Compare, and we can only build a new manual /, Copy the files in the DOC / directory to increase the files in Manual / under the CVS system, then put DOC / delete. And, it must be noted that in the process of copying and deleting the file, we also lost The historical history of these files. The most important information of the version control is so lost!
However, in Subversion, the directory is equally included in the version control. That is, we can ask Subversion to reply to a certain point in time, or you can rename the directory.
Inseparable delivery
In CVS, although we can send multiple files simultaneously, CVS does not guarantee that the delivery is inextricably. That is, if we simultaneously send three files, in the second file An unexpected situation (such as conflicts such as files, or network disconnection), at this time, there will be the first file from the CVS system, but there is no second with the third. CVS system The file becomes a situation that is inconsistent with us! Subversion does not have the above problems. That is to say, the result of the delivery is not a full capital system, that is, there is no enterprise, there will be only one part of the system Status.
More preferred binary data processing
Although CVS is known as a binary information (such as graphic files, Microsoft Word files), it is necessary to set the user, and the user often forgets. Plus CVS will actively diverse the content, such as the tail symbol and keyword Expanded features, often found that files become unable to read when they need to reply to past conditions. Further, CVS file content difference algorithm is almost unable to handle binary files, so that in the storage file, It takes a lot of space.
Subversion's processing method for the above problem is two. First, it does not active more dynamic content, unless the user plus this setting. Further, it uses the content difference algorithm that can be applied to the text and binary data, store in the file At the end, the text and binary data have the same advantage. Now, not only the textual information is suitable for placement of the version control system, even binary materials can also be conveniently put.
High efficiency branch and tag
We can mark the files that have been included in the version control system, which is a text that is easy to book, and you can use this easy-to-book text in the future, and these files will be replied to a particular state. But CVS must be A file plus such a mark, the more the files, the longer time consumption.
In the Subversion system, the tag is established in a copy of the directory, and the copy is established in a similar link. That is, regardless of the directory and files, it is fixed, not Will spend more time consuming because of the more files.
The shortcomings of CVS is the shortcomings of the sickness, that is, its branch function is quite difficult to use. However, when it is actually used, the branch function can add a lot of convenience to the user. If you can use the branch, you can isolate the program code. While letting developers can make a large-scale more, it can also maintain maintenance personnel. And the Subversion's branch is also practical with the copy of the directory, and it is more prone to learning, it is more convenient to use.
Disadvantages of Subversion
However, Subversion also has no shortcomings, it is still a system that started to develop, and there is still some places that are not easy to use.
File reservation
We cannot get the exclusive title of the Subversion file. This is because Subversion's working mode is to make a work replica, and each edited, it will be merged while sending it. However, sometimes we still have to First, you will be able to edit the graphic file. At this point, you will be more than the incoming merger by one person in unity.
Merge point
When a project begins to generate a branch, we must first merge the current branch to the main development line. These mergers are more than the merge point. Subversion does not remember what combined points have been used In other words, if after the merger is more moving, it has been more moving in the merger. In the future, when the branch is developed, the overall branch needs to be merged into the main development line, because the system does not remember what has been used At the place, the merged place is more moving, it will cause the same more to be merged twice. At this time, the later, it will certainly definitely cause the conflict of the file, and must be solved by the user. If the system can remember If the merge point, the consolidated point that has been used is not required, and the number of users who can reduce the user must manually conflict.
File version
In the Subversion, the version number is shared throughout the system. This means that if a project file has been modified, the version number of all files will be forth. This is moved by CVS. The user is the most difficult to accept, take a little time habit.
However, in this whole version, we can't answer this question very simple: What is the first version of a file? What is the first two versions of the current version? You know, Sometimes, we need a function like this.
I18N, L10N
Although the Subversion itself supports Unicode, but the user interface is still using pure English. There is still a way to go for a multi-language support.
Conclusion
The above brief introduction to the advantages and disadvantages of Subversion and CVS. Although Subversion began to develop three years, until this year entered the version 1.0, it provided the convenience and function of it, it has been over CVS. Currently there is not enough Function, in the hands of the active development team, you must add it very quickly. Interested readers now join us to use the Subversion's ranks!