Eclipse How to Use Version Control (22)

xiaoxiao2021-03-06  55

3. Synchronize local changes and CVS repository If a project developer is ready to submit him / her work, then first perform an update operation. This will target the resource library for the introduced changes and add these changes to the developer's local workbench. This ensures that developers know that these changes may affect the integrity of his / she will submit. Use the Compare with ... option in the project context menu to compare the local version to the code stored in the repository (see Figure 5).

Figure 5. Compare the version of the local version and the repository

The next step is to solve any conflicts that have occurred and try to compile the code again. If everything is normal, use the Team -> Commit ... option from the project context menu, as shown in Figure 6. This will make all changes into the repository.

Figure 6. Submit change to remote repository

4. Manage repository CVS allows developers to change to some separate paths developed, which are called branches. This change does not appear on the trunk or other branch when a developer changes files on a branch. Those branches are named subset or code fork. Later, the consolidation operation will change from one branch to another branch (or trunk). Then submit these amendments. This effectively copies the change to another branch. Use the Team -> Branch ... option of the project context menu, Eclipse makes the migration between the development branch easily.

Of course, when the development team maintains large repository, there is a need to control the submission and merge operations within the project. Eclipse / CVS integration provides a special view: CVS Repository History (see Figure 7). It gives a quick preview of the changes that the team members perform in the resource library.

Figure 7. View revision history with annotations in the CVS Resource History window

The Eclipse platform provides several utilities supporting code management. The most useful is patch function. It will compare from two sources (such as local table and repository), and then create a network-like patch file containing code differences (see Figure 8). This file can be sent to the developer to upgrade the source code to the latest version.

Figure 8. Creating patchs for source code distribution

5. Disconnect the project and CVS connection When the project development is over, and the team wants to freeze the source code, the final version of the project can be removed from the Head repository. Disabled Projects and CVS will disable resource library operations on the project and its resources, and delete CVS information associated with the item (this is optional).

Disconnect operations can be performed through the Team -> Disconnect option in the project context menu. By selecting this option, the Confirm Disconnect From CVS dialog opens. After disconnecting the project with the resource library, the team must determine how to handle CVS information. The first option is "delete the cvs meta information"; it will disable the CVS team menu operation and remove the CVS folder and its content from the file system. The second option is "Do Not Delete the CVS Meta Information"; it will disable the CVS team menu operation, but keep CVS meta information.

There are several important restrictions on support CVS for third-party code management applications: it cannot determine a single file or change in the entire fileset, which cannot detect logic conflicts between files. Its conflict concept is purely in text, and the conflict occurs when the two change time of the same basic document is very close, so that the merge commands are disturbed. CVS also does not provide any interactive collaboration tool similar to messaging. Fortunately, CVS is not the unique source code management software supported by the Eclipse platform. Developers can extend the functionality of the Eclipse platform through plugins, and now (until March 4, 2003) has 16 plugins that can be used for team development software. All plugins are created by the Eclipse community or commercial software vendor. Most of these plugins have added support for third-party, commercial source code management systems. The most valuable plugin is a plugin that supports popular business code management systems such as Merang PVCS and Rational Clearcase. For example, the CVS-SSH2 plug-in allows you to access CVS via SSH2 session, while Microsoft Visual SourceSafe (VSS) team provides program plugins to add support for MS VSS products (you can also be used on non-Windows platforms such as Linux). However, the plugin I prefer is KOI (see Resources to get link). Although it is not strictly used in source control, this innovative tool has injected many new vitality to collaboration. Its current version supports the workbench to the table's message delivery, sharing tag, conflict change notification, sharing calendar, and event notification. KOI uses XML-RPC as a communication model in its client-server architecture. The client is a single Eclipse platform instance that communicates with the Cooperative Server, and the collaborative server is also an Eclipse plugin. KOI uses a relationship database accessible in JDBC as a data store. The link to complete, classified Eclipse plug-in registry can be found in the reference material.

Reference

Please participate in the Eclipse platform community on Eclipse.org. The Eclipse platform source code follows Common public license. Eclipse.org also has an Eclipse project terms and description vocabulary, as well as technical articles and newsgroups. The Eclipse platform white paper (available in Eclipse.org Homepage) describes the main components and features of Eclipse. Download the KOI plugin from Eclipse.org. Check the full and classified registry of the Eclipse plugin. Download CVS clients, servers, and source code from CVS home or Loria Sites. See the developerWorks article "Working The Eclipse Platform" for background knowledge about the Eclipse platform. Please refer to the developerWorks article "Getting Started With The Eclipse Platform", this article describes the Eclipse platform and editing, compiling, and debugging applications using Eclipse plugin. Please refer to the developerWorks article "Developing Eclipse Plugins", this article describes how to develop an Eclipse plugin. Get more information about Eclipse from these articles from DeveloperWorks: Find more about Eclipse and open source references in the developerWorks Open Source Project Zone.

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

New Post(0)