CVS interface feature description in Eclipse (ii)

Source: Internet
Author: User
Tags modifier

Original address: http://hi.baidu.com/xublog/blog/item/6d090c22ffe227f5d6cae22b.html

5.4.3 CVS Annotate view

The CVS annotate view uses the same interface space as the CVS repositories view in the CVS Repository exploring perspective. The CVS annotate view is used to identify the new rows added in each version file and the rows that have been changed. The CVS annotate view will also indicate who made the change. Now you know who made these unexplained updates, or who should be responsible for these unexplained updates. For any version you select, the new rows added in the file are highlighted in the editor (see Figure 5-4). To open the CVS annotate view, select the show annotation action from the shortcut menu team in CVS repositories view, CVS Resource history view. A convenient way to open the CVS annotate view is to select a team from one of the files displayed in the Navigator perspective or Package Explorer View | Show annotation operation. When you open the CVS Repository exploring perspective, the CVS annotate view opens, CVS Resource The History view, and the version of the file that is open in the editor is up to date. The selection operation in the CVS annotate view resets the editor to the updated line of code, and the corresponding version is highlighted in the CVS Resource history view. Conversely, if you select one line of code in the editor, the changed object is highlighted appropriately in those views of the CVS Repository exploring perspective. You can now easily check any text file for detailed change history information.

Figure 5-4 CVS Repository exploring CVS annotate view 5.4.4 CVS Resource history view

The CVS Resource History view displays detailed information about all versions of a specific file (see Figure 5-5). The CVS Resource history view is part of the CVS Repository exploring perspective. Select a file in the CVS repositories view, and then select the Show in Resource History command in the shortcut menu that appears, so you can see the history version information for the file. The show in Resource History command is also available in the Team shortcut menu item that appears after the right mouse button has been clicked on a CVS-controlled project. As a quick way to view the history of a file, you can drag a file from a CVS-controlled workspace to the CVS Resource history view to view the file's historical information directly.

Figure 5-5 CVS Resource History view

For any selected revision, the branch and version tags associated with the revision are displayed along the bottom of the CVS Resource history view, along with the comments provided when the version of the file is submitted to the repository (see Figure 5-5). We can hide the Tags item and the "Comment" item in the view by selecting it from the Drop-down menu in the CVS Resource history view.

The file may have a long history, at which point you can use the filter History button on the CVS Resource History View toolbar to filter the CVS Resource History view. You can also filter the display content in the CVS Resource history view based on the author, annotation value, date change, and so on. The link with editor action on the CVS Resource History View toolbar keeps the CVS Resource history view synchronized with the currently active editor (files under CVS control only).

For those versions that are selected in the CVS Resource history view, the actions that you can perform on them depend on whether the resource has been replicated to the workspace and changed. These operations are listed in table 5-2.

Table 5-2 actions in CVS Resource history view

Operation

Description

Compare

This action compares each of the two selected versions

Get Contents

This replaces the content in the local working copy of the resource with the contents of the selected version

Get Sticky Revision

This restores the local working copy of the resource to a previous version. The local copy acts as a repository revision and retains the same version tag. It is important to note that you can use this action only if you are familiar with CVS. One of the consequences of this operation is that you cannot submit any further modifications unless the "sticky revision" tag is removed (using the CVS command directly). Of course, you can use the Replace with | The Latest from repository operation is returned to the original version. Typically, you may not be interested in the "sticky revision" tag unless you are a skilled CVS user

Open

This action opens the selected revision file in the editor. At this point, you cannot make any changes to this version of the file.

(continued)

Operation

Description

Refresh View

This action updates the CVS Resource history view with the contents of the CVS repository

Show Annotation

This action causes Eclipe to switch to the CVS Repository exploring perspective and make the CVS annotate view the current focus to display the comments for the selected file

Tag with Existing ...

This action applies an existing repository version or branch tag to the selected resource. This operation is a special operation. Check the Moving Version tags topic in the online Help for more information on when to use this action

5.4.5 View CVS command

The Eclipse console view shows all the commands and responses between CVS and Eclipse, and is useful when you encounter a problem. All CVS commands for any Eclipse CVS operations that are published for the user are also displayed in the Eclipse console view. In the Team | CVS | Console Preferences page, you can configure the appearance and behavior of the console. how 5.4.6 CVS manages projects in the workspace

Figure 5-6 shows a project under CVS control in the Package Explorer view. You can see this clearly by looking at the tag modifiers on the icon and the additional text information. Only if Workbench is enabled | After the Label decorations preference is set, Eclipse will display additional text information in the Package Explorer view. For all resources that are under version control, there is a small disk flag modifier on their resource icons. For files that are not known to CVS and are added to a project, there is also a small flag modifier in the icons for those files. In the Package Explorer view, shown in Figure 5-6, immediately following the project name is the name of the CVS repository server that the project belongs to (in square brackets). If the item is used as a branch part, the name of the branch is also included in square brackets. The text modifier > indicates that the local resource is an outgoing change (outgoing changes), which means that the local resource has been modified locally and is inconsistent with the corresponding content in CVS. This is also the characteristic of CVS-controlled folders (up to the project folder) in the Package Explorer view. The text displayed in the parentheses following the resource name represents the file format (ASCII or binary) of the resource. We know that for ASCII files, parallel modifications between the CVS file instance and the local file instance can be merged. Binary files can only be replaced.

Figure 5-6 Label decorations items that are controlled by CVS when the preference is enabled

In the Team | CVS | Label Decorations Preferences page, you can modify the presentation and rules for CVS tag adornments. 5.4.7 CVS operations available in the Team shortcut menu

The Team menu is available from the shortcut menu for any workspace resource. Several CVS operations are associated with the Team menu. We will summarize the most common operations that use CVS for work maintenance. The specific submenu under the Team menu changes with the selection of whether it is an item. Only if the project is not managed by CVS or any other repository, will the selected project have a share projects ... Operation. Table 5-3 provides a reference list of all CVS team operations. Some of these actions may be unfamiliar to you. We will discuss these operations later in this chapter. Typically, your most common operation is share Project ..., Synchronize with Repository ..., Update ... and commit .... The Share Project action is a comprehensive wizard that allows you to add projects to CVS. Each step from the definition of a CVS repository connection to the Submit project resource is included in the wizard.

Table 5-3 CVS action in the Team menu

Operation

Description

Add to. Cvsignore ...

This action excludes the selected project files from CVS management. These excluded files will not appear in the Synchronize view and will not be submitted to the CVS repository. CVS maintains a file named. Cvsignore in your project. An excluded file instance is identified in the file. At first, the. cvsignore file does not exist, and the. cvsignore file is created the first time the operation is executed. You must add the. cvsignore file to version control and maintain the file in CVS

ADD to Version control

This action places the selected files under CVS control. Typically, you use this action when you create a new file in your project. If you do not explicitly add resources to version control, Eclipse will prompt you when you perform a commit operation

Apply Patch ...

This action will use the patch file created by the Create patch operation to fix the program

Branch ...

The operation creates a branch. This way, the project (or selected Resource) can be modified independently of other development processes

Change Ascii/binary
Property ...

The Set Keyword Substitution Wizard is displayed after you perform this operation. This wizard allows you to select the desired CVS keyword replacement mode for the selected files. It defines how CVS interprets ASCII or binary files

Commit ...

If no conflicts occur, this action updates the CVS repository with your local changes and prompts you for a comment. If you select an Action object that is a project or folder, all of the modified resources in the project or folder will be submitted to CVS. If the corresponding file in CVS replaces the file you are submitting, commit ... Operation will fail

Create Patch ...

This creates a patch file based on the differences between local resources and CVS. Other people can share the patch file. This allows you to share your work outside the repository

Disconnect ...

This action deletes all CVS connection information in the selected workspace project

(continued)

Operation

Description

Edit

This action is available only for projects that have Watch/edit enabled (which can be enabled in the project's CVS property pages or CVS preference settings). The operation notifies the CVS server that you are updating the file. If someone else (one or more) is editing the file, you will be prompted to make a decision on whether to proceed with the operation. At this point, you can ignore the prompt and make changes to the file. However, you may encounter conflicts when you try to commit to a modification. If you just want to open the file you want to edit first, the file will be opened. But you get the same hint when you try to make a change to the file. If you want to use an external editor, the first thing you have to do is to cancel the read-only state of the file, and then open the file using an external editor. In the end, we'll continue the discussion of this operation

Merge ...

This action merges the modifications in a specific branch back into the code base before the branch

Restore from

Repository ...

For those deleted project files, if they still exist in the project and allow you to restore them back to the original workspace, the deleted files are listed after the action is performed. Later in this chapter, we will discuss the operation in detail

Share Project ...

Only projects can use this action. Also, this action can only be seen on projects that are not managed by the resource pool. The wizard appears after you perform this operation. In the wizard, you can accomplish tasks such as associate a project with a resource pool that you can use, and submit a project resource. This action may also be used by other resource pool providers

Show Annotation

When you do this, you switch to the CVS Repository exploring perspective and focus on the CVS annotate view to show the comments for the selected file

Show Editors

This action applies to folders and files in projects with Watch/edit enabled (which can be enabled in the project's CVS property pages or CVS preference settings). The CVS editor view opens after you perform this operation. In this view, other users who are editing the file or the contents of the folder are identified. Only those projects with Watch/edit enabled may appear in the CVS editor view

Show in Repository

History

This displays the CVS Repository history view for the selected resource

Synchronize with

Repository ...

This compares the selected file to the corresponding file in the CVS repository and switches to the team synchronizing perspective. Any differences found after the comparison are displayed in the Synchronize view. For projects or folders, when you do this, all of the resources that they contain will be compared to the corresponding resources in CVS. Resources that have changed compared to the corresponding resources in CVS are displayed in the Synchronize view. This is the safest way to use CVS when you examine all changes, compare to a repository instance, and resolve conflicts

Tag as Version ...

This adds a version flag to all CVS instances of the selected project, folder (or file), and all of the child file resources. You can also make version identification in the CVS repositories view

(continued)

Operation

Description

Unedit

This action is available only for project files that have Watch/edit enabled (which can be enabled in the project's CVS property pages or CVS preference settings). This action removes you from the list of users currently editing a file. After you perform this action, you are removed from the list of currently active users, and any changes you make are canceled, and the edited file reverts to the content before any updates are performed. When submitting a file to CVS, the Unedit operation is implicitly invoked if the workspace copy is identical to the server copy. In the later part of this chapter, we will also discuss this operation

Update ...

This action will update the local resource with all the latest versions of CVS. Updates in CVS are merged with local resources (except binary files). We recommend that you use a commit ... Execute Update before operation ... Operation. If someone else commits the action after your last update, your commit will fail. We recommend that you use Synchronize with Repository ... Action to replace update ... Operation

5.4.8 Team Synchronizing Perspective and Synchronize Wizard

The

Team synchronizing perspective is your home base for synchronizing workspaces with CVS (where other repository providers can be integrated into the team synchronizing perspective). In the selected team | Synchronize with Repository ... After the operation, you are prompted and switched to the team synchronizing perspective. The team synchronizing perspective contains the Synchronize view and an editor area. All the editors that are opened are displayed in the editor area. Figure 5-7 shows an example of a team synchronizing perspective. In the Synchronize view, you can observe and manipulate the differences between a local project and a CVS copy of the project. The view can also be used by other repository providers that want to use the perspective. When you open a file, Eclipse also opens an appropriate comparison editor (text, Java, XML, or images). The difference between the workspace file and the latest version of the file in CVS is shown in the diff editor. This allows you to browse and finalize the contents of the file before submitting it to CVS.

The toolbar on the Synchronize view has the following set of buttons: Incoming mode (updated from CVS), outgoing mode (submitted to CVS), incoming and outgoing mode, and conflicts mode. By using the buttons above, you can filter the synchronization information. After you have used the incoming Mode button, you will see which actions are in progress. If you are the only person in your group, you may only be interested in the outgoing mode button. To accept all incoming changes, use the update all incoming Changes on the Synchronize View toolbar ... Button. To submit all of your changes, use the commit all outgoing Changes on the Synchronize View toolbar ... Button. The toolbar action Pin current synchronization allows you to reference a set of resources used in a previous synchronization. These buttons on the toolbar of the Synchronize view allow you to filter the content through the working set. You can adjust the comparison criteria and use the Layout menu to toggle the view between the tree, the compressed folder, and the commit set (commit set). The commit set allows you to view resource pool changes. These changes are categorized according to the submitter, comments, and date of submission. This classification is useful when determining more detailed information for incoming change sets. The Synchronize view has its own Preferences dialog box. In the Synchronize View menu, you can open the Preferences dialog box. In the Synchronize View menu, you can also perform schedule ... Operation. This action allows you to automate the synchronization of the repository according to a recurring progress that you choose.

Figure 5-7 shows team synchronizing perspective 1 for the three-party comparison of incoming and outgoing conflict files . Synchronize Wizard

Select Synchronize from the Drop-down menu in the Workbench toolbar (or the Synchronize View menu bar) ... The Synchronize wizard appears after the operation. In the Synchronize Wizard, you can select a project to synchronize with CVS (and other repository providers that are allowed to use the Eclipse Group synchronization Support). As shown in Figure 5-8, you can synchronize the workspace, the selected resource, or a working set. After the Synchronize wizard finishes, you will return to the team synchronizing perspective.

Related Article

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.