Quick query manual for common CVS commands

Source: Internet
Author: User
CVS is a C/S system. Multiple developers use a central version control system to record file versions to ensure file synchronization. The working mode is as follows:

CVS server (file version Library)
You can select for getting started for developers, and the CVS administrator needs to understand more. Finally, we also briefly introduce the use of CVS clients in windows, selection of remote user authentication and integration with development environments such as bug tracking systems.

Initialize the CVS environment: Set up the administrator of the CVS Environment
Routine Use of CVS: the most commonly used CVS command in daily development, developer Administrator
Branch development of CVS: The project is administrator Based on Different progress and target concurrency
CVS user authentication: Remote User Authentication through SSH, secure, simple Administrator
Cvsweb: CVS Web access interface greatly improvedCodeVersion comparison Efficiency Administrator
CVS Tag: add $ header $ to code comments to facilitate tracking of developers in the development process
CVS vs VSS: Comparison between CVs and virsual sourcesafe, developer Administrator
Wincvs: Set wincvs Authentication through SSH
Build a group development environment based on cvstrac: Use cvstrac to implement CVS user management on the web interface and integrate BUG Tracking and Wiki communication.
20% of a system's functions often meet 80% of the requirements, and CVS is no exception. The following are the most common features of CVs, and may not reach 20% of all its command options, more functions can be used in the actual application process. You can learn how much you want to use. From time to time, let's look back and see what we often get.

CVS environment Initialization
Environment setting: Specifies the path of the CVS library cvsroot
Tcsh
Setenv cvsroot/path/to/cvsroot
Bash
Cvsroot =/path/to/cvsroot export cvsroot

The remote CVS server settings are also described below:
Cvsroot =: ext: $ USER@test.server.address # port:/path/to/cvsroot cvs_rsh = SSH; export cvsroot cvs_rsh

Initialization: the initialization of the CVS version library.
CVS init

First import of a project
CVS import-M "write some comments here" project_name vendor_tag release_tag
After execution: all source files and directories will be imported to the/path/to/cvsroot/project_name directory.
Vender_tag: developer tag
Release_tag: Version release tag

Export Project: Export Code from the CVS Library
CVS checkout project_name
CVs will create the project_name directory andSource codeExport to the corresponding directory. Check out in this checkout and virvual sourcesafe is not a concept. The check out in virvual sourcesafe is CVS update and check in is CVS commit.

Routine Use of CVS
Note: after the first export, instead of Synchronizing files through CVS checkout, you need to go to the project_name directory exported by CVS checkout project_name for version synchronization of specific files (ADD, modify, delete) operation.

Synchronize files to the latest version
CVS update
If no file name is specified, CVs will synchronize the files in all subdirectories. You can also specify a file name/directory for synchronization.
CVS update file_name
It is recommended that you do this once a day before starting work or importing your work to the CVS repository, and develop the habit of "Synchronize and modify", which is different from virvual sourcesafe, CVS does not have the concept of File Locking. All conflicts are resolved before commit. If someone else modifies them and commit them to the CVS database, CVs will notify you of file conflicts and automatically use
>>>>>>
Content on CVS server
<
Content in your file
>>>>>>
Mark the conflict content.
Version conflicts are generally caused by modifying one file by multiple people, but such project management problems should not be solved by CVS.

Confirm to write the modification to the CVS Library
CVS commit-M "write some comments here" file_name

Note: many actions of CVs are confirmed and modified through CVS commit. It is best to modify only one file at a time. Before confirming the modification, you also need to enter the modification notes to help other developers understand the reasons for the modification. If you directly confirm 'cvs commit file_name 'without writing-M "Comments", CVs will automatically call the system's default text editor (usually VI) to write comments.
The quality of comments is very important: So not only do you have to write, but you also have to write something meaningful: to make it easier for other developers to understand.
It is difficult for other developers to quickly understand bad comments, such as-M "bug fixed" or-m ""
Good comments can even be used in Chinese:-M "added email address verification during user registration"

modify a version Note: it is a good habit to confirm only one file to the CVS library at a time, but sometimes you forget to specify the file name, comments commit multiple files to the CVS library. The following command allows you to modify the comments of a certain version of a file:
CVS admin-M 1.3: "Write some comments here" file_name author blog: http://blog.csdn.net/zaowei21/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.