Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse Workbench User Guide
Previous Page Home Next Page

Merging from a branch

After creating and working in a CVS branch for some time, you may want to merge your changes from the branch into another branch, or into HEAD. To do this, you will need to know:

  1. The name of the branch or version that contains your changes.
  2. The version from which the branch was created. This is the version name that you supplied when branching.

To merge your changes:

  1. Ensure that the destination is loaded into your workspace. For example, if you wish to merge your changes into HEAD, make sure the project is shared with HEAD in your workspace. To do this, select the project and choose Replace With > Another Branch or Version from the context menu. Then select the branch to replace with.
  2. Select the project and choose Team > Merge.
  3. Enter the branch or version which contains the changes you want to merge.
  4. The merge dialog will try to guess an appropriate start point. If that fails, enter the start point of the merge. This is the version from which the branch was created. Click Finish.
  5. A CVS Merge synchronization will be added to the Synchronize view, showing all differences between your workspace and the branch with the changes.
  6. Load all of the desired changes into the workspace. This may be accomplished by either manually merging changes, or by choosing Update, Override and Update, or Mark as Merged from the tree's context menu.
  7. After all desired changes are in the workspace, choose Team > Synchronize with Repository. You may then commit all the changes to the repository.

Tip: If you don't know the start point of the merge, you can choose to perform the merge directly into the workspace. This relies on the CVS server to pick an appropriate start point. Because the merge is performed directly into the workspace, CVS may introduce a text based conflict markup into the file. This markup is typically hard to deal with so merging directly into the workspace should only be done when necessary.

Merge actions

The actions in the merge editor complement the manual merge toolbar actions that are available in the bottom half of the merge editor.

Merge Running this action will bring the changes into the file in the workspace. Any conflicts that are not auto-mergeable will be skipped.
Override and Update This action is enabled on files with conflicting changes. Running this action will discard any local changes you have and replace the file with the remote contents.
Mark as Merged This action will remove the selected changes from the view. The changes will only reappear if the remote state of the resource changes and the CVS Merge Synchronization is refreshed.

Tip: You can perform ongoing merges by pinning a CVS Merge Synchronization in the Synchronize view. This will allow you to keep your workspace up-to-date with the changes released to a different branch.

Related concepts
Team programming with CVS
Branches
Synchronizing with a CVS repository

Related tasks
Branching
Synchronizing with the repository
Updating
Committing

Related reference
CVS
Merge wizard
CVS Merge Synchronization


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire