CVS Version Controller

Source: Internet
Author: User
Tags version control system
first we want to be clear: why learn CVS• Project development relies on the ability of a team, and few large and medium-sized projects are done by individuals. For team Development---can control each person's division of labor and permissions, you can have more than one person at the same time editing the same code, and by the program to remind the two changes in the conflict, you can see a change is who did the---such a demand is particularly important.   This is also the reason to learn CVS, it can be a good solution to the above problems. Knowledge Essentials –cvs Overview –cvs Download and configuration –cvs Use the example most applications today are developed by a team of many people. Even small projects involving only a few developers need to be tightly controlled for changes to the source code. This is the task of source code management software. Source version control software must support two core features: • Provides a way to reconcile changes to the source code for Team developers and to effectively control these changes.      • Save and manage the history of the work submitted by the team. When a team member completes a new work, the other members are shared by submitting the changes to the resource pool (repository). At the same time, you can update your local workspace (Workbench) by getting the latest files from the repository. And can go back to any historical version that has ever been saved. CVS OverviewCVS is a well-known version control tool CVS's English full name is concurrent version system (parallel versions). It is primarily used to record the history of source files. CVS is working with the client/server (CLIENT/SERVER) model, which is also a trend in the development of a good version control system. • Because CVS uses the C/s system, the various versions of the code and documents are stored on the server side, and the developer first obtains the relevant files from the server to the local computer and then develops them on this basis. Developers can submit new code to the server at any time, or they can get the latest code through an update to keep in line with other developers. The work idea of CVs Build a warehouse on a single server that can store the source programs for many different projects. These source programs are managed uniformly by the warehouse administrator. This way, it's as if only one person is modifying a file to avoid conflict. Before each user uses the warehouse, the project files in the warehouse are downloaded to the local area first. Any modifications made by the user are done locally, and then submitted with CVS commands, which are uniformly modified by the CVS warehouse administrator to track file changes, conflict control, and so on. • When learning CVs, you need to know some common terminology.  –repository (warehouse): The CVS warehouse stores all copies of the files under version control, usually without direct access, and only through CVS commands, a local copy is made, which is changed in the submission warehouse. The warehouse is usually separated from the working directory. CVS can access warehouses in a variety of ways, each with a different directory representation.    –revision (revised edition): Each Revision of each file is different, like 1.1, 1.2, General 1.1 is the first Revision of the file, the following one will automatically increase the rightmost integer, such as 1.2,1.3, 1.4 And so on. Revision is always an even number. In general, revision as a number within the CVS itself, and tag can flag the user's specific information. –tag (tags): Symbolic notation to indicate the method flag file-specific revision information. Usually do not need to do an isolated file tag, but to all the files at the same time to do a tag, later users can only to specific tag files submitted or checked out.    –branch (branch): A branch is where the development team is used to share ongoing work. At any time, team members can use one branch of content as the basis for a new job. Each CVS repository has at least one branch, called head. Head represents the mainstream branch of CVS.    –module (module): The first-level subdirectory under the root directory of the CVS server. All files that are typically used to hold a project. –check out (checkout): typically refers to exporting the entire module in the warehouse for the first time to local. –check in (import): usually refers to submitting the entire directory structure and creating a new module. –release (release): version of the entire product. –update (update): Downloads Other people's modified files from the module and updates the local copy. –commit (Submit): Submit the modified file to the module.   CVS downloads and installs • Before learning to use CVS, you need to obtain a CVS installation file.   The latest version of CVS can be downloaded free of charge at its official website www.CVSNT.org.   • It is recommended that you select a file with a suffix named MSI that is required by the server side and the client to download.   • The following is a brief introduction to the installation of this software. -Software installation is very simple, first install CVSNT, and then install TORTOISECVS. Select the default installation. The path to install software in this book is: CVSNT installation to C:\CVS,TORTOISECVS installation to C:\TortoiseCVS, no longer repeat here. After the installation is complete, you will need to restart your computer. server-side CVS configurationThe specific steps for cvsnt server-side configuration are as follows. – (1) Open the CVSNT Control Panel. Run "cvsnt" → "cvsnt Control Panel" from the Start menu. Eject the control Panel as shown in Figure 13.4. – (2) The service has been started, but there is still a lack of a warehouse. Here you need to create a new folder to act as a warehouse. In this example, a new folder Mycvsdata is created in the G Disk to act as a warehouse. – (3) Configure the warehouse to ensure that the two services in CVSNT are started properly. – (4) Clicking the OK button prompts the G:/mycvsdata folder already exists, but is not a valid CVS repository and needs to be initialized.           "As shown in Figure 13.6. – (5) Click "Yes" button, the initialization folder as a warehouse folder, after initialization, in the folder will generate a Cvsroot folder, which has a lot of files and subfolders, here are the warehouse configuration information. The Warehouse Configuration tab appears as shown in Figure 13.7. – (6) Click the Server Settings tab, as shown in Figure 13.8, to keep the default configuration.         The server configuration is complete by clicking the OK button. – (7) Click the compatibility options (Compatibility Configuration) tab, as shown in Figure 13.9. The compatibility configuration is complete by clicking the OK button. – (8) Click the Plugins tab, as shown in Figure 13.10, to show some plug-in configurations. – (9) Click the Advanced (Advanced) tab, as shown in Figure 13.11, to keep the default. Click the OK button to complete the configuration of the server. CVS Use instances   MyEclipse is connected to the CVS server through built-in CVS support. This section will combine MyEclipse to learn the use of CVS in the following steps. – (1) Create a project Eclipsecvs with MyEclipse and add a test class. – (2) Add the project to the CVS repository, as shown in Figure 13.21. – (3) Execute Team→share Project command, eject the Settings window,   as shown in Figure 13.22.    – (4) Click the Next button to have the interface to set the shared module name, generally using the project name as the module name, so select the first option, as shown in Figure 13.23. – (5) Click the Next button to appear in the document structure description interface for the shared project directory, select launch the Commit Wizard option,   as shown in Figure 13.24.    – (6) Click the Finish button, MyEclipse will connect to the CVS repository/mycvsdata, as shown in Figure 13.25. – (7) The file list name in MyEclipse will be labeled with the version number, at which point the MyEclipse Explorer window   as shown in Figure 13.26.                                     – (8) Modify the Cvstest.java file and execute the team→commit menu command, as shown in Figure 13.27. – (9) To view the file, the reader can find that the version number has changed,   as shown in Figure 13.28.      – (10) Select the project name in MyEclipse, right-click, select Import command from the pop-up shortcut menu, and import the item from the CVS repository to local, as shown in Figure 13.29. – (11) In the Pop-up Import dialog box, select Project from CVS in the CVS option, as shown in Figure 13.30. – (12) Select the resources to import. Select Use existing repository localtion, and then select the resource path you want to importDiameter   as shown in Figure 13.31.      – (13) Click the Next button to select the module to import in the incoming interface, as shown in Figure 13.32. – (14) Click the Next button to set the exported project name in the interface that appears, and select the "Checkout subfolders" option, as shown in Figure 13.33. – (15) Click the Finish button to complete the import.                

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.