| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| <HTML> |
| <HEAD> |
| <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"> |
| <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> |
| <LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css"> |
| <title>Committing</title> |
| <meta name="keyword" content="team"> |
| </HEAD> |
| |
| <BODY BGCOLOR="#ffffff"> |
| <H1 CLASS="Head">Committing</H1> |
| |
| <P>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 <b>Team > Commit</b> menu, or the <b>Synchronize</b> |
| view. |
| </p> |
| |
| <P>To commit changes using <b>Team > Commit</b>: |
| </p> |
| |
| <ol> |
| <li>In the Navigator view, select the resources that you want to commit.</li> |
| <li>Right-click on the resources and select <b>Team > Commit</b> from the pop-up menu.</li> |
| <li>In the Commit Comment dialog box, provide a comment for your changes (for |
| example, <samp>Fixed the spelling mistakes</samp>).</li> |
| </ol> |
| |
| <P>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 in order to ensure |
| that you have the latest state of the repository before committing more changes. |
| </p> |
| <P>If one or more of the resources being committed are new and not yet added to |
| CVS control, you will be prompted to add these resources before the commit is |
| performed. You can choose to add all, some or none of the new resources to CVS |
| control before performing the commit. Any resources that are not under CVS control |
| will not be committed. Committing from the Synchronize view also prompts if |
| there are new resources.</p> |
| <P>To commit changes in the Synchronize view: |
| </p> |
| |
| <ol> |
| <li>In the Navigator view, select the resources that you want to commit.</li> |
| <li>Right-click to open the pop-up menu and select <b> Team > Synchronize |
| with Repository</b>. The Synchronize view will open.</li> |
| <li>On the toolbar of the Synchronize view, select the <b>outgoing mode</b> |
| button to show any modified Workbench resources (outgoing changes) that you |
| may have.</li> |
| <li>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.</li> |
| <li>In the Structure Compare pane, right-click the top of the hierarchy that |
| you want to commit, and select <b>Commit</b> from the pop-up menu.</li> |
| <li>In the Commit Comment dialog box, provide a comment for your changes |
| (for example, <samp>Fixed the spelling mistakes</samp>).</li> |
| </ol> |
| |
| <P><em>Tip:</em> You can commit files that are in conflict by performing an <b>Override |
| and Commit</b>. This will commit the Workbench copy of the resource into the |
| repository and thus remove any of the incoming changes. |
| </p> |
| |
| <P><em>Warning:</em> The behavior of the <b>Override and Commit</b> command described |
| above only applies to the outgoing mode of the Synchronize view. In the <b>incoming/outgoing |
| mode</b> 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. |
| </p> |
| |
| <p><img border="0" src="../images/ngrelc.gif" alt="Related concepts" width="159" height="27"><br> |
| <a href="../concepts/concepts-26.htm">Team programming with CVS</a><br> |
| <a href="../concepts/concepts-27c.htm">CVS Repositories</a><br> |
| <a href="../concepts/concepts-27b.htm">Branches</a><br> |
| <a href="../concepts/concepts-30.htm">Synchronizing with a CVS repository</a> |
| </p> |
| |
| <p><img border="0" src="../images/ngrelt.gif" alt="Related tasks" width="159" height="27"><br> |
| <a href="tasks-113.htm">Updating</a><br> |
| <a href="tasks-113b.htm">Resolving conflicts</a><br> |
| <a href="tasks-68.htm">Comparing resources</a><br> |
| <a href="tasks-100d.htm">Version control life cycle: adding and ignoring resources</a> |
| </p> |
| |
| <p><img border="0" src="../images/ngrelr.gif" alt="Related references" width="159" height="27"> |
| <br><a href="../reference/ref-47.htm">CVS</a> |
| <br><a href="../reference/ref-33.htm">Synchronize view</a> |
| </p> |
| |
| <p> <br> |
| <a href="../hglegal2003.htm"><img src="../images/ngibmcpy2003.gif" alt="Copyright IBM Corporation and others 2000, 2003" border="0" width="324" height="14"></a> |
| </p> |
| |
| </BODY> |
| </HTML> |