blob: b01ef1f01679ffb23005a1bf1dbcae3ece72705f [file] [log] [blame]
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Working with Checkouts (CDO Model Repository Documentation)</title>
<link rel="stylesheet" href="../book.css" charset="UTF-8" type="text/css">
<noscript></noscript>
<script type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Working with Checkouts (CDO Model Repository Documentation)";
}
}
</script>
</head>
<body bgcolor="white" onload="windowTitle();">
<!-- <div class="help_breadcrumbs breadcrumbs_top"><a href="../Overview.html" title="CDO Model Repository Documentation">CDO Model Repository Documentation</a> > <a href="index.html" title="Category in CDO Model Repository Documentation">User's Guide</a></div> -->
<table border="0">
<tr>
<td width="100%"><h1>Working with Checkouts</h1></td>
<td align="right" valign="middle" nowrap><a href="Doc04_CheckingOut.html" title="Backward to Checking Out from Repositories"><img src="../../images/backward.png" border="0"></a>&nbsp;<a href="Doc06_UsingResources.html" title="Forward to Working with Folders and Resources"><img src="../../images/forward.png" border="0"></a></td>
</tr>
</table>
<p class="author">Author: Eike Stepper</p>
<p>
The key concept of working with models in the <a href="Doc01_UserInterface.html#Doc_ProjectExplorerIntegration" title="Chapter in CDO Model Repository Documentation">Project Explorer</a> is a <a href="../../javadoc/org/eclipse/emf/cdo/explorer/checkouts/CDOCheckout.html" title="Interface in org.eclipse.emf.cdo.explorer.checkouts"><code>checkout</code></a>.
See <a href="Doc04_CheckingOut.html" title="Article in CDO Model Repository Documentation">Checking Out from Repositories</a> for details on how to to create <a href="Doc04_CheckingOut.html#Doc_TransactionalCheckouts" title="Chapter in CDO Model Repository Documentation">online transactional checkouts</a>,
<a href="Doc04_CheckingOut.html#Doc_HistoricalCheckouts" title="Chapter in CDO Model Repository Documentation">online historical checkouts</a>, and <a href="Doc04_CheckingOut.html#Doc_OfflineCheckouts" title="Chapter in CDO Model Repository Documentation">offline checkouts</a>.
<p>
A checkout represents a <i>named</i> combination of the following pieces of information:
<ul>
<li> A configured repository (see <a href="Doc02_ManagingRepositories.html#Doc_CreatingRepositories" title="Chapter in CDO Model Repository Documentation">Creating Repositories and Connections</a> for details on how to create and configure repositories),
<li> a <a href="../../javadoc/org/eclipse/emf/cdo/common/branch/CDOBranchPoint.html" title="Interface in org.eclipse.emf.cdo.common.branch"><code>branch point</code></a> that determines from what <a href="../../javadoc/org/eclipse/emf/cdo/common/branch/CDOBranchPoint.html#getBranch()" title="Method in org.eclipse.emf.cdo.common.branch.CDOBranchPoint"><code>branch</code></a> and from
what <a href="../../javadoc/org/eclipse/emf/cdo/common/branch/CDOBranchPoint.html#getTimeStamp()" title="Method in org.eclipse.emf.cdo.common.branch.CDOBranchPoint"><code>time</code></a> the models of the checkout are shown, and
<li> an object to be used as the root object of the checkout's model tree. By default this is the
<a href="../../javadoc/org/eclipse/emf/cdo/view/CDOView.html#getRootResource()" title="Method in org.eclipse.emf.cdo.view.CDOView"><code>root resource</code></a> of the repository.
</ul>
<p>
Once created, checkouts are displayed in the Project Explorer like workspace projects and decorated with a small blue repository image.
In contrast to workspace projects the displayed checkouts have no physical representation in the workspace. <p align="center"><img src="project-explorer.png">
<p>
<b>Table of Contents</b> <p>
<table border="0">
<tr><td>1&nbsp;</td><td class="te" colspan="4"><a href="Doc05_UsingCheckouts.html#Doc_RenamingCheckouts" title="Chapter in CDO Model Repository Documentation">Renaming Checkouts</a></td></tr>
<tr><td>2&nbsp;</td><td class="te" colspan="4"><a href="Doc05_UsingCheckouts.html#Doc_DuplicatingCheckouts" title="Chapter in CDO Model Repository Documentation">Duplicating Checkouts</a></td></tr>
<tr><td>3&nbsp;</td><td class="te" colspan="4"><a href="Doc05_UsingCheckouts.html#Doc_OpeningClosing" title="Chapter in CDO Model Repository Documentation">Opening and Closing Checkouts</a></td></tr>
<tr><td>4&nbsp;</td><td class="te" colspan="4"><a href="Doc05_UsingCheckouts.html#Doc_DeletingCheckouts" title="Chapter in CDO Model Repository Documentation">Deleting Checkouts</a></td></tr>
<tr><td>5&nbsp;</td><td class="te" colspan="4"><a href="Doc05_UsingCheckouts.html#Doc_SwitchingBranch" title="Chapter in CDO Model Repository Documentation">Switching the Branch of a Checkout</a></td></tr>
<tr><td></td><td>5.1&nbsp;</td><td class="te" colspan="3"><a href="Doc05_UsingCheckouts.html#Doc_SwitchNewBranch" title="Chapter in CDO Model Repository Documentation">Switching to a New Branch</a></td></tr>
<tr><td></td><td>5.2&nbsp;</td><td class="te" colspan="3"><a href="Doc05_UsingCheckouts.html#Doc_SwitchOtherBranch" title="Chapter in CDO Model Repository Documentation">Switching to an Other Branch</a></td></tr>
<tr><td>6&nbsp;</td><td class="te" colspan="4"><a href="Doc05_UsingCheckouts.html#Doc_SwitchingBranchPoint" title="Chapter in CDO Model Repository Documentation">Switching the Time Stamp of a Checkout</a></td></tr>
<tr><td></td><td>6.1&nbsp;</td><td class="te" colspan="3"><a href="Doc05_UsingCheckouts.html#Doc_SwitchOtherBranchPoint" title="Chapter in CDO Model Repository Documentation">Switching to an Other Branch Point</a></td></tr>
<tr><td></td><td>6.2&nbsp;</td><td class="te" colspan="3"><a href="Doc05_UsingCheckouts.html#Doc_SwitchCommit" title="Chapter in CDO Model Repository Documentation">Switching to a Commit</a></td></tr>
<tr><td>7&nbsp;</td><td class="te" colspan="4"><a href="Doc05_UsingCheckouts.html#Doc_ComparingCheckouts" title="Chapter in CDO Model Repository Documentation">Comparing Checkouts</a></td></tr>
<tr><td></td><td>7.1&nbsp;</td><td class="te" colspan="3"><a href="Doc05_UsingCheckouts.html#Doc_CompareOtherBranch" title="Chapter in CDO Model Repository Documentation">Comparing with an Other Branch</a></td></tr>
<tr><td></td><td>7.2&nbsp;</td><td class="te" colspan="3"><a href="Doc05_UsingCheckouts.html#Doc_CompareOtherBranchPoint" title="Chapter in CDO Model Repository Documentation">Comparing with an Other Branch Point</a></td></tr>
<tr><td></td><td>7.3&nbsp;</td><td class="te" colspan="3"><a href="Doc05_UsingCheckouts.html#Doc_CompareCommit" title="Chapter in CDO Model Repository Documentation">Comparing with a Commit</a></td></tr>
<tr><td>8&nbsp;</td><td class="te" colspan="4"><a href="Doc05_UsingCheckouts.html#Doc_MergingCheckouts" title="Chapter in CDO Model Repository Documentation">Merging Checkouts</a></td></tr>
<tr><td></td><td>8.1&nbsp;</td><td class="te" colspan="3"><a href="Doc05_UsingCheckouts.html#Doc_MergeOtherBranch" title="Chapter in CDO Model Repository Documentation">Merging from an Other Branch</a></td></tr>
<tr><td></td><td>8.2&nbsp;</td><td class="te" colspan="3"><a href="Doc05_UsingCheckouts.html#Doc_MergeOtherBranchPoint" title="Chapter in CDO Model Repository Documentation">Merging from an Other Branch Point</a></td></tr>
<tr><td></td><td>8.3&nbsp;</td><td class="te" colspan="3"><a href="Doc05_UsingCheckouts.html#Doc_MergeCommit" title="Chapter in CDO Model Repository Documentation">Merging from a Commit</a></td></tr>
<tr><td>9&nbsp;</td><td class="te" colspan="4"><a href="Doc05_UsingCheckouts.html#Doc_CheckoutShowIn" title="Chapter in CDO Model Repository Documentation">Showing Checkouts in Other Views</a></td></tr>
<tr><td></td><td>9.1&nbsp;</td><td class="te" colspan="3"><a href="Doc05_UsingCheckouts.html#Doc_CheckoutShowInSessions" title="Chapter in CDO Model Repository Documentation">Showing Checkouts in the CDO Sessions View</a></td></tr>
<tr><td></td><td>9.2&nbsp;</td><td class="te" colspan="3"><a href="Doc05_UsingCheckouts.html#Doc_CheckoutShowInTimeMachine" title="Chapter in CDO Model Repository Documentation">Showing Checkouts in the CDO Time Machine View</a></td></tr>
<tr><td></td><td>9.3&nbsp;</td><td class="te" colspan="3"><a href="Doc05_UsingCheckouts.html#Doc_CheckoutShowInServerBrowser" title="Chapter in CDO Model Repository Documentation">Showing Checkouts in the CDO Server Browser</a></td></tr>
<tr><td></td><td>9.4&nbsp;</td><td class="te" colspan="3"><a href="Doc05_UsingCheckouts.html#Doc_CheckoutShowInProperties" title="Chapter in CDO Model Repository Documentation">Showing Checkouts in the Properties View</a></td></tr>
<tr><td></td><td>9.5&nbsp;</td><td class="te" colspan="3"><a href="Doc05_UsingCheckouts.html#Doc_CheckoutShowInHistory" title="Chapter in CDO Model Repository Documentation">Showing Checkouts in the History View</a></td></tr>
<tr><td></td><td>9.6&nbsp;</td><td class="te" colspan="3"><a href="Doc05_UsingCheckouts.html#Doc_CheckoutShowInSystemExplorer" title="Chapter in CDO Model Repository Documentation">Showing Checkouts in the System Explorer</a></td></tr>
<tr><td>10&nbsp;</td><td class="te" colspan="4"><a href="Doc05_UsingCheckouts.html#Doc_UsingOfflineCheckouts" title="Chapter in CDO Model Repository Documentation">Working with Offline Checkouts</a></td></tr>
<tr><td></td><td>10.1&nbsp;</td><td class="te" colspan="3"><a href="Doc05_UsingCheckouts.html#Doc_OfflineUpdate" title="Chapter in CDO Model Repository Documentation">Updating an Offline Checkout</a></td></tr>
<tr><td></td><td>10.2&nbsp;</td><td class="te" colspan="3"><a href="Doc05_UsingCheckouts.html#Doc_OfflineCheckin" title="Chapter in CDO Model Repository Documentation">Checking In an Offline Checkout</a></td></tr>
<tr><td></td><td>10.3&nbsp;</td><td class="te" colspan="3"><a href="Doc05_UsingCheckouts.html#Doc_OfflineRevert" title="Chapter in CDO Model Repository Documentation">Reverting an Offline Checkout</a></td></tr>
</table>
</p>
<h2><a name="Doc_RenamingCheckouts"></a>1&nbsp;&nbsp;Renaming Checkouts</h2>
<p>
CDO supports renaming an existing checkout, i.e., changing its label, at any time. A checkout can be renamed by selecting it
and pressing the F2 key or selecting the Rename action in the context menu. The following dialog will pop up:
<p align="center"><img src="checkout-rename.png">
<p>
The dialog can only be finished with the OK button if the checkout label is either unchanged or changed to a not existing label.
<h2><a name="Doc_DuplicatingCheckouts"></a>2&nbsp;&nbsp;Duplicating Checkouts</h2>
<p>
Sometimes it is useful to have two or more checkouts from the same repository in the Project Explorer.
A checkout can be duplicated by selecting it, opening the context menu, and selecting the Duplicate Checkout action.
The result is an identical checkout with a unique default label: <p align="center"><img src="checkout-duplicate.png">
<h2><a name="Doc_OpeningClosing"></a>3&nbsp;&nbsp;Opening and Closing Checkouts</h2>
<p>
To work with a configured checkout the checkout must be in <i>opened</i> state. Directly after creation a checkout is
open. Directly after the startup of Eclipse all checkouts are in <i>closed</i> state.
<p>
If a checkout is closed it can be opened by double-clicking it or by selecting Open Checkout in its context menu.
<p>
If a checkout is open it can be closed by selecting Close Checkout in its context menu.
<h2><a name="Doc_DeletingCheckouts"></a>4&nbsp;&nbsp;Deleting Checkouts</h2>
<p>
An existing checkout can be deleted by selecting that checkout and pressing the Del key or selecting
the Delete action in the context menu. Several checkouts can be deleted at once.
The following dialog will pop up: <p align="center"><img src="checkout-delete.png">
<p>
Deleting a checkout does not delete the associated repository or any data in it.
If the "Delete checkout contents on disk" checkbox is selected (i.e., checked) the locally replicated data of
the possibly selected offline checkouts is deleted permanently!
<h2><a name="Doc_SwitchingBranch"></a>5&nbsp;&nbsp;Switching the Branch of a Checkout</h2>
<p>
Online transactional checkouts from repositories that are configured with the versioning mode <b>branching</b> can be switched
to other <a href="../../javadoc/org/eclipse/emf/cdo/common/branch/CDOBranch.html" title="Interface in org.eclipse.emf.cdo.common.branch"><code>branches</code></a> by selecting the checkout, opening the context menu and selecting the Switch To sub menu:
<p align="center"><img src="switch-to-branch.png">
<p>
See <a href="../operators/Doc01_ConfiguringRepositories.html#Property_supportingBranches" title="Chapter in CDO Model Repository Documentation">Property supportingBranches</a> for instructions on how to enable branching for
remote repositories, <a href="Doc02_ManagingRepositories.html#Doc_LocalRepositories" title="Chapter in CDO Model Repository Documentation">Creating Local Repositories</a> for instructions on how to enable branching for local repositories.
<p>
The Switch To sub menu consists of the following action groups:
<ul>
<li> The New Branch action is explained in <a href="Doc05_UsingCheckouts.html#Doc_SwitchNewBranch" title="Chapter in CDO Model Repository Documentation">Switching to a New Branch</a>.
<li> A history list of actions that switch to branches that were previously used in the selected checkout.
<li> The Other Branch action is explained in <a href="Doc05_UsingCheckouts.html#Doc_SwitchOtherBranch" title="Chapter in CDO Model Repository Documentation">Switching to an Other Branch</a>.
<li> A list of actions that switch to the branches of other transactional checkouts from the same repository as the selected checkout.
</ul>
<p>
Switching the branch of a checkout is also possible by dragging elements and dropping them onto the target checkout without
holding any modifier keys pressed. The following elements can be dropped onto the target:
<ul>
<li> Branches of the same repository as the target checkout
<li> The repository of the target checkout (inducing its main branch)
<li> Online transactional checkouts from the same repository as the selected checkout (inducing their branches)
</ul>
<p>
When a checkout is switched to a different branch the nested resource nodes and model elements, as well as all the contents
of all open resource editors are changed instantly to reflect the state of the new branch.<p><b>See Also:</b></p>
<ul>
<li><a href="Doc01_UserInterface.html#Doc_RepositoriesView" title="Chapter in CDO Model Repository Documentation">CDO Repositories View</a></li>
</ul>
<h3><a name="Doc_SwitchNewBranch"></a>5.1&nbsp;&nbsp;Switching to a New Branch</h3>
<p>
Online transactional checkouts can be switched to a newly created branch with the Switch To -> New Branch context menu action.
The New Branch dialog will pop up: <p align="center"><img src="branch-create.png">
<p>
See <a href="Doc03_UsingBranches.html#Doc_CreatingBranches" title="Chapter in CDO Model Repository Documentation">Creating Branches</a> for an explanation on how to use the New Branch dialog.
<h3><a name="Doc_SwitchOtherBranch"></a>5.2&nbsp;&nbsp;Switching to an Other Branch</h3>
<p>
Online transactional checkouts can be switched to any other branch with the Switch To -> Other Branch context menu action.
The Select Branch Point dialog (without a time stamp area) will pop up: <p align="center"><img src="branch-select.png">
.
<h2><a name="Doc_SwitchingBranchPoint"></a>6&nbsp;&nbsp;Switching the Time Stamp of a Checkout</h2>
<p>
Online historical checkouts from repositories that are configured with the versioning modes <b>auditing</b> or <b>branching</b> can be switched
to other <a href="../../javadoc/org/eclipse/emf/cdo/common/branch/CDOBranchPoint.html" title="Interface in org.eclipse.emf.cdo.common.branch"><code>branch points</code></a> by selecting the checkout, opening the context menu and selecting the Switch To sub menu:
<p align="center"><img src="switch-to-branchpoint.png">
<p>
See <a href="../operators/Doc01_ConfiguringRepositories.html#Property_supportingAudits" title="Chapter in CDO Model Repository Documentation">Property supportingAudits</a> for instructions on how to enable auditing remote repositories,
<a href="../operators/Doc01_ConfiguringRepositories.html#Property_supportingBranches" title="Chapter in CDO Model Repository Documentation">Property supportingBranches</a>for instructions on how to enable branching for remote repositories,
or <a href="Doc02_ManagingRepositories.html#Doc_LocalRepositories" title="Chapter in CDO Model Repository Documentation">Creating Local Repositories</a> for instructions on how to enable auditing or branching for local repositories.
<p>
The Switch To sub menu consists of the following action groups:
<ul>
<li> A history list of actions that switch to branch points that were previously used in the selected checkout.
<li> The Other Branch Point action is explained in <a href="Doc05_UsingCheckouts.html#Doc_SwitchOtherBranchPoint" title="Chapter in CDO Model Repository Documentation">Switching to an Other Branch Point</a>.
<li> The Commit action is explained in <a href="Doc05_UsingCheckouts.html#Doc_SwitchCommit" title="Chapter in CDO Model Repository Documentation">Switching to a Commit</a>.
<li> A list of actions that switch to the branch points of other historical checkouts from the same repository as the selected checkout.
</ul>
<p>
Switching the branch point of a checkout is also possible by dragging elements and dropping them onto the target checkout without
holding any modifier keys pressed. The following elements can be dropped on to the target:
<ul>
<li> Branches of the same repository as the target checkout (inducing their <a href="../../javadoc/org/eclipse/emf/cdo/common/branch/CDOBranch.html#getHead()" title="Method in org.eclipse.emf.cdo.common.branch.CDOBranch"><code>heads</code></a>
<li> The repository of the target checkout (inducing the head of its main branch)
<li> Online historical checkouts from the same repository as the selected checkout (inducing their branch points)
<li> Commits, for example from the <a href="Doc01_UserInterface.html#Doc_HistoryIntegration" title="Chapter in CDO Model Repository Documentation">History view</a>
</ul>
<p>
Switching the branch point of a checkout is also possible by using the <a href="Doc01_UserInterface.html#Doc_TimeMachineView" title="Chapter in CDO Model Repository Documentation">CDO Time Machine View</a>.
<p>
When a checkout is switched to a different branch point the nested resource nodes and model elements, as well as all the contents
of all open resource editors are changed instantly to reflect the state of the new branch point.<p><b>See Also:</b></p>
<ul>
<li><a href="Doc01_UserInterface.html#Doc_RepositoriesView" title="Chapter in CDO Model Repository Documentation">CDO Repositories View</a></li>
<li><a href="Doc01_UserInterface.html#Doc_TimeMachineView" title="Chapter in CDO Model Repository Documentation">CDO Time Machine View</a></li>
<li><a href="Doc01_UserInterface.html#Doc_HistoryIntegration" title="Chapter in CDO Model Repository Documentation">History Integration</a></li>
</ul>
<h3><a name="Doc_SwitchOtherBranchPoint"></a>6.1&nbsp;&nbsp;Switching to an Other Branch Point</h3>
<p>
Online historical checkouts can be switched to any other branch point with the Switch To -> Other Branch Point context menu action.
The Select Branch Point dialog (with a time stamp area) will pop up: <p align="center"><img src="branchpoint-select.png">
.
<h3><a name="Doc_SwitchCommit"></a>6.2&nbsp;&nbsp;Switching to a Commit</h3>
<p>
Online historical checkouts can be switched to a commit with the Switch To -> Commit context menu action.
The Select Commit dialog will pop up: <p align="center"><img src="commit-select.png">
.
<h2><a name="Doc_ComparingCheckouts"></a>7&nbsp;&nbsp;Comparing Checkouts</h2>
<p>
All types of checkouts can be compared with other <a href="../../javadoc/org/eclipse/emf/cdo/common/branch/CDOBranchPoint.html#getTimeStamp()" title="Method in org.eclipse.emf.cdo.common.branch.CDOBranchPoint"><code>time stamps</code></a> or
other <a href="../../javadoc/org/eclipse/emf/cdo/common/branch/CDOBranchPoint.html#getBranch()" title="Method in org.eclipse.emf.cdo.common.branch.CDOBranchPoint"><code>branches</code></a> from the same repository
by selecting the checkout, opening the context menu and selecting the Compare With sub menu:
<p align="center"><img src="compare-with.png">
<p>
The Compare With sub menu consists of the following action groups:
<ul>
<li> A history list of actions that compare with branch points that were previously used in the selected checkout.
<li> The Other Branch action is explained in <a href="Doc05_UsingCheckouts.html#Doc_CompareOtherBranch" title="Chapter in CDO Model Repository Documentation">Comparing with an Other Branch</a>.
<li> The Other Branch Point action is explained in <a href="Doc05_UsingCheckouts.html#Doc_CompareOtherBranchPoint" title="Chapter in CDO Model Repository Documentation">Comparing with an Other Branch Point</a>.
<li> The Commit action is explained in <a href="Doc05_UsingCheckouts.html#Doc_CompareCommit" title="Chapter in CDO Model Repository Documentation">Comparing with a Commit</a>.
<li> A list of actions that compare with the branch points of other checkouts from the same repository as the selected checkout.
</ul>
<p>
Comparing a checkout is also possible by dragging elements and dropping them onto the target checkout with
the Shift and Ctrl keys pressed. The following elements can be dropped onto the target:
<ul>
<li> Branches of the same repository as the target checkout (inducing their <a href="../../javadoc/org/eclipse/emf/cdo/common/branch/CDOBranch.html#getHead()" title="Method in org.eclipse.emf.cdo.common.branch.CDOBranch"><code>heads</code></a>
<li> The repository of the target checkout (inducing the head of its main branch)
<li> Checkouts from the same repository as the selected checkout (inducing their branch points)
<li> Commits, for example from the <a href="Doc01_UserInterface.html#Doc_HistoryIntegration" title="Chapter in CDO Model Repository Documentation">History view</a>
</ul>
<p>
When a checkout is compared with a different branch point an EMF Compare editor is opened with the left side
showing the selected compare source (e.g., the drag source) and the right side showing the selected compare target
(e.g., the drop target): <p align="center"><img src="compare.png">
<p><b>See Also:</b></p>
<ul>
<li><a href="Doc01_UserInterface.html#Doc_RepositoriesView" title="Chapter in CDO Model Repository Documentation">CDO Repositories View</a></li>
<li><a href="Doc01_UserInterface.html#Doc_HistoryIntegration" title="Chapter in CDO Model Repository Documentation">History Integration</a></li>
<li><a href="Doc01_UserInterface.html#Doc_CompareIntegration" title="Chapter in CDO Model Repository Documentation">Compare Integration</a></li>
<li><a href="http://www.eclipse.org/emf/compare/documentation/latest/user/user-guide.html" title="Article in CDO Model Repository Documentation">EMF Compare Guide</a></li>
</ul>
<h3><a name="Doc_CompareOtherBranch"></a>7.1&nbsp;&nbsp;Comparing with an Other Branch</h3>
<p>
Checkouts can be compared with any other branch with the Compare With -> Other Branch context menu action.
The Select Branch Point dialog (without a time stamp area) will pop up: <p align="center"><img src="branch-select.png">
.
<h3><a name="Doc_CompareOtherBranchPoint"></a>7.2&nbsp;&nbsp;Comparing with an Other Branch Point</h3>
<p>
Checkouts can be compared with any other branch point with the Compare With -> Other Branch Point context menu action.
The Select Branch Point dialog (with a time stamp area) will pop up: <p align="center"><img src="branchpoint-select.png">
.
<h3><a name="Doc_CompareCommit"></a>7.3&nbsp;&nbsp;Comparing with a Commit</h3>
<p>
Checkouts can be compared with a commit with the Compare With -> Commit context menu action.
The Select Commit dialog will pop up: <p align="center"><img src="commit-select.png">
.
<h2><a name="Doc_MergingCheckouts"></a>8&nbsp;&nbsp;Merging Checkouts</h2>
<p>
Offline and online transactional checkouts can be merged from other <a href="../../javadoc/org/eclipse/emf/cdo/common/branch/CDOBranchPoint.html#getTimeStamp()" title="Method in org.eclipse.emf.cdo.common.branch.CDOBranchPoint"><code>time stamps</code></a> or
other <a href="../../javadoc/org/eclipse/emf/cdo/common/branch/CDOBranchPoint.html#getBranch()" title="Method in org.eclipse.emf.cdo.common.branch.CDOBranchPoint"><code>branches</code></a> from the same repository
by selecting the checkout, opening the context menu and selecting the Merge From sub menu:
<p align="center"><img src="merge-from.png">
<p>
The Merge From sub menu consists of the following action groups:
<ul>
<li> A history list of actions that merge from branch points that were previously used in the selected checkout.
<li> The Other Branch action is explained in <a href="Doc05_UsingCheckouts.html#Doc_MergeOtherBranch" title="Chapter in CDO Model Repository Documentation">Merging from an Other Branch</a>.
<li> The Other Branch Point action is explained in <a href="Doc05_UsingCheckouts.html#Doc_MergeOtherBranchPoint" title="Chapter in CDO Model Repository Documentation">Merging from an Other Branch Point</a>.
<li> The Commit action is explained in <a href="Doc05_UsingCheckouts.html#Doc_MergeCommit" title="Chapter in CDO Model Repository Documentation">Merging from a Commit</a>.
<li> A list of actions that merge from the branch points of other checkouts from the same repository as the selected checkout.
</ul>
<p>
Merging a checkout is also possible by dragging elements and dropping them onto the target checkout with
the Shift and Ctrl keys pressed. The following elements can be dropped onto the target:
<ul>
<li> Branches of the same repository as the target checkout (inducing their <a href="../../javadoc/org/eclipse/emf/cdo/common/branch/CDOBranch.html#getHead()" title="Method in org.eclipse.emf.cdo.common.branch.CDOBranch"><code>heads</code></a>
<li> The repository of the target checkout (inducing the head of its main branch)
<li> Checkouts from the same repository as the selected checkout (inducing their branch points)
<li> Commits, for example from the <a href="Doc01_UserInterface.html#Doc_HistoryIntegration" title="Chapter in CDO Model Repository Documentation">History view</a>
</ul>
<p>
When a checkout is merged from a different branch point an EMF Merge editor is opened with the left side
showing the selected merge source (e.g., the drag source) and the right side showing the selected merge target
(e.g., the drop target): <p align="center"><img src="merge.png">
<p><b>See Also:</b></p>
<ul>
<li><a href="Doc01_UserInterface.html#Doc_RepositoriesView" title="Chapter in CDO Model Repository Documentation">CDO Repositories View</a></li>
<li><a href="Doc01_UserInterface.html#Doc_HistoryIntegration" title="Chapter in CDO Model Repository Documentation">History Integration</a></li>
<li><a href="Doc01_UserInterface.html#Doc_CompareIntegration" title="Chapter in CDO Model Repository Documentation">Compare Integration</a></li>
<li><a href="http://www.eclipse.org/emf/compare/documentation/latest/user/user-guide.html" title="Article in CDO Model Repository Documentation">EMF Compare Guide</a></li>
</ul>
<h3><a name="Doc_MergeOtherBranch"></a>8.1&nbsp;&nbsp;Merging from an Other Branch</h3>
<p>
Checkouts can be merged from any other branch with the Merge From -> Other Branch context menu action.
The Select Branch Point dialog (without a time stamp area) will pop up: <p align="center"><img src="branch-select.png">
.
<h3><a name="Doc_MergeOtherBranchPoint"></a>8.2&nbsp;&nbsp;Merging from an Other Branch Point</h3>
<p>
Checkouts can be merged from any other branch point with the Merge From -> Other Branch Point context menu action.
The Select Branch Point dialog (with a time stamp area) will pop up: <p align="center"><img src="branchpoint-select.png">
.
<h3><a name="Doc_MergeCommit"></a>8.3&nbsp;&nbsp;Merging from a Commit</h3>
<p>
Checkouts can be merged from a commit with the Merge From -> Commit context menu action.
The Select Commit dialog will pop up: <p align="center"><img src="commit-select.png">
.
<h2><a name="Doc_CheckoutShowIn"></a>9&nbsp;&nbsp;Showing Checkouts in Other Views</h2>
<p>
Checkouts can be shown in a number of other views depending on the type of the checkout
by selecting them, opening their context menu, opening the Show In sub menu, and selecting one of the Show In actions.
<p>
Online transactional checkouts can be shown in the following views: <p align="center"><img src="checkout-transactional-showin.png">
<p>
Online historical checkouts can be shown in the following views: <p align="center"><img src="checkout-historical-showin.png">
<p>
Offline checkouts can be shown in the following views: <p align="center"><img src="checkout-offline-showin.png">
<h3><a name="Doc_CheckoutShowInSessions"></a>9.1&nbsp;&nbsp;Showing Checkouts in the CDO Sessions View</h3>
<p>
Online checkouts can be shown in the <a href="Doc01_UserInterface.html#Doc_SessionsView" title="Chapter in CDO Model Repository Documentation">CDO Sessions view</a>: <p align="center"><img src="sessions-view.png">
<p>
A new <a href="../../javadoc/org/eclipse/emf/cdo/session/CDOSession.html" title="Interface in org.eclipse.emf.cdo.session"><code>session</code></a> with the same target repository as the selected checkout is opened in the CDO Sessions view.
A new <a href="../../javadoc/org/eclipse/emf/cdo/transaction/CDOTransaction.html" title="Interface in org.eclipse.emf.cdo.transaction"><code>transaction</code></a> is opened on that session, pointing at the same branch point as the selected checkout.
<h3><a name="Doc_CheckoutShowInTimeMachine"></a>9.2&nbsp;&nbsp;Showing Checkouts in the CDO Time Machine View</h3>
<p>
Online histrical checkouts can be shown in the <a href="Doc01_UserInterface.html#Doc_TimeMachineView" title="Chapter in CDO Model Repository Documentation">CDO Time Machine view</a>: <p align="center"><img src="timemachine-view.png">
<h3><a name="Doc_CheckoutShowInServerBrowser"></a>9.3&nbsp;&nbsp;Showing Checkouts in the CDO Server Browser</h3>
<p>
Offline checkouts can be shown in the CDO Server Browser: <p align="center"><img src="server-browser.png">
<p>
The CDO Server Browser allows to introspect the internal data of the locally replicated repository
in a web browser. It is only meant to be used for test and debug purposes.
It is <b>not</b> meant to be a production tool that would scale to arbitrary repository sizes!
<h3><a name="Doc_CheckoutShowInProperties"></a>9.4&nbsp;&nbsp;Showing Checkouts in the Properties View</h3>
<p>
All checkouts can be shown in the <a href="Doc01_UserInterface.html#Doc_PropertySheetIntegration" title="Chapter in CDO Model Repository Documentation">Properties view</a>: <p align="center"><img src="property-sheet.png">
<h3><a name="Doc_CheckoutShowInHistory"></a>9.5&nbsp;&nbsp;Showing Checkouts in the History View</h3>
<p>
All checkouts can be shown in the <a href="Doc01_UserInterface.html#Doc_HistoryIntegration" title="Chapter in CDO Model Repository Documentation">History view</a>: <p align="center"><img src="history.png">
<p>
This is particularly useful if the "Link with Editor and Selection" button in the toolbar of the History view
is not enabled and the history page does not automatically adjust to the workbench selection.
<h3><a name="Doc_CheckoutShowInSystemExplorer"></a>9.6&nbsp;&nbsp;Showing Checkouts in the System Explorer</h3>
<p>
All checkouts can be shown in the System Explorer: <p align="center"><img src="system-explorer-checkout.png">
<p>
Each checkout owns a dedicated directory under .metadata of the current workspace. This directory contains
the checkout.properties file that contains the configuration of the checkout. Offline checkouts also store the database
of the locally replicated repository and baseline data of dirty model elements in this directory.
<h2><a name="Doc_UsingOfflineCheckouts"></a>10&nbsp;&nbsp;Working with Offline Checkouts</h2>
<p>
<b>Online</b> checkouts operate directly on the data stored in their repository and therefore require an active network
connection; i.e., the repository must be in <a href="Doc02_ManagingRepositories.html#Doc_ConnectingDisconnecting" title="Chapter in CDO Model Repository Documentation">connected state</a>.
They are ideally suited to support real-time collaboration on models, but they can only be open when the underlying repository
is reachable, which is not necessarily always the case for remote repositories.
<p>
<b>Offline</b> checkouts, in contrast, operate on locally replicated data of their repository and therefore do not require an active network
connection; i.e., the repository can be in <a href="Doc02_ManagingRepositories.html#Doc_ConnectingDisconnecting" title="Chapter in CDO Model Repository Documentation">disconnected state</a>.
They are ideally suited to support offline work on models even during periods when the underlying repository is not reachable.
Collaboration on the contained models is restricted to explicit synchronization times, i.e., when <a href="Doc05_UsingCheckouts.html#Doc_OfflineUpdate" title="Chapter in CDO Model Repository Documentation">updating</a>
the checkout from remote or <a href="Doc05_UsingCheckouts.html#Doc_OfflineCheckin" title="Chapter in CDO Model Repository Documentation">checking it in</a> to remote.
<p>
Offline checkouts, as well as all their models and model elements are decorated with their local editing state,
i.e., <b>clean</b>, <b>dirty</b>, or <b>new</b>.
<p>
Apart from these subtle differences offline checkouts are designed to behave in a very similar way as online checkouts.
In addition a few special operations are available for them, which are explained in the following nested sections.<p><b>See Also:</b></p>
<ul>
<li><a href="Doc04_CheckingOut.html#Doc_OfflineCheckouts" title="Chapter in CDO Model Repository Documentation">Offline Checkouts</a></li>
</ul>
<h3><a name="Doc_OfflineUpdate"></a>10.1&nbsp;&nbsp;Updating an Offline Checkout</h3>
<p>
Because the models and model elements in an offline checkout are not updated in real-time they need to be updated manually
at appropriate times, e.g., before attempting to <a href="Doc05_UsingCheckouts.html#Doc_OfflineCheckin" title="Chapter in CDO Model Repository Documentation">check it in</a> to a remotely modified repository.
<p>
To update an offline checkout from remote the checkout is selected and the Update action chosen from its context menu.
The update process tries to merge all trivial conflicts they may arise. Trivial conflicts are:
<ul>
<li> Changes to multi-valued <a href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/ecore/EStructuralFeature.html" target="_blank" title="Interface in org.eclipse.emf.ecore"><code>features</code></a> on both sides of the same model element.
<li> Changes to different single-valued <a href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/ecore/EStructuralFeature.html" target="_blank" title="Interface in org.eclipse.emf.ecore"><code>features</code></a> on both sides of the same model element.
</ul>
<p>
If non-trivial changes are detected, i.e., changes to the same single-valued <a href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.9.0/org/eclipse/emf/ecore/EStructuralFeature.html" target="_blank" title="Interface in org.eclipse.emf.ecore"><code>feature</code></a> on both sides of the
same model element, an EMF Merge editor is opened: <p align="center"><img src="merge.png">
<p>
The left side of the merge editor shows the remote repository and the right side shows the selected offline checkout.
Saving the merge editor applies the needed changes to the local model elements and closed the merge editor. The update/merge
process can be canceled by closing the merge editor without saving it.
<p>
Updating an offline checkout is a <b>remote operation</b>.<p><b>See Also:</b></p>
<ul>
<li><a href="Doc01_UserInterface.html#Doc_CompareIntegration" title="Chapter in CDO Model Repository Documentation">Compare Integration</a></li>
<li><a href="Doc09_TechnicalBackground.html#Doc_BackgroundCompare" title="Chapter in CDO Model Repository Documentation">Technical Background of the Compare Integration</a></li>
</ul>
<h3><a name="Doc_OfflineCheckin"></a>10.2&nbsp;&nbsp;Checking In an Offline Checkout</h3>
<p>
After having worked with the models and model elements in an offline checkout for a while it may seem appropriate
to check in the changes that accumulated during this period back into the remote repository.
<p>
To update an offline checkout from remote the checkout is selected and the Checkin action chosen from its context menu.
<p>
Checking in does not strictly
require the local offline checkout to be up-to-date as long as the local changes and the remote changes are not conflicting
(i.e., neither trivial nor non-trivial conflicts exist). If conflicts are detected during the check-in process the following
dialog pops up, asking to <a href="Doc05_UsingCheckouts.html#Doc_OfflineUpdate" title="Chapter in CDO Model Repository Documentation">update</a> the checkout first: <p align="center"><img src="checkin-error.png">
<p>
Checking in an offline checkout is a <b>remote operation</b>.
<h3><a name="Doc_OfflineRevert"></a>10.3&nbsp;&nbsp;Reverting an Offline Checkout</h3>
<p>
Sometimes it may seem useful to discard all local editing state of the models and model elements in an offline checkout,
effectively reverting the checkout to the most recently <a href="Doc05_UsingCheckouts.html#Doc_OfflineUpdate" title="Chapter in CDO Model Repository Documentation">updated</a> state.
<p>
To revert an offline checkout the checkout is selected and the Revert action chosen from its context menu.
The following confirmation dialog will pop up: <p align="center"><img src="revert.png">
<p>
Reverting an offline checkout is a <b>local operation</b>.
<p align="right">
<a href="Doc04_CheckingOut.html" title="Backward to Checking Out from Repositories"><img src="../../images/backward.png" border="0"></a>&nbsp;<a href="Doc06_UsingResources.html" title="Forward to Working with Folders and Resources"><img src="../../images/forward.png" border="0"></a></p>
<!-- <div class="help_breadcrumbs breadcrumbs_bottom"><a href="../Overview.html" title="CDO Model Repository Documentation">CDO Model Repository Documentation</a> > <a href="index.html" title="Category in CDO Model Repository Documentation">User's Guide</a></div> -->
<div class="copyright">Copyright (c) 2014 Eike Stepper (Berlin, Germany) and others.<br>All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html</div>
</body>
</html>