| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| <html lang="en"> |
| <HEAD> |
| |
| <meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2011. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." > |
| |
| <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>Synchronizing with the repository</title> |
| <meta name="keyword" content="team"> |
| <script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js" type="text/javascript"> </script> |
| </HEAD> |
| |
| <BODY BGCOLOR="#ffffff"> |
| <H1>Synchronizing with the repository</H1> |
| Working with shared resources requires tracking their state in context of the repository |
| content. This could be done by creating a synchronization that populates the Synchronize |
| view and benefiting following advantages: |
| <ul> |
| <li>The local modification state of the resources being synchronized is kept |
| up-to-date. This means that, if you modify a file locally that is within the |
| scope of a synchronization that appears in the Synchronize view, the resource |
| will appear automatically in the view, if it is not already there.</li> |
| <li>The remote state of all of the resources being synchronized can be refreshed |
| using the Synchronize <img src="../images/synch_participants.svg" alt="" border="0" > |
| button in the toolbar of the Synchronize view.</li> |
| <li>The remote state of a selection of resources can be refreshed using the |
| Synchronize command from the context menu in the Synchronize view.</li> |
| </ul> |
| <p>Following methods can be used to create a synchronization.</p> |
| <h2>Method 1: Using the context menu</h2> |
| <p>To synchronize resources in the Workbench with those in the repository: </p> |
| |
| <ol> |
| <li>In one of the navigation views, select the resources that you want to synchronize.</li> |
| <li>Right click and select <b>Team > Synchronize with Repository</b>. The |
| Synchronize view opens.</li> |
| </ol> |
| <h2>Method 2: Using the synchronize action</h2> |
| <ol> |
| <li>From the Team Synchronizing perspective select the <strong>Synchronize...</strong> |
| action from the Synchronize <img src="../images/synch_participants.svg" alt="" border="0" > |
| button drop down.</li> |
| <li>Select <strong>CVS</strong> from the list of possible synchronization types |
| and click <strong>Next</strong>.<br><em>Note:</em> If there are no other repository providers registered with the |
| Workbench, then you will bypass this screen altogether.</li> |
| <li>Select the resource scope for the synchronize by either selecting Workspace, |
| Selected Resources or Working Set. Then select <strong>Finish.</strong></li> |
| <li>The Synchronize view will open.</li> |
| </ol> |
| <p> <em>Note</em>: The synchronize action is not enabled by default in |
| other perspectives. You can enable the action to appear in your current perspective |
| by selecting |
| <a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.customizePerspective")'> |
| <img src="PLUGINS_ROOT/org.eclipse.help/command_link.svg" alt="command link"> |
| <strong>Window > Perspective > Customize Perspective</strong></a>. Then click |
| on the <strong>Commands</strong> tab and check off <strong>Team</strong>.</p> |
| <p><em>Tip</em>: You can use method 3 below to avoid loosing the created synchronization.</p> |
| <h2>Method 3: Using a pinned CVS Workspace Synchronization in the Synchronize |
| view</h2> |
| <p>Once you have a CVS workspace synchronization in the Synchronize view, you |
| can pin it. This will prevent it from being replaced by the next CVS workspace |
| synchronization that is launched using one of the previous 2 methods. Here are |
| some of the advantages of using a pinned synchronization.</p> |
| <ul> |
| <li>You can remove any not pinned synchronization to make the pinned one visible. |
| To do it select <strong>Remove Current Synchronization</strong> from the Synchronize |
| view toolbar's menu.</li> |
| <li>You can schedule the refreshing of the remote state to happen at particular |
| intervals (each hour, for example)</li> |
| </ul> |
| <p>The implications of this is that you can see you outgoing resources without |
| re-fetching the remote state from the server (a potentially long running operation). |
| Also, the fetching of the remote state is run in the background so you can do |
| other things (e.g. inspect changes) while the remote state is fetched.</p> |
| <h3>From within the synchronize view</h3> |
| <p>Use the toolbar buttons to switch modes for this view. There are four modes:</p> |
| <ul> |
| <li>Incoming mode - shows incoming changes only (resources in the repository |
| that differ from what is in the Workbench).</li> |
| <li>Outgoing mode - shows outgoing changes only (resources modified in the |
| Workbench).</li> |
| <li>Incoming/Outgoing mode - shows both incoming and outgoing changes.</li> |
| <li>Conflicts mode - shows only conflicting resources.</li> |
| </ul> |
| <p><em>Note:</em> It is possible that someone has committed a new revision of your |
| file since you started working on it. This will result in a <em>conflict</em>, and care |
| must be taken to resolve this. For this reason, conflicts are shown in all modes of the |
| Synchronize view. |
| </p> |
| <p><em>Important:</em> It is preferable to update resources in the Workbench |
| first, resolve any conflicts that exist by merging, then commit Workbench |
| resources to the repository. |
| </p> |
| |
| <h3 class="related">Related concepts</h3> |
| <a href="../concepts/concepts-26.htm">Team programming with CVS</a><br> |
| <a href="../concepts/concepts-27b.htm">Branches</a><br> |
| <a href="../concepts/concepts-30.htm">Synchronizing with a CVS repository</a><br> |
| <a href="../concepts/concepts-29.htm">Three way comparisons</a> |
| |
| <h3 class="related">Related tasks</h3> |
| <a href="tasks-114.htm">Committing</a><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-68dg.htm">Merging changes in the Compare editor</a><br> |
| <a href="tasks-100b.htm">Merging from a branch</a><br> |
| <a href="tasks-100d.htm">Version control life cycle: adding and ignoring resources</a><br> |
| <a href="tasks-103.htm">Replacing resources in the Workbench</a> |
| |
| <h3 class="related">Related reference</h3> |
| <a href="../reference/ref-47.htm">CVS</a><br> |
| <a href="../reference/ref-33.htm">Synchronize view</a> |
| |
| </BODY> |
| </HTML> |