Committing

You can commit Workbench resources that you have modified to the repository so that other team members can see your work. Only those changes committed on that branch will be visible to others working on that branch. The commit command can be issued from two places: the Team > Commit menu, or the Synchronize view.

To commit changes using Team > Commit:

  1. In the Navigator view, select the resources that you want to commit.
  2. Right-click on the resources and chose Team > Commit from the popup menu.
  3. In the Commit Comment dialog box, provide a comment for your changes (for example, Fixed the spelling mistakes).

If there are conflicting changes on any files that are committed in the above fashion, the operation will fail. If this occurs, you must either perform an update or use the Synchronize view to resolve the conflicts. It is considered a more ideal workflow to always update before committing anyway in order to ensure that you have the latest state of the repository before committing more changes.

To commit changes in the Synchronize view:

  1. In the Navigator view, select the resources that you want to commit.
  2. Right-click to open the pop-up menu and select Team > Synchronize with Repository. The Synchronize view will open.
  3. On the toolbar of the Synchronize view, select the outgoing mode button to show any modified Workbench resources (outgoing changes) that you may have.
  4. If there are conflicts (red arrows), resolve them. Use the text compare area to merge resources with conflicts. You can copy changes from the repository revision of the file to the Workbench revision of the file and save the merged Workbench resource. Once all the conflicts in the Structure Compare area have been resolved, you are ready to commit.
  5. In the Structure Compare pane, right-click the top of the hierarchy that you want to commit, and select Commit from the pop-up menu.
  6. In the Commit Comment dialog box, provide a comment for your changes (for example, Fixed the spelling mistakes).

Tip: You can commit files that are in conflict by performing an Override and Commit. This will commit the Workbench copy of the resource into the repository and thus remove any of the incoming changes.

Warning: The behavior of the Override and Commit command described above only applies to the outgoing mode of the Synchronize view. In the incoming/outgoing mode of the view, the behavior for outgoing changes and conflicts is the same but the command will revert incoming changes to whatever the local Workbench contents are. Exercise great caution if using this command in incoming/outgoing mode.

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

Related tasks
Updating
Resolving conflicts
Comparing resources
Version control life cycle: adding and ignoring resources

Related references
CVS
CVS Synchronize view

 
Copyright IBM Corporation and others 2000, 2002