Function Description of CVS interface in eclipse-special cases and their processing (1)

Source: Internet
Author: User

// Original address: http://hi.baidu.com/xublog/blog/item/8265f309c5d35bc93ac76334.html

5.5 Special Cases and handling

Here are some common situations that you may encounter every day or during the software development cycle, as well as suggestions on how to use eclipse to handle these situations. In some cases, CVS may be used to solve the problem, but usually only eclipse can be used to process them.

5.5.1 rename, move, and delete project resources


Avoid renaming projects under the control of CVS. If you do, the name modification is only valid in the workspace of the project. The initial name of the project is retained in CVS. If repair is required
To change the project name, you 'd better use team first |
Disconnect... Operation to remove the association between the project and CVS, and then rename the project. In fact, the renamed project is regarded as a new project. Re-connect the renamed Project
When you connect to CVS, you must define the renamed project to CVS just like any new project.

● Renaming a folder will lead to a new folder in CVS. Fortunately, the content in the original folder will be moved to the new folder. If you have enabled the CVS preference prune empty directories, the old folder will not appear in your workspace after resources are checked out from CVS.


If you delete a resource in a workspace, after submitting a change to CVS, the resource saved in CVs will also be deleted. Remember that folders will never be deleted in CVS. CVS preferred
Prune empty directories to hide these folders in the view. By default, CVS preferences prune empty
Directories is enabled.

● Because modifications may involve multiple projects, make sure that all projects in the workspace are the latest in the resource library before making global modifications. Java class refactoring is an operation that may cause widespread modification of the workspace. Resource movement between projects may also have this impact.

● In the CVS perspective, the result of moving resources between projects is: The resource to be moved is added to the target project, and the resource in the source project is deleted. Resources moved to the target project must be added to version control. The effect of resource renaming is the same.


After a file is modified, if you want to perform CVS operations such as synchronization, we recommend that you synchronize the file at the project level (even if your change may involve only one separate file ). For example
The file is renamed to the CVS deletion and addition operation, the synchronization at the file level will only detect the addition operation, but not the deletion operation. Synchronization at the project level performs both the add and delete operations.
Detection.

● If the modification involves the entire application, you should notify your group of the modification to avoid unnecessary conflicts. Once the conditions are met, You should submit the modifications. Conflict resolution may be tedious and difficult to resolve.

5.5.2 cancel modification: Use replacement and comparison operations

Sometimes, we all want things to start again. In a person's life,
This may not be easy. But for eclipse and CVS, this is much simpler. You have multiple options as needed. In the previous chapters, you can see how to use shortcut menu operations
Replace with and compare
With replaces and compares resources with local history records in the workspace. By using CVS, you have additional options for Resource Replacement and comparison operations. If you have not completed a modification, and
Later, Reagan did not continue the modification. In this case, compare
The with operation may be very useful. It will remind you of the last stop modification. Before using the Replace with and compare
During the with operation, you use the latest resource from the head stream (or another branch/version, or a specific version) to replace or compare the current resource.

5.5.3 build branches for version maintenance and new version Development

When the team has delivered your application and is ready to start development for the next version, you may like all subsequent development tasks to start at the specific Branch assigned by the next version, you must also allow services of previous versions. Here we provide a method available in eclipse.


In the branch (or head) that contains the latest completed version, select all projects. Then use branch... Shortcut menu, and enter the new branch name of the new version. In this way
All selected projects and the content of these projects are marked by the branch name of the next version. In CVS
In the repositories view, these items are listed under the branch name. After these items are checked out to your workspace from that branch, the next operation is based on the new branch version.
.

● You can repeat the above process to create a separate Maintenance Branch. The maintenance branch is independent of the new version Branch created above.


To maintain the branch, you can use compare with | another branch
Or version... Operation to determine the difference between the two branches. In the Compare view, you can manually merge changes from the maintenance branch to the new version branch.

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.