Team development cutlery CVS training base lectures

xiaoxiao2021-04-04  264

I. Introduction to CVS (Concurrent Version System)

1, CVS mechanism

CVS is the front-end tool for RCS, which is a version control tool for multi-user parallel development. Its maximum feature is to use the "Copy-Modify-Merge" mechanism rather than "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

Divided into system numbers and user numbers

The system number is a number that 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 recommended development process

In order to avoid other people, it is not possible to develop an incorrect incorrectly, it is recommended to develop in the development environment, after compiling without large changes in CVS, then released 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 working directory:

Admin-> Preference -> WinCvs -> Home Folder

2. How do I list the modules on the CVS server?

Admin-> Macros Admin -> Get The CVS Modules

The file modules under the CVSROOT module controls the display of modules and manages 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 you haven't commit, right-click -> UloadIt Selection

7. How do I put the newly created Module in the CVS server?

1) Use the directory COPY that wants to put into the library 2) Enter the 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 make the folder icon open

4) If the filter window is pop-up, make sure the file submitted is correctly set up or binary.

5) Click the OK button, WinCVS then enter the entire directory structure into the CVS server

8, how to update the Modules just created

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

=========

Code from the library

>>>>>>> Revision

What should you want to judge what the code should be, 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 modifying a file?

Right-click -> 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 up?

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 to someone in the modification of 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-lock 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 supplement

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

Notify CVS Delete Old Files

-CVS Remove Old

Notify CVS to add new files

-CVS ADD NEW

Remove old files from the CVS warehouse, 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 user

Authorization to some users to read files in the CVS warehouse, but they do not allow them to modify files.

User names in the $ cvsroot / cvsroot / readers file, for example:

Xuys

huyj

ZOUSJ

Anonymous

5. Summary of development points

1. When you 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 up.

4

5. Communication between the group members must be strengthened.

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

New Post(0)