blob: 70379671f4305f0009742a7bb042e41945884e9b [file] [log] [blame]
<!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>CVS Workspace Synchronization</title>
</head>
<body>
<h1>CVS Workspace Synchronization</h1>
<p>A CVS workspace synchronization launched using the <em class="UILabel">Team &gt; Synchronize</em>
menu command or the <em class="UILabel">Synchronize</em> toolbar command in the Team Perspective will appear
in the Synchronize view. This view allows you to inspect the differences between the local
Workbench resources and their remote counterparts as well as
update resources in the Workbench
and commit resources from the Workbench to a repository.</p>
<p>Here is what the CVS Workspace Synchronization in the Synchronize view looks like:</p>
<p>
<img align="top" border="0" src="../images/Image245_sync_view.png" alt="CVS Workspace Synchronization" >
</p>
<h2>Features</h2>
<p>The following is a brief summary of some of the features of the synchronize view.</p>
<h3>Synchronization state</h3>
<p>The synchronize view shows the synchronization
state of resources in your workspace compared to those in the repository.
This state is shown by using icons and can also be configured to show the
state as text appended to the resource name. A description of the icons is
shown in the table below:</p>
<table width="100%" border="1">
<tr>
<td width="9%" align="center"><img src="../images/r_inadd_ov.svg" alt="Incoming addition icon" ></td>
<td width="91%">An incoming addition means that a resource has been added
to the repository. <strong>Updating</strong> will transfer the resource
to your workspace.</td>
</tr>
<tr>
<td align="center"><img src="../images/r_inchg_ov.svg" alt="Incoming change icon" ></td>
<td>An incoming change means that the file has changed in the repository.
<strong>Updating</strong> will transfer the new file revision to your
workspace.</td>
</tr>
<tr>
<td align="center"><img src="../images/r_indel_ov.svg" alt="Incoming deletion icon" ></td>
<td>An incoming deletion means that a resource was deleted from the server.
<strong>Updating</strong> will delete your local resource.</td>
</tr>
<tr>
<td align="center"><img src="../images/r_outadd_ov.svg" alt="Outgoing addition icon" ></td>
<td>An outgoing addition means that the file was added to your workspace
and is not yet in the repository. <strong>Adding</strong> then <strong>Committing</strong>
will transfer the new file to the repository.</td>
</tr>
<tr>
<td align="center"><img src="../images/r_outchg_ov.svg" alt="Outgoing change icon" ></td>
<td>An outgoing change means that the file was change locally. <strong>Committing</strong>
the file will transfer the changes to the repository and create a new
revision of the file.</td>
</tr>
<tr>
<td align="center"><img src="../images/r_outdel_ov.svg" alt="Outgoing deletion icon" ></td>
<td>An outgoing deletion is a resource that has been deleted locally. <strong>Committing
</strong>these resources will cause the remote resource to be deleted.
<strong>Note</strong>: in CVS directories are never really deleted from
the repository. Instead, files are deleted and empty directories are pruned
from your workspace. </td>
</tr>
<tr>
<td align="center"><img src="../images/confadd_ov.svg" alt="Conflicting addition icon" ></td>
<td>A conflicting additions means that the resource has been added locally
and remotely.</td>
</tr>
<tr>
<td align="center"><img src="../images/confchg_ov.svg" alt="Conflicting change icon" ></td>
<td>A conflicting change means that the file has been changed locally and
remotely. A manual or automatic merge will be required. Also,
any entries in the view that contain children that are conflicts will also
be decorated with the conflict icon. This is done to make conflicts easy
to find. </td>
</tr>
<tr>
<td align="center"><img src="../images/confdel_ov.svg" alt="Conflicting deletion icon" ></td>
<td>A conflicting deletion means that the resource was deleted locally and
remotely. </td>
</tr>
</table>
<h3>Mode</h3>
<p>The Synchronize view can be filtered using modes using either the toolbar actions or
the menu items in the view's drop down menu.
Modes can be used to show only incoming, outgoing or conflicting changes.
The advantages to modes are: </p>
<ul>
<li>
They support and encourage the <a href="../concepts/concepts-26.htm#IdealWorkFlow"> ideal work flow.</a></li>
<li>
They reduce the amount of information you are faced with at any one time.</li>
<li> They provide a degree of safety restricting you to those operations appropriate
to that mode. For example, you can't accidentally commit a conflict when
in incoming mode.</li>
</ul>
<p> <b>Important</b>: 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>Models</h3>
<p> The Synchronize view is capable of displaying different model representations of the resources. Each product
may contain its own product specific representations. The Eclipse SDK comes with three models:</p>
<ul>
<li><b>Workspace Model</b>: displays a resource based model. Layout options for this model can be controlled
from the Preferences dialog in the drop down menu. The layout options for the Workspace model are:<br>
<ul>
<li>Flat layout shows all the out-of-sync resources as direct children of their project.</li>
<li>Tree layout shows the resource hierarchy as it is shown in the
Project Explorer.</li>
<li>Compress Folders shows changes grouped by project and then by folder. This
results in a hierarchy that is at most three levels deep with folder paths
being compressed into a single level (similar to a Java package).</li>
</ul>
</li>
<li><b>Java Model</b>: displays a Java based model (similar to what appears in the Package Explorer).</li>
<li><b>Change Sets</b>: displays a Change Set based model. This model shows incoming
changes grouped by commit
comment which is handy for seeing who released what and why. For outgoing changes,
you can create Change Sets for grouping related
changes together. Grouping is performed using various commands in the context
menu. </li>
</ul>
<p> In addition to to the models, there is also a <b>Flat Presentation</b> which
displays all the out-of-sync elements as top level elements.</p>
<h3>Navigation</h3>
The Synchronize view provides toolbar actions for navigating through the changes in the view.
These actions not only navigate between files but also go from change to change within a file.
<h3>Update and Commit Operations</h3>
<p> There are several flavours of update and commit operations available in the
Synchronize view. You can perform the standard update and commit operation on
all visible applicable changes or a selected subset. You can also choose to
override and update, thus ignoring any local changes, or override and commit,
thus making the remote resource match the contents of the local resource. You
can also choose to clean the timestamps for files that have been modified locally
(perhaps by an external build tool) but whose contents match that of the server.</p>
<h3>Conflict Handling</h3>
<p> When dealing with conflicts, you can first perform an update and any conflicting
changes The update operation will correctly update conflicts that are auto-mergeable
(i.e. files content changes do not overlap) but will skip files that contain
changes that overlap. Alternatively, conflicts can be handled using a Compare
editor. A Compare editor can be opened by double-clicking (or single-clicking
if you have change your open strategy in the preferences) on the conflict or
by choosing <b>Open in Compare Editor</b> from the context menu. The Compare
editor allows you to manually resolve the conflicts in the file. Once completed,
perform a <b>Mark as Merged</b> on the conflict to indicate that you are done.
This will change the conflict into an outgoing change.</p>
<h3>Problem Markers</h3>
<p>
The Synchronize view will show <i>error</i> or <i>warning</i> problem markers on any change that appears
in the view or any folder or project that appears in the view that contains a resource that has such a problem
marker. This is done to prevent resources with problems from getting committed to the repository.</p>
<h2>Toolbar</h2>
<div class="Topic">
<h3>Synchronize</h3>
<p class="Para">This command allows you to repeat the current synchronization
which refetches the remote state of the resources. The drop down of the toolbar
item allows you to select other existing synchronizations or create new ones
using the <b>Synchronize...</b> menu command.</p>
</div>
<div class="Topic">
<h3>Pin Current Synchronization</h3>
<p>This command allows you to pin or unpin the current synchronization.
Pinned synchronizations will not be replaced by the next synchronization of the same type
while unpinned synchronizations will be replaced.
This allows you to keep a synchronization around for easy access. Such a synchronization
will automatically update when changes to Workbench resources take place and can be configured
to perform scheduled refreshes in order to keep up-to-date with the remote state of the resources. </p>
</div>
<div class="Topic">
<h3>Models drop down</h3>
<p>This drop down list presents the models that can be displayed in the Sync View.</p>
</div>
<div class="Topic">
<h3>Next Difference</h3>
<p>This command will go to the next difference displayed by the view. All the
differences within a single file will be visited before opening the next file in the view.</p>
</div>
<div class="Topic">
<h3>Previous Difference</h3>
<p>This command will go to the previous difference displayed by the view. All the
differences within a single file will be visited before opening the previous file in the view.</p>
</div>
<div class="Topic">
<h3>Collapse All</h3>
<p>Collapse all the expanded entries in the view.</p>
</div>
<div class="Topic">
<h3>Incoming Mode</h3>
<p>In this mode, only resources which have been changed in the repository
since they were last loaded or synchronized with those in the Workbench
(incoming changes) are visible.</p>
</div>
<div class="Topic">
<h3>Outgoing Mode</h3>
<p>In this mode, only resources which have been modified in the Workbench
(outgoing changes) are visible.</p>
</div>
<div class="Topic">
<h3>Incoming/Outgoing Mode</h3>
<p> In this mode both incoming and outgoing changes are shown, and you can
both update and commit. The advantage to using this dual mode is
you can do either task as you choose. The disadvantage is that performing
a simultaneous bi-directional merge is often complicated.</p>
</div>
<div class="Topic">
<h3>Conflicts Mode</h3>
<p> In this mode only conflicts (resources modified both in the Workbench
and in the repository) are shown.</p>
</div>
<div class="Topic">
<h3>Update All Incoming Changes</h3>
<p>This command updates all the incoming changes visible in the view.
The command will also update conflicts that are auto-mergeable but will skip
files whose contents contain conflicts.</p>
</div>
<div class="Topic">
<h3>Commit All Outgoing Changes</h3>
<p>This command commits all the outgoing changes visible in the view.
Conflicts are not included in the commit.</p>
</div>
<div class="Topic">
<h3>Drop Down Menu</h3>
<p>The drop down menu allows you to pin or remove the current or remove all
synchronizations, change the mode or layout, restore removed from view
items, configure the current synchronization to perform scheduled refreshes
as well as set other view preferences.</p>
</div>
<h2>Context menu </h2>
<p>From the context menu of the Synchronize view you can perform
a number of interesting operations.</p>
<h3>Open</h3>
<p>This command open the local resource for the selected change in
the default Workbench editor for the file type.</p>
<h3>Open With</h3>
<p>This command allows you to open the local resource for the selected
change in the a Workbench editor.</p>
<h3>Show In</h3>
<p>This sub-menu is used to show the currently selected resource in another view.</p>
<h3>Open in Compare Editor</h3>
<p>This command open the selected change in a Compare editor which allows
you to inspect the changes within the file.</p>
<h3>Edit</h3>
<p>This menu allows for renaming, deleting, moving or copying the resource.</p>
<h3>Synchronize</h3>
<p>This command refreshed the remote state of the selected resources.
In addition, this command will adjust the timestamps of outgoing changes whose
contents already match the contents of the corresponding resource on the server
so that the file is no longer an outgoing change. This is useful in situations
where build tools regenerate files whose contents have not changed.</p>
<h3>Expand All</h3>
<p >This command expands all of the selected resource's children.</p>
<h3>Remove from View</h3>
<p>This command removes the selected resources from the view. The
resources will only reappear if the state of the removed resources changes or the
Workbench is restarted or the <strong> Restore Removed Items </strong> action is
invoked from the Drop Down menu.</p>
<h3>Update</h3>
<p>This command updates the selected resources. Conflicts can be
included in an update but only auto-mergeable conflicts will be updated. Non-mergeable
conflicts will be skipped and should be merged manually using a compare editor.</p>
<h3>Commit</h3>
<p>This command commits the selected resources. Only outgoing
changes can be committed.</p>
<h3>Override and Update</h3>
<p>This command operates on conflicts and outgoing changes
and replaces the local contents of those resources with the contents
from the server.</p>
<h3>Mark as Merged</h3>
<p>This command adjusts the CVS timestamps of conflicting changes
so they become outgoing changes. This command should be performed after
conflicts are merged manually using a compare editor.</p>
<h3>Add to .cvsignore</h3>
<p>This command will add the selected resource to the .cvsignore list which will
cause CVS to skip the resource during all CVS operations.</p>
<h3>Create Patch</h3>
<p>This command will bring up the Create Patch wizard and populate it with the selected
resources.</p>
<h3>Branch...</h3>
<p>This command will create a new branch and a new branch tag which can be used to merge
the branch back to the source branch.</p>
<h3>Show Annotation</h3>
<p>Depending on your Annotation preferences, this command will either bring up turn on the Quick Diff annotate
or open the Annotate view for the selected resource.</p>
<h3>Change ASCII/Binary Property...</h3>
<p>This command will open a dialog containing all of the selected resources. You can then
alter the ASCII/Binary property for each resource.</p>
<h3>Reassign Changes To</h3>
<p>This command will move changes to the change set selected from the sub-menu.</p>
<h3>Edit Change Set...</h3>
<p>This command will open a dialog that allows to create or edit the name and comment
for the selected change set.</p>
<h3>Make Changes Unassigned</h3>
<p>This command removes changes from the selected change set. If all changes are removed
the change set is deleted.</p>
<h3>Mark Change Set as Default</h3>
<p>This command will mark/unmark the selected change set as default.</p>
<h3>Don't Use Default Change Set</h3>
<p>This command will remove the default flag from the change set currently marked as default.</p>
<h3 class="related">Related concepts</h3>
<a href="../concepts/concepts-26.htm">Team programming with CVS</a><br>
<a href="../concepts/concepts-30.htm">Synchronizing with a CVS repository</a>
<h3 class="related">Related tasks</h3>
<a href="../tasks/tasks-115.htm">Synchronizing with the repository</a><br>
<a href="../tasks/tasks-113.htm">Updating</a><br>
<a href="../tasks/tasks-113b.htm">Resolving conflicts</a><br>
<a href="../tasks/tasks-100b.htm">Merging from a branch</a><br>
<a href="../tasks/tasks-114.htm">Committing</a><br>
<a href="../tasks/tasks-68.htm">Comparing resources</a><br>
<a href="../tasks/tasks-68dg.htm">Merging changes in the compare editor</a>
<h3 class="related">Related reference</h3>
<a href="../reference/ref-47.htm">CVS</a><br>
<a href="ref-25.htm">Compare editor</a>
</body>
</html>