blob: 612702b7a9257516d7bdcd689e94a2ee4c7a0102 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. 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"> </script>
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>Synchronizing with the repository</H1>
<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 &gt; 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.png" alt="" border="0" >
button drop down.</li>
<li>Select <strong>CVS</strong> from the list of possible synchronization types
and click <strong>Next</strong>.</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> <strong>Note</strong>: 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.png">
<strong>Window &gt; Customize Perspective</strong></a>. Then click
on the <strong>Commands</strong> tab and check off <strong>Team</strong>.</p>
<p><em>Tip</em>: If you choose the Workspace scope for your synchronization, you
can then use method 3 below to always have an up-to-date view of your local
modifications available in the Synchronize view without re-running the synchronize
operation. </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>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.png" 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>
<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>
<ol>
<li>Use the toolbar buttons to switch modes for this view. There are four modes:
<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>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></li>
<li>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.</li>
</ol>
<p><img border="0" src="../images/ngrelc.png" alt="Related concepts" ><br>
<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></p>
<p><img border="0" src="../images/ngrelt.png" alt="Related tasks" ><br>
<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><br>
</p>
<p><img border="0" src="../images/ngrelr.png" alt="Related references" >
<br><a href="../reference/ref-47.htm">CVS</a>
<br><a href="../reference/ref-33.htm">Synchronize view</a>
</p>
</BODY>
</HTML>