I. Introduction to CVS (Concurrent Version System) 1. CVS mechanism CVS is the front-end tool for RCS. It is a version control tool for multi-user parallel development. Its biggest feature is to use "Copy-Modify-Merge" mechanism instead of "Lock-Modify-Unlock". By using the CVS to generate a repository (repository), each directory stored in the warehouse is called module (Module), check the corresponding module to generate a corresponding directory in the working directory when modified, all The modifications are completed in the working directory. After the modification is complete, then submit to the repository to generate a new version number, and save it. CVS saves files in a repository (repository), the file saved in the warehouse is not a copy of each version, but can be retroiled from any version to the main control information of some of the code of the initial version, which will save A large amount of storage space is a global Linux operating system is successful on a large distributed CVS system. The world's most famous software engineering software provider Rational Sofdtware ClearCase is a replacement product of CVS, which is slightly more than CVS.
2, CVS version number is divided into system number and user number system number is the number of CVS automatically gives the version. CVS automatic management system number. Single branch version evolution is performed in the order of 1.0-> 1.1-> 1.2 -.... The user number is the number specified by the user to control the version number, or the unified version number, and the number specified for a version. Second, CVS recommends that the development process is to prevent other errors that can't be compiled, it is recommended to develop in the development environment, after compiling without large changes in CVS, then publish to test and production environment . Taking the company's website development as an example, the process is as follows: Development Environment (192.168.16.33) -> CVS (192.168.16.38) -> Production Environment (192.168.16.34)
Third, WinCVS use 1, how to set up a local work directory admin -> Preference -> WinCvs -> Home Folder
2. How do I list the modules on the CVS server? Admin-> Macros Admin -> Get The CVS Modules CVSROOT Module File Modules controls the display of modules, managed by system administrators.
3. How do I take the modules on the CVS server to the local working directory? Select Module -> CREATE -> Checkout Modules ... -> Enter Modules name -> OK.
4. How do I include new programs or documents into CVS management? Put the new program or document COPY to CVS Local Work Directory -> Right Key -> Add Selection or Add Selection Binary -> Commit Selection (Recommended File Modification, add this modification when commission Description, it is easy to view history in the log.)
5, how to modify an existing program or document? Right-click -> Edit Selection -> Modified -> Commit Selection
6, how to give up the modification? As long as there is not a commit, right-click-> Udit Selection7, how to put the newly created Module in the CVS server? 1) Use the directory COPY to put into the library COPY 2) Enter module CREATE -> Import Module 3) Select the top-level directory of the project directory you want to enter in the pop-up file dialog box, and do the folder Icon Open 4) If the filter window is pop-up, make sure that the file is filed, and the file is correctly set.) Click the OK button, WinCVS then input the entire directory structure into the CVS server
8. How to update the original Modules 1) Remove your original directory locally 2) Take the modules on the CVS server to the local working directory (see step 3 above)
9, how to solve conflicts? When two or more people have modified the same file, they will have conflicts. At this time, there is a problem with the problem, and the search starts with <<<<<<<. The conflict area has such a price: <<<<<<< file name your modification ======== From the code in the library >>>>>> Revision you want to judge what the code should be, For the necessary modifications, delete the CVS price and submit your modification to the library. Recommendation: When you modify the file in the CVS, you will first update Selection. 10. How to retrieve the previous version? GRAPH SELECTION -> Right button -> Tag Selection.
11. How do I see the local working directory of CVS in the modules small window? View -> Browse location -> Select a local working directory in the pop-up window -> OK
12. Who is the right button in modifying the file -> Editors of Selection. Lists users who are editing Files.
13. How to view the historical modification record of the file? Right-click -> Log Selection 14, do you need to lock the logout? CHECKOUT? For the Word document, the library, etc. binary files, due to the incompatibility of the CVS, should be selected to be selected. Right-click -> Lock Selection Unreserved CheckoutS is CVS, which allows other users to modify the logged file CVS will not inform the first login person if someone is modifying the file. Others have to log in to get an error message, they must first consolidate with the latest version of the warehouse. For source code, etc., you should choose non-locking logout, otherwise it will greatly reduce software productivity. If the non-locking logout causes a serious opening conflict, then because the developer's communication is serious. Note: Simple non-locked logout is feasible to many projects. Locking logout control is too strict, which is not conducive to improving software productivity. Non-locking logout and monitoring mechanism between the two are best choices for many groups. Fourth, CVS replenishment 1, how to delete a directory? You need to delete the file in the directory first, make the directory into an empty directory, and then run the CVS Update -P to clear the catalog from the warehouse. 2, how to rename the file? Rename the old files in the working directory as a new file. -MV Old New Notification CVS Delete Old Files - CVS Remove OLD Notification CVS Add New File-CVS Add New From CVS Warehouse Removes Old Files, Add New Files - CVS CI -M "Name Old To New" Old New
3, CVS cannot complete the version comparison and version merge of binary files, for this, to avoid version branches.
4, CVS cannot be more than the file content identification binary, but can identify those files based on the file extension, which is defined by the CVSWrapPers profile.
5. Set read-only users authorize files in the CVS warehouse to some users, but they do not allow them to modify files. User names in $ cvsroot / cvsroot / readers file, for example: xuys huyj zousj anonymous
5. Development points summary 1. When you want to modify the files in CVS, first Update Selection, then edit. 2. For the modification of the source code, it should be selected to be unlocked. 3. For binary files such as Word documentation, you should choose to lock the logout because you cannot merge by CVS. 4, after the file is modified, it is best to add a short description of this modification when committing, which is convenient for viewing history 5 in the log 5, and the team members should strengthen communication.
Six, free question, answer, discussion