Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2016-10-05 01:33:22 -0400
committerEike Stepper2016-10-05 01:33:22 -0400
commit95d11d623b78209da114873fe169995fee7af59c (patch)
tree7f214e0b0a42ef63cd22cf83d167b30f3277ed98
parent023a17a1a415b2c6272ff1a81f54c0b6f7b4e51a (diff)
downloadcdo-95d11d623b78209da114873fe169995fee7af59c.tar.gz
cdo-95d11d623b78209da114873fe169995fee7af59c.tar.xz
cdo-95d11d623b78209da114873fe169995fee7af59c.zip
[504014] Make merge information available in CDOCommitInfo
https://bugs.eclipse.org/bugs/show_bug.cgi?id=504014
-rw-r--r--features/org.eclipse.emf.cdo.compare-feature/feature.xml2
-rw-r--r--features/org.eclipse.emf.cdo.server.db4o-feature/feature.xml2
-rw-r--r--features/org.eclipse.emf.cdo.server.lissome-feature/feature.xml2
-rw-r--r--features/org.eclipse.emf.cdo.server.mongodb-feature/feature.xml2
-rw-r--r--plugins/org.eclipse.emf.cdo.admin/src/org/eclipse/emf/cdo/internal/admin/CDOAdminClientRepositoryImpl.java8
-rw-r--r--plugins/org.eclipse.emf.cdo.common/.settings/.api_filters7
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/CDOCommonRepository.java17
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/commit/CDOCommitInfo.java15
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/commit/CDOCommitInfoManager.java17
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/protocol/CDOProtocolConstants.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/CDOCommitHistoryImpl.java431
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/CDOCommitInfoImpl.java41
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/CDOCommitInfoManagerImpl.java139
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/DelegatingCommitInfo.java16
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/FailureCommitInfo.java29
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/commit/InternalCDOCommitInfoManager.java12
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/protocol/CDODataInputImpl.java8
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/protocol/CDODataOutputImpl.java12
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.client/ExampleClient.launch6
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client/ExampleClient.launch6
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.master/config/cdo-server.xml1
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.master/config/cdo-server.xml1
-rw-r--r--plugins/org.eclipse.emf.cdo.explorer.ui/CDOExplorer.launch5
-rw-r--r--plugins/org.eclipse.emf.cdo.explorer.ui/META-INF/MANIFEST.MF24
-rw-r--r--plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/checkouts/CDOCheckoutContentProvider.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/CDONet4jSessionConfigurationImpl.java8
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/CDONet4jSessionImpl.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CommitTransactionRequest.java15
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/LoadCommitInfosRequest.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/ResetTransactionRequest.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.server.admin/META-INF/MANIFEST.MF18
-rw-r--r--plugins/org.eclipse.emf.cdo.server.admin/src/org/eclipse/emf/cdo/server/internal/admin/CDOAdminServerRepository.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/db/IDBStoreAccessor.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/CDODBSchema.java33
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/CommitInfoTable.java370
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStore.java89
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreAccessor.java175
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db4o/META-INF/MANIFEST.MF8
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db4o/src/org/eclipse/emf/cdo/server/internal/db4o/DB4OCommitInfo.java3
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db4o/src/org/eclipse/emf/cdo/server/internal/db4o/DB4OStoreAccessor.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/HibernateRawCommitContext.java9
-rw-r--r--plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/HibernateStoreAccessor.java23
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/META-INF/MANIFEST.MF14
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/file/Journal.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/optimizer/CommitTransactionTask.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.server.mongodb/META-INF/MANIFEST.MF8
-rw-r--r--plugins/org.eclipse.emf.cdo.server.mongodb/src/org/eclipse/emf/cdo/server/internal/mongodb/Commits.java3
-rw-r--r--plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CommitTransactionIndication.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/LoadCommitInfosIndication.java12
-rw-r--r--plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/OpenSessionIndication.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.server.objectivity/META-INF/MANIFEST.MF18
-rw-r--r--plugins/org.eclipse.emf.cdo.server.objectivity/src/org/eclipse/emf/cdo/server/internal/objectivity/ObjectivityStoreAccessor.java7
-rw-r--r--plugins/org.eclipse.emf.cdo.server.product/config/cdo-server.xml1
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java27
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/ServerCDOView.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/TransactionCommitContext.java23
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/embedded/EmbeddedClientSessionConfiguration.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/mem/MEMStore.java12
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/mem/MEMStoreAccessor.java22
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/syncing/SynchronizableRepository.java7
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/CDOServerExporter.java21
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/CDOServerImporter.java50
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IRepository.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IStoreAccessor.java47
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalCommitContext.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/StoreAccessor.java15
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/CommitInfoTest.java21
-rw-r--r--plugins/org.eclipse.emf.cdo.ui.compare/META-INF/MANIFEST.MF8
-rw-r--r--plugins/org.eclipse.emf.cdo.ui.compare/src/org/eclipse/emf/cdo/ui/compare/CDOCompareEditorUtil.java15
-rw-r--r--plugins/org.eclipse.emf.cdo.ui.team/META-INF/MANIFEST.MF6
-rw-r--r--plugins/org.eclipse.emf.cdo.ui.team/src/org/eclipse/emf/cdo/ui/internal/team/history/CDOHistoryPage.java273
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/CDOClient1.launch50
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/CDOClient2.launch2
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/META-INF/MANIFEST.MF36
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/Branch.java26
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/Commit.java146
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/Net.java178
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/NetRenderer.java224
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/Segment.java55
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/SegmentList.java24
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/Track.java24
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/widgets/CommitHistoryComposite.java148
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/transaction/CDOCommitContext.java6
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/transaction/CDOTransactionCommentator.java100
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/messages/messages.properties18
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOSessionImpl.java22
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/SessionProperties.java16
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOSingleTransactionStrategyImpl.java8
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java51
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOXACommitContextImpl.java6
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOObjectHistoryImpl.java33
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/CDOSessionProtocol.java11
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/InternalCDOTransaction.java10
-rw-r--r--plugins/org.eclipse.net4j.db/META-INF/MANIFEST.MF24
-rw-r--r--plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/spi/db/DBAdapter.java66
95 files changed, 2752 insertions, 751 deletions
diff --git a/features/org.eclipse.emf.cdo.compare-feature/feature.xml b/features/org.eclipse.emf.cdo.compare-feature/feature.xml
index 421953026a..e4b0293159 100644
--- a/features/org.eclipse.emf.cdo.compare-feature/feature.xml
+++ b/features/org.eclipse.emf.cdo.compare-feature/feature.xml
@@ -12,7 +12,7 @@
<feature
id="org.eclipse.emf.cdo.compare"
label="%featureName"
- version="4.4.0.qualifier"
+ version="4.4.100.qualifier"
provider-name="%providerName"
license-feature="org.eclipse.emf.cdo.license"
license-feature-version="0.0.0">
diff --git a/features/org.eclipse.emf.cdo.server.db4o-feature/feature.xml b/features/org.eclipse.emf.cdo.server.db4o-feature/feature.xml
index 3b45bbe1f3..22f23d5077 100644
--- a/features/org.eclipse.emf.cdo.server.db4o-feature/feature.xml
+++ b/features/org.eclipse.emf.cdo.server.db4o-feature/feature.xml
@@ -13,7 +13,7 @@
<feature
id="org.eclipse.emf.cdo.server.db4o"
label="%featureName"
- version="4.2.300.qualifier"
+ version="4.2.400.qualifier"
provider-name="%providerName"
license-feature="org.eclipse.emf.cdo.license"
license-feature-version="0.0.0">
diff --git a/features/org.eclipse.emf.cdo.server.lissome-feature/feature.xml b/features/org.eclipse.emf.cdo.server.lissome-feature/feature.xml
index e44d1bc556..161354d741 100644
--- a/features/org.eclipse.emf.cdo.server.lissome-feature/feature.xml
+++ b/features/org.eclipse.emf.cdo.server.lissome-feature/feature.xml
@@ -12,7 +12,7 @@
<feature
id="org.eclipse.emf.cdo.server.lissome"
label="%featureName"
- version="4.2.300.qualifier"
+ version="4.2.400.qualifier"
provider-name="%providerName"
image="eclipse_update_120.jpg"
license-feature="org.eclipse.emf.cdo.license"
diff --git a/features/org.eclipse.emf.cdo.server.mongodb-feature/feature.xml b/features/org.eclipse.emf.cdo.server.mongodb-feature/feature.xml
index 3baabd6f29..f6464963fb 100644
--- a/features/org.eclipse.emf.cdo.server.mongodb-feature/feature.xml
+++ b/features/org.eclipse.emf.cdo.server.mongodb-feature/feature.xml
@@ -12,7 +12,7 @@
<feature
id="org.eclipse.emf.cdo.server.mongodb"
label="%featureName"
- version="4.2.300.qualifier"
+ version="4.2.400.qualifier"
provider-name="%providerName"
license-feature="org.eclipse.emf.cdo.license"
license-feature-version="0.0.0">
diff --git a/plugins/org.eclipse.emf.cdo.admin/src/org/eclipse/emf/cdo/internal/admin/CDOAdminClientRepositoryImpl.java b/plugins/org.eclipse.emf.cdo.admin/src/org/eclipse/emf/cdo/internal/admin/CDOAdminClientRepositoryImpl.java
index 468665d60d..d8d303b7c1 100644
--- a/plugins/org.eclipse.emf.cdo.admin/src/org/eclipse/emf/cdo/internal/admin/CDOAdminClientRepositoryImpl.java
+++ b/plugins/org.eclipse.emf.cdo.admin/src/org/eclipse/emf/cdo/internal/admin/CDOAdminClientRepositoryImpl.java
@@ -72,6 +72,8 @@ public class CDOAdminClientRepositoryImpl extends Notifier implements CDOAdminCl
private IDGenerationLocation idGenerationLocation;
+ private CommitInfoStorage commitInfoStorage;
+
public CDOAdminClientRepositoryImpl(CDOAdminClientImpl admin, ExtendedDataInputStream in) throws IOException
{
this.admin = admin;
@@ -106,6 +108,7 @@ public class CDOAdminClientRepositoryImpl extends Notifier implements CDOAdminCl
serializingCommits = in.readBoolean();
ensuringReferentialIntegrity = in.readBoolean();
idGenerationLocation = in.readEnum(IDGenerationLocation.class);
+ commitInfoStorage = in.readEnum(CommitInfoStorage.class);
}
public CDOAdminClient getAdmin()
@@ -194,6 +197,11 @@ public class CDOAdminClientRepositoryImpl extends Notifier implements CDOAdminCl
return idGenerationLocation;
}
+ public CommitInfoStorage getCommitInfoStorage()
+ {
+ return commitInfoStorage;
+ }
+
public boolean waitWhileInitial(IProgressMonitor monitor)
{
return CDOCommonUtil.waitWhileInitial(this, this, monitor);
diff --git a/plugins/org.eclipse.emf.cdo.common/.settings/.api_filters b/plugins/org.eclipse.emf.cdo.common/.settings/.api_filters
index 885b598dee..20cc2c39d0 100644
--- a/plugins/org.eclipse.emf.cdo.common/.settings/.api_filters
+++ b/plugins/org.eclipse.emf.cdo.common/.settings/.api_filters
@@ -184,6 +184,13 @@
<message_argument value="26"/>
</message_arguments>
</filter>
+ <filter id="388194388">
+ <message_arguments>
+ <message_argument value="org.eclipse.emf.cdo.common.protocol.CDOProtocolConstants"/>
+ <message_argument value="PROTOCOL_VERSION"/>
+ <message_argument value="32"/>
+ </message_arguments>
+ </filter>
</resource>
<resource path="src/org/eclipse/emf/cdo/spi/common/id/AbstractCDOID.java" type="org.eclipse.emf.cdo.spi.common.id.AbstractCDOID">
<filter id="337682486">
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/CDOCommonRepository.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/CDOCommonRepository.java
index a55c5a6a66..d95b3c95f7 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/CDOCommonRepository.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/CDOCommonRepository.java
@@ -83,6 +83,11 @@ public interface CDOCommonRepository extends CDOTimeProvider, IAdaptable
public IDGenerationLocation getIDGenerationLocation();
/**
+ * @since 4.6
+ */
+ public CommitInfoStorage getCommitInfoStorage();
+
+ /**
* Returns the ID of the root resource of this repository.
*/
public CDOID getRootResourceID();
@@ -151,6 +156,18 @@ public interface CDOCommonRepository extends CDOTimeProvider, IAdaptable
}
/**
+ * Enumerates the possible {@link CDOCommonRepository#getIDGenerationLocation() ID generation locations} of a CDO
+ * repository.
+ *
+ * @author Eike Stepper
+ * @since 4.6
+ */
+ public enum CommitInfoStorage
+ {
+ NO, YES, WITH_MERGE_SOURCE
+ }
+
+ /**
* Enumerates the possible {@link CDOCommonRepository#getType() types} of a CDO repository.
*
* @author Eike Stepper
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/commit/CDOCommitInfo.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/commit/CDOCommitInfo.java
index a3cfb5678e..553270a868 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/commit/CDOCommitInfo.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/commit/CDOCommitInfo.java
@@ -32,11 +32,26 @@ public interface CDOCommitInfo extends CDOBranchPoint, CDOCommitData
*/
public long getPreviousTimeStamp();
+ /**
+ * @since 4.6
+ */
+ public CDOCommitInfo getPreviousCommitInfo();
+
public String getUserID();
public String getComment();
/**
+ * @since 4.6
+ */
+ public CDOBranchPoint getMergeSource();
+
+ /**
+ * @since 4.6
+ */
+ public CDOCommitInfo getMergedCommitInfo();
+
+ /**
* Returns <code>true</code> if this commit info describes the first initializing commit in the {@link CDOCommonRepository repository}, <code>false</code> otherwise.
*
* @since 4.2
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/commit/CDOCommitInfoManager.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/commit/CDOCommitInfoManager.java
index e0ba01cf46..db0d2d8644 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/commit/CDOCommitInfoManager.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/commit/CDOCommitInfoManager.java
@@ -14,7 +14,7 @@ import org.eclipse.emf.cdo.common.CDOCommonRepository;
import org.eclipse.emf.cdo.common.branch.CDOBranch;
/**
- * Loads, provides and possible manages {@link CDOCommitInfo commit info} objects.
+ * Provides access to {@link CDOCommitInfo commit info} objects.
*
* @author Andre Dietisheim
* @since 3.0
@@ -37,6 +37,11 @@ public interface CDOCommitInfoManager
public CDOCommitInfo getCommitInfo(long timeStamp);
/**
+ * @since 4.6
+ */
+ public CDOCommitInfo getCommitInfo(long timeStamp, boolean loadOnDemand);
+
+ /**
* @since 4.2
*/
public CDOCommitInfo getCommitInfo(CDOBranch branch, long startTime, boolean up);
@@ -63,4 +68,14 @@ public interface CDOCommitInfoManager
* @since 4.2
*/
public CDOCommitInfo getLastOfBranch(CDOBranch branch);
+
+ /**
+ * @since 4.6
+ */
+ public long getLastCommitOfBranch(CDOBranch branch, boolean loadOnDemand);
+
+ /**
+ * @since 4.6
+ */
+ public long getLastCommit();
}
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/protocol/CDOProtocolConstants.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/protocol/CDOProtocolConstants.java
index 12220ae6d6..90cb23c5e3 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/protocol/CDOProtocolConstants.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/protocol/CDOProtocolConstants.java
@@ -30,8 +30,9 @@ public interface CDOProtocolConstants
* @since 4.2
* @noreference This field is not intended to be referenced by clients.
*/
- public static final int PROTOCOL_VERSION = 32; // ROLLBACK_REASON_UNIT_INTEGRITY
+ public static final int PROTOCOL_VERSION = 33; // CDOCommitInfo.getMergeSource()
+ // public static final int PROTOCOL_VERSION = 32; // ROLLBACK_REASON_UNIT_INTEGRITY
// public static final int PROTOCOL_VERSION = 31; // CDOCommonRepository.isSupportingUnits()
// public static final int PROTOCOL_VERSION = 30; // UnitOpcode
// public static final int PROTOCOL_VERSION = 29; // SIGNAL_UNIT
@@ -45,7 +46,7 @@ public interface CDOProtocolConstants
// PointerCDORevision
// public static final int PROTOCOL_VERSION = 21; // Update how CDOChangeSetData's detachedObject is encoded, see
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=449171
- // public static final int PROTOCOL_VERSION = 20; // Have OMMOnitor optional in
+ // public static final int PROTOCOL_VERSION = 20; // Have OMMonitor optional in
// RequestWithMonitoring/IndicationWithMonitoring
// public static final int PROTOCOL_VERSION = 19; // Branch renaming
// public static final int PROTOCOL_VERSION = 18; // Password change protocol
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/CDOCommitHistoryImpl.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/CDOCommitHistoryImpl.java
index 5ed830455f..1bcec1006e 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/CDOCommitHistoryImpl.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/CDOCommitHistoryImpl.java
@@ -29,6 +29,8 @@ import org.eclipse.net4j.util.container.Container;
import org.eclipse.net4j.util.event.FinishedEvent;
import org.eclipse.net4j.util.event.IListener;
+import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
import java.util.ListIterator;
import java.util.Map;
@@ -37,28 +39,30 @@ import java.util.Map;
* @author Eike Stepper
* @since 4.2
*/
-public class CDOCommitHistoryImpl extends Container<CDOCommitInfo>implements CDOCommitHistory
+public class CDOCommitHistoryImpl extends Container<CDOCommitInfo> implements CDOCommitHistory
{
+ private static final CDOCommitInfo[] NO_ELEMENTS = {};
+
private final TriggerLoadElement triggerLoadElement = new TriggerLoadElementImpl();
private final CDOCommitInfoManager manager;
private final CDOBranch branch;
- private int loadCount = DEFAULT_LOAD_COUNT;
-
- private GrowingRandomAccessList<CDOCommitInfo> commitInfos = new GrowingRandomAccessList<CDOCommitInfo>(
+ private final GrowingRandomAccessList<CDOCommitInfo> commitInfos = new GrowingRandomAccessList<CDOCommitInfo>(
CDOCommitInfo.class, DEFAULT_LOAD_COUNT);
+ private final Object loadLock = new Object();
+
+ private int loadCount = DEFAULT_LOAD_COUNT;
+
private CDOCommitInfo[] elements;
private boolean appendingTriggerLoadElement;
private boolean full;
- private Thread loaderThread;
-
- private Object loaderThreadLock = new Object();
+ private boolean loading;
public CDOCommitHistoryImpl(CDOCommitInfoManager manager, CDOBranch branch)
{
@@ -79,23 +83,32 @@ public class CDOCommitHistoryImpl extends Container<CDOCommitInfo>implements CDO
public final int getLoadCount()
{
- return loadCount;
+ synchronized (loadLock)
+ {
+ return loadCount;
+ }
}
- public void setLoadCount(int loadCount)
+ public final void setLoadCount(int loadCount)
{
- this.loadCount = loadCount;
+ synchronized (loadLock)
+ {
+ this.loadCount = loadCount;
+ }
}
- public boolean isAppendingTriggerLoadElement()
+ public final boolean isAppendingTriggerLoadElement()
{
- return appendingTriggerLoadElement;
+ synchronized (loadLock)
+ {
+ return appendingTriggerLoadElement;
+ }
}
- public void setAppendingTriggerLoadElement(boolean appendingTriggerLoadElement)
+ public final void setAppendingTriggerLoadElement(boolean appendingTriggerLoadElement)
{
int event = 0;
- synchronized (commitInfos)
+ synchronized (loadLock)
{
if (this.appendingTriggerLoadElement != appendingTriggerLoadElement)
{
@@ -128,11 +141,21 @@ public class CDOCommitHistoryImpl extends Container<CDOCommitInfo>implements CDO
}
}
- public CDOCommitInfo getFirstElement()
+ public final CDOCommitInfo getFirstElement()
{
checkActive();
- synchronized (commitInfos)
+ synchronized (loadLock)
{
+ if (loading)
+ {
+ if (elements == null)
+ {
+ return null;
+ }
+
+ return elements[0];
+ }
+
if (commitInfos.isEmpty())
{
return null;
@@ -142,11 +165,21 @@ public class CDOCommitHistoryImpl extends Container<CDOCommitInfo>implements CDO
}
}
- public CDOCommitInfo getLastElement()
+ public final CDOCommitInfo getLastElement()
{
checkActive();
- synchronized (commitInfos)
+ synchronized (loadLock)
{
+ if (loading)
+ {
+ if (elements == null)
+ {
+ return null;
+ }
+
+ return elements[elements.length - 1];
+ }
+
if (commitInfos.isEmpty())
{
return null;
@@ -156,24 +189,45 @@ public class CDOCommitHistoryImpl extends Container<CDOCommitInfo>implements CDO
}
}
- public CDOCommitInfo getElement(int index)
+ public final CDOCommitInfo getElement(int index)
{
checkActive();
- synchronized (commitInfos)
+ synchronized (loadLock)
{
+ if (loading)
+ {
+ if (elements == null)
+ {
+ return null;
+ }
+
+ return elements[index];
+ }
+
return commitInfos.get(index);
}
}
- public CDOCommitInfo[] getElements()
+ public final CDOCommitInfo[] getElements()
{
checkActive();
- synchronized (commitInfos)
+ synchronized (loadLock)
{
+ if (loading)
+ {
+ if (elements == null)
+ {
+ return NO_ELEMENTS;
+ }
+
+ return elements;
+ }
+
if (elements == null)
{
int size = commitInfos.size();
- if (!full && appendingTriggerLoadElement && !isLoading())
+
+ if (!full && appendingTriggerLoadElement)
{
elements = commitInfos.toArray(new CDOCommitInfo[size + 1]);
elements[size] = triggerLoadElement;
@@ -188,11 +242,21 @@ public class CDOCommitHistoryImpl extends Container<CDOCommitInfo>implements CDO
}
}
- public int size()
+ public final int size()
{
checkActive();
- synchronized (commitInfos)
+ synchronized (loadLock)
{
+ if (loading)
+ {
+ if (elements == null)
+ {
+ return 0;
+ }
+
+ return elements.length;
+ }
+
int size = commitInfos.size();
if (!full && appendingTriggerLoadElement)
{
@@ -204,11 +268,21 @@ public class CDOCommitHistoryImpl extends Container<CDOCommitInfo>implements CDO
}
@Override
- public boolean isEmpty()
+ public final boolean isEmpty()
{
checkActive();
- synchronized (commitInfos)
+ synchronized (loadLock)
{
+ if (loading)
+ {
+ if (elements == null)
+ {
+ return true;
+ }
+
+ return elements.length == 0;
+ }
+
if (!full && appendingTriggerLoadElement)
{
return false;
@@ -218,26 +292,29 @@ public class CDOCommitHistoryImpl extends Container<CDOCommitInfo>implements CDO
}
}
- public boolean isFull()
+ public final boolean isFull()
{
- return full;
+ synchronized (loadLock)
+ {
+ return full;
+ }
}
- public boolean isLoading()
+ public final boolean isLoading()
{
- synchronized (loaderThreadLock)
+ synchronized (loadLock)
{
- return loaderThread != null;
+ return loading;
}
}
- public void waitWhileLoading(long timeout)
+ public final void waitWhileLoading(long timeout)
{
long end = System.currentTimeMillis() + timeout;
- synchronized (commitInfos)
+ synchronized (loadLock)
{
- while (isLoading())
+ while (loading)
{
try
{
@@ -247,7 +324,7 @@ public class CDOCommitHistoryImpl extends Container<CDOCommitInfo>implements CDO
return;
}
- commitInfos.wait(remaining);
+ loadLock.wait(remaining);
}
catch (InterruptedException ex)
{
@@ -257,28 +334,54 @@ public class CDOCommitHistoryImpl extends Container<CDOCommitInfo>implements CDO
}
}
- public boolean triggerLoad()
+ public final void handleCommitInfo(CDOCommitInfo commitInfo)
+ {
+ synchronized (loadLock)
+ {
+ loading = true;
+ }
+
+ List<CDOCommitInfo> addedCommitInfos = Collections.emptyList();
+
+ try
+ {
+ if (addCommitInfo(commitInfo))
+ {
+ addedCommitInfos = Collections.singletonList(commitInfo);
+ }
+ }
+ finally
+ {
+ finishLoading(addedCommitInfos, null);
+ }
+ }
+
+ public final boolean triggerLoad()
{
return triggerLoad(null);
}
- public boolean triggerLoad(final CDOCommitInfoHandler handler)
+ public final boolean triggerLoad(final CDOCommitInfoHandler handler)
{
- synchronized (loaderThreadLock)
+ synchronized (loadLock)
{
- if (full || loaderThread != null)
+ if (full || loading)
{
return false;
}
- loaderThread = new Thread("CDOCommitHistoryLoader")
+ loading = true;
+
+ new Thread("CDOCommitHistoryLoader")
{
@Override
public void run()
{
+ final List<CDOCommitInfo> addedCommitInfos = new ArrayList<CDOCommitInfo>();
+
try
{
- doLoadCommitInfos(handler);
+ loadCommitInfos(loadCount, addedCommitInfos);
}
catch (Throwable ex)
{
@@ -286,73 +389,172 @@ public class CDOCommitHistoryImpl extends Container<CDOCommitInfo>implements CDO
}
finally
{
- synchronized (loaderThreadLock)
- {
- loaderThread = null;
- }
+ finishLoading(addedCommitInfos, handler);
}
}
- };
+ }.start();
}
- loaderThread.start();
return true;
}
- public void handleCommitInfo(CDOCommitInfo commitInfo)
+ protected void loadCommitInfos(int loadCount, final List<CDOCommitInfo> addedCommitInfos)
{
- if (filter(commitInfo))
+ final CDOCommitInfo[] lastCommitInfo = { getLastCommitInfo() };
+ long timeStamp = CDOBranchPoint.UNSPECIFIED_DATE;
+ int delivered = 0;
+
+ if (lastCommitInfo[0] == null)
{
- return;
+ timeStamp = manager.getLastCommitOfBranch(branch, false);
+ }
+ else
+ {
+ timeStamp = lastCommitInfo[0].getPreviousTimeStamp();
}
- long timeStamp = commitInfo.getTimeStamp();
- synchronized (commitInfos)
+ // ==============================================
+ // Fill history with already loaded commit infos.
+ // ==============================================
+
+ if (timeStamp != CDOBranchPoint.UNSPECIFIED_DATE)
{
- if (commitInfos.isEmpty() || timeStamp > commitInfos.getFirst().getTimeStamp())
+ CDOCommitInfo commitInfo;
+ while ((commitInfo = manager.getCommitInfo(timeStamp, false)) != null)
{
- commitInfos.addFirst(commitInfo);
+ if (addCommitInfo(commitInfo))
+ {
+ addedCommitInfos.add(commitInfo);
+ lastCommitInfo[0] = commitInfo;
+ ++delivered;
+ }
+
+ if (commitInfo.isInitialCommit())
+ {
+ setFull();
+ break;
+ }
+
+ timeStamp = commitInfo.getPreviousTimeStamp();
}
- else
+ }
+
+ // ================================================================
+ // Load commit infos from server if load count is not reached, yet.
+ // ================================================================
+
+ if (delivered < loadCount && !isFull())
+ {
+ final int[] loaded = { 0 }; // Used to detect premature end of loading.
+
+ manager.getCommitInfos(branch, timeStamp, null, null, -loadCount, new CDOCommitInfoHandler()
{
- if (timeStamp < commitInfos.getLast().getTimeStamp())
+ public void handleCommitInfo(CDOCommitInfo commitInfo)
{
- commitInfos.addLast(commitInfo);
+ ++loaded[0];
+
+ if (addCommitInfo(commitInfo))
+ {
+ addedCommitInfos.add(commitInfo);
+ lastCommitInfo[0] = commitInfo;
+ }
}
- else
+ });
+
+ if (loaded[0] < loadCount)
+ {
+ setFull();
+ }
+ else
+ {
+ // ==================================================
+ // Complete history with already loaded commit infos.
+ // ==================================================
+
+ if (lastCommitInfo[0] != null)
{
- for (ListIterator<CDOCommitInfo> it = commitInfos.listIterator(); it.hasNext();)
+ long previousTimeStamp = lastCommitInfo[0].getPreviousTimeStamp();
+ while ((lastCommitInfo[0] = manager.getCommitInfo(previousTimeStamp, false)) != null)
{
- CDOCommitInfo current = it.next();
- long currentTimeStamp = current.getTimeStamp();
- if (timeStamp == currentTimeStamp)
+ if (addCommitInfo(lastCommitInfo[0]))
{
- // Ignore duplicate commit infos
- return;
+ addedCommitInfos.add(lastCommitInfo[0]);
}
- if (timeStamp < currentTimeStamp)
+ if (lastCommitInfo[0].isInitialCommit())
{
- it.add(commitInfo);
+ setFull();
break;
}
+
+ previousTimeStamp = lastCommitInfo[0].getPreviousTimeStamp();
}
}
}
-
- elements = null;
- commitInfos.notifyAll();
}
- fireElementAddedEvent(commitInfo);
+ if (appendingTriggerLoadElement && !isFull())
+ {
+ addedCommitInfos.add(triggerLoadElement);
+ }
}
- protected boolean filter(CDOCommitInfo commitInfo)
+ protected boolean filterCommitInfo(CDOCommitInfo commitInfo)
{
return branch != null && branch != commitInfo.getBranch();
}
- protected void setFull()
+ protected final boolean addCommitInfo(CDOCommitInfo commitInfo)
+ {
+ checkLoading();
+
+ if (commitInfo == null || filterCommitInfo(commitInfo))
+ {
+ return false;
+ }
+
+ long timeStamp = commitInfo.getTimeStamp();
+ if (commitInfos.isEmpty() || timeStamp > commitInfos.getFirst().getTimeStamp())
+ {
+ commitInfos.addFirst(commitInfo);
+ }
+ else if (timeStamp < commitInfos.getLast().getTimeStamp())
+ {
+ commitInfos.addLast(commitInfo);
+ }
+ else
+ {
+ for (ListIterator<CDOCommitInfo> it = commitInfos.listIterator(); it.hasNext();)
+ {
+ CDOCommitInfo current = it.next();
+ long currentTimeStamp = current.getTimeStamp();
+ if (timeStamp == currentTimeStamp)
+ {
+ // Ignore duplicate commit infos.
+ return false;
+ }
+
+ if (timeStamp < currentTimeStamp)
+ {
+ it.add(commitInfo);
+ break;
+ }
+ }
+ }
+
+ return true;
+ }
+
+ protected final void deliverFinish(List<CDOCommitInfo> addedCommitInfos, CDOCommitInfoHandler handler)
+ {
+ if (handler instanceof IListener)
+ {
+ IListener listener = (IListener)handler;
+ listener.notifyEvent(new FinishedEvent(addedCommitInfos));
+ }
+ }
+
+ protected final void setFull()
{
full = true;
}
@@ -378,57 +580,48 @@ public class CDOCommitHistoryImpl extends Container<CDOCommitInfo>implements CDO
super.doDeactivate();
}
- protected void doLoadCommitInfos(final CDOCommitInfoHandler handler)
+ private void checkLoading()
{
- final long startTime;
- synchronized (commitInfos)
+ if (!loading)
{
- startTime = commitInfos.isEmpty() ? CDOBranchPoint.UNSPECIFIED_DATE : commitInfos.getLast().getTimeStamp();
+ throw new IllegalStateException("Not loading");
}
+ }
- final int[] loaded = { 0 };
- manager.getCommitInfos(branch, startTime, null, null, -loadCount, new CDOCommitInfoHandler()
+ private void finishLoading(final List<CDOCommitInfo> addedCommitInfos, final CDOCommitInfoHandler handler)
+ {
+ synchronized (loadLock)
{
- private boolean ignore = startTime != CDOBranchPoint.UNSPECIFIED_DATE;
+ elements = null;
+ loading = false;
+ loadLock.notifyAll();
+ }
- public void handleCommitInfo(CDOCommitInfo commitInfo)
- {
- ++loaded[0];
+ if (!addedCommitInfos.isEmpty())
+ {
+ fireElementsAddedEvent(addedCommitInfos.toArray(new CDOCommitInfo[addedCommitInfos.size()]));
- if (ignore)
+ if (handler != null)
+ {
+ for (CDOCommitInfo commitInfo : addedCommitInfos)
{
- ignore = false;
- return;
+ handler.handleCommitInfo(commitInfo);
}
- CDOCommitHistoryImpl.this.handleCommitInfo(commitInfo);
- handle(handler, commitInfo);
+ deliverFinish(addedCommitInfos, handler);
}
- });
-
- if (loaded[0] < loadCount)
- {
- setFull();
- }
- else if (appendingTriggerLoadElement)
- {
- fireElementAddedEvent(triggerLoadElement);
- handle(handler, triggerLoadElement);
- }
-
- if (handler instanceof IListener)
- {
- IListener listener = (IListener)handler;
- listener.notifyEvent(FinishedEvent.INSTANCE);
}
}
- private static void handle(final CDOCommitInfoHandler handler, CDOCommitInfo commitInfo)
+ private CDOCommitInfo getLastCommitInfo()
{
- if (handler != null)
+ checkLoading();
+ if (commitInfos.isEmpty())
{
- handler.handleCommitInfo(commitInfo);
+ return null;
}
+
+ return commitInfos.getLast();
}
/**
@@ -461,6 +654,11 @@ public class CDOCommitHistoryImpl extends Container<CDOCommitInfo>implements CDO
return CDOBranchPoint.UNSPECIFIED_DATE;
}
+ public CDOCommitInfo getPreviousCommitInfo()
+ {
+ return null;
+ }
+
public String getUserID()
{
return null;
@@ -471,6 +669,16 @@ public class CDOCommitHistoryImpl extends Container<CDOCommitInfo>implements CDO
return "Load more history elements";
}
+ public CDOBranchPoint getMergeSource()
+ {
+ return null;
+ }
+
+ public CDOCommitInfo getMergedCommitInfo()
+ {
+ return null;
+ }
+
public boolean isEmpty()
{
return true;
@@ -529,20 +737,13 @@ public class CDOCommitHistoryImpl extends Container<CDOCommitInfo>implements CDO
/**
* @author Eike Stepper
*/
- public static final class Empty extends Container<CDOCommitInfo>implements CDOCommitHistory
+ public static final class Empty extends Container<CDOCommitInfo> implements CDOCommitHistory
{
- private static final CDOCommitInfo[] NO_ELEMENTS = {};
-
public CDOCommitInfo[] getElements()
{
return NO_ELEMENTS;
}
- public CDOCommitInfo[] getElements(boolean withTriggerLoadElement)
- {
- return NO_ELEMENTS;
- }
-
public void handleCommitInfo(CDOCommitInfo commitInfo)
{
}
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/CDOCommitInfoImpl.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/CDOCommitInfoImpl.java
index eb40ca2a7f..a99f4b7e04 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/CDOCommitInfoImpl.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/CDOCommitInfoImpl.java
@@ -42,20 +42,24 @@ public class CDOCommitInfoImpl extends CDOBranchPointImpl implements CDOCommitIn
{
// private static final CDOCommitInfo[] NO_PARENTS = {};
- private InternalCDOCommitInfoManager commitInfoManager;
+ private final InternalCDOCommitInfoManager commitInfoManager;
- private long previousTimeStamp;
+ private final long previousTimeStamp;
- private String userID;
+ private final String userID;
- private String comment;
+ private final String comment;
+
+ private final CDOBranchPoint mergeSource;
+
+ private CDOCommitInfo mergedCommitInfo;
private CDOCommitData commitData;
// private transient CDOCommitInfo[] parents;
public CDOCommitInfoImpl(InternalCDOCommitInfoManager commitInfoManager, CDOBranch branch, long timeStamp,
- long previousTimeStamp, String userID, String comment, CDOCommitData commitData)
+ long previousTimeStamp, String userID, String comment, CDOBranchPoint mergeSource, CDOCommitData commitData)
{
super(branch, timeStamp);
CheckUtil.checkArg(commitInfoManager, "commitInfoManager"); //$NON-NLS-1$
@@ -63,6 +67,7 @@ public class CDOCommitInfoImpl extends CDOBranchPointImpl implements CDOCommitIn
this.previousTimeStamp = previousTimeStamp;
this.userID = userID;
this.comment = comment;
+ this.mergeSource = mergeSource;
this.commitData = commitData;
}
@@ -94,6 +99,12 @@ public class CDOCommitInfoImpl extends CDOBranchPointImpl implements CDOCommitIn
return previousTimeStamp;
}
+ public CDOCommitInfo getPreviousCommitInfo()
+ {
+ return previousTimeStamp == CDOBranchPoint.UNSPECIFIED_DATE ? null
+ : commitInfoManager.getCommitInfo(previousTimeStamp);
+ }
+
public String getUserID()
{
return userID;
@@ -104,6 +115,26 @@ public class CDOCommitInfoImpl extends CDOBranchPointImpl implements CDOCommitIn
return comment;
}
+ public CDOBranchPoint getMergeSource()
+ {
+ return mergeSource;
+ }
+
+ public CDOCommitInfo getMergedCommitInfo()
+ {
+ if (mergeSource == null)
+ {
+ return null;
+ }
+
+ if (mergedCommitInfo == null)
+ {
+ mergedCommitInfo = commitInfoManager.getCommitInfo(mergeSource.getBranch(), mergeSource.getTimeStamp(), false);
+ }
+
+ return mergedCommitInfo;
+ }
+
public boolean isInitialCommit()
{
return CDOCommonUtil.SYSTEM_USER_ID.equals(userID);
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/CDOCommitInfoManagerImpl.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/CDOCommitInfoManagerImpl.java
index dd99fa4d6f..5efc0a76bf 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/CDOCommitInfoManagerImpl.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/CDOCommitInfoManagerImpl.java
@@ -22,8 +22,9 @@ import org.eclipse.emf.cdo.internal.common.bundle.OM;
import org.eclipse.emf.cdo.spi.common.commit.CDOCommitInfoUtil;
import org.eclipse.emf.cdo.spi.common.commit.InternalCDOCommitInfoManager;
+import org.eclipse.net4j.util.ref.ReferenceValueMap2;
+
import java.lang.ref.SoftReference;
-import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@@ -35,7 +36,7 @@ import java.util.WeakHashMap;
public class CDOCommitInfoManagerImpl extends CDOCommitHistoryProviderImpl<CDOBranch, CDOCommitHistory>
implements InternalCDOCommitInfoManager
{
- private final Map<CDOCommitInfo, WeakReference<CDOCommitInfo>> cache;
+ private final Map<Long, CDOCommitInfo> cache;
private final Object cacheLock = new Object();
@@ -47,11 +48,13 @@ public class CDOCommitInfoManagerImpl extends CDOCommitHistoryProviderImpl<CDOBr
private List<CDOCommitInfoHandler> handlers = new ArrayList<CDOCommitInfoHandler>();
+ private long lastCommit = CDOBranchPoint.UNSPECIFIED_DATE;
+
public CDOCommitInfoManagerImpl(boolean caching)
{
if (caching)
{
- cache = new WeakHashMap<CDOCommitInfo, WeakReference<CDOCommitInfo>>();
+ cache = new ReferenceValueMap2.Soft<Long, CDOCommitInfo>();
}
else
{
@@ -129,38 +132,51 @@ public class CDOCommitInfoManagerImpl extends CDOCommitHistoryProviderImpl<CDOBr
public CDOCommitInfo createCommitInfo(CDOBranch branch, long timeStamp, long previousTimeStamp, String userID,
String comment, CDOCommitData commitData)
{
+ return createCommitInfo(branch, timeStamp, previousTimeStamp, userID, comment, null, commitData);
+ }
+
+ public CDOCommitInfo createCommitInfo(CDOBranch branch, long timeStamp, long previousTimeStamp, String userID,
+ String comment, CDOBranchPoint mergeSource, CDOCommitData commitData)
+ {
checkActive();
CDOCommitInfo commitInfo = new CDOCommitInfoImpl(this, branch, timeStamp, previousTimeStamp, userID, comment,
- commitData);
+ mergeSource, commitData);
return intern(commitInfo);
}
public CDOCommitInfo getCommitInfo(long timeStamp)
{
+ return getCommitInfo(timeStamp, true);
+ }
+
+ public CDOCommitInfo getCommitInfo(long timeStamp, boolean loadOnDemand)
+ {
checkActive();
if (cache != null)
{
synchronized (cacheLock)
{
- for (CDOCommitInfo commitInfo : cache.keySet())
+ CDOCommitInfo commitInfo = cache.get(timeStamp);
+ if (commitInfo != null)
{
- if (commitInfo.getTimeStamp() == timeStamp)
- {
- return commitInfo;
- }
+ return commitInfo;
}
}
}
final CDOCommitInfo[] result = { null };
- getCommitInfos(null, timeStamp, timeStamp, new CDOCommitInfoHandler()
+
+ if (loadOnDemand)
{
- public void handleCommitInfo(CDOCommitInfo commitInfo)
+ getCommitInfos(null, timeStamp, timeStamp, new CDOCommitInfoHandler()
{
- result[0] = commitInfo;
- }
- });
+ public void handleCommitInfo(CDOCommitInfo commitInfo)
+ {
+ result[0] = commitInfo;
+ }
+ });
+ }
return result[0];
}
@@ -219,7 +235,7 @@ public class CDOCommitInfoManagerImpl extends CDOCommitHistoryProviderImpl<CDOBr
return null;
}
- BranchInfoCache infoCache = getBranchInfoCache(branch);
+ BranchInfoCache infoCache = getBranchInfoCache(branch, true);
CDOCommitInfo base = infoCache.getBase();
if (base == null)
{
@@ -232,7 +248,7 @@ public class CDOCommitInfoManagerImpl extends CDOCommitHistoryProviderImpl<CDOBr
public CDOCommitInfo getFirstOfBranch(CDOBranch branch)
{
- BranchInfoCache infoCache = getBranchInfoCache(branch);
+ BranchInfoCache infoCache = getBranchInfoCache(branch, true);
CDOCommitInfo first = infoCache.getFirst();
if (first == null)
{
@@ -245,7 +261,7 @@ public class CDOCommitInfoManagerImpl extends CDOCommitHistoryProviderImpl<CDOBr
public CDOCommitInfo getLastOfBranch(CDOBranch branch)
{
- BranchInfoCache infoCache = getBranchInfoCache(branch);
+ BranchInfoCache infoCache = getBranchInfoCache(branch, true);
CDOCommitInfo last = infoCache.getLast();
if (last == null)
{
@@ -256,6 +272,54 @@ public class CDOCommitInfoManagerImpl extends CDOCommitHistoryProviderImpl<CDOBr
return last;
}
+ public long getLastCommitOfBranch(CDOBranch branch, boolean loadOnDemand)
+ {
+ if (branch == null)
+ {
+ return lastCommit;
+ }
+
+ BranchInfoCache infoCache = getBranchInfoCache(branch, loadOnDemand);
+ if (infoCache != null)
+ {
+ long lastCommit = infoCache.getLastCommit();
+ if (lastCommit == CDOBranchPoint.UNSPECIFIED_DATE && loadOnDemand)
+ {
+ CDOCommitInfo last = loadLastOfBranch(branch);
+ infoCache.setLast(last);
+ lastCommit = last.getTimeStamp();
+ }
+
+ return lastCommit;
+ }
+
+ return CDOBranchPoint.UNSPECIFIED_DATE;
+ }
+
+ public void setLastCommitOfBranch(CDOBranch branch, long lastCommit)
+ {
+ if (branch != null)
+ {
+ BranchInfoCache infoCache = getBranchInfoCache(branch, true);
+ infoCache.setLastCommit(lastCommit);
+ }
+
+ setLastCommit(lastCommit);
+ }
+
+ public long getLastCommit()
+ {
+ return lastCommit;
+ }
+
+ public void setLastCommit(long lastCommit)
+ {
+ if (lastCommit > this.lastCommit)
+ {
+ this.lastCommit = lastCommit;
+ }
+ }
+
@Override
public String toString()
{
@@ -293,26 +357,27 @@ public class CDOCommitInfoManagerImpl extends CDOCommitHistoryProviderImpl<CDOBr
{
if (cache != null && commitInfo != null)
{
+ long timeStamp = commitInfo.getTimeStamp();
+
synchronized (cacheLock)
{
- WeakReference<CDOCommitInfo> ref = cache.get(commitInfo);
- CDOCommitInfo cachedCommitInfo = ref != null ? ref.get() : null;
+ CDOCommitInfo cachedCommitInfo = cache.get(timeStamp);
if (cachedCommitInfo != null)
{
return cachedCommitInfo;
}
- cache.put(commitInfo, new WeakReference<CDOCommitInfo>(commitInfo));
+ cache.put(timeStamp, commitInfo);
}
}
return commitInfo;
}
- private BranchInfoCache getBranchInfoCache(CDOBranch branch)
+ private BranchInfoCache getBranchInfoCache(CDOBranch branch, boolean createOnDemand)
{
BranchInfoCache infoCache = branches.get(branch);
- if (infoCache == null)
+ if (infoCache == null && createOnDemand)
{
infoCache = new BranchInfoCache();
branches.put(branch, infoCache);
@@ -367,6 +432,8 @@ public class CDOCommitInfoManagerImpl extends CDOCommitHistoryProviderImpl<CDOBr
private SoftReference<CDOCommitInfo> last;
+ private long lastCommit = CDOBranchPoint.UNSPECIFIED_DATE;
+
public BranchInfoCache()
{
}
@@ -399,6 +466,34 @@ public class CDOCommitInfoManagerImpl extends CDOCommitHistoryProviderImpl<CDOBr
public void setLast(CDOCommitInfo last)
{
this.last = new SoftReference<CDOCommitInfo>(last);
+
+ long timeStamp = last.getTimeStamp();
+ if (timeStamp > lastCommit)
+ {
+ lastCommit = timeStamp;
+ }
+ }
+
+ public long getLastCommit()
+ {
+ return lastCommit;
+ }
+
+ public void setLastCommit(long lastCommit)
+ {
+ if (lastCommit > this.lastCommit)
+ {
+ this.lastCommit = lastCommit;
+
+ CDOCommitInfo last = getLast();
+ if (last != null)
+ {
+ if (lastCommit > last.getTimeStamp())
+ {
+ last = null;
+ }
+ }
+ }
}
}
}
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/DelegatingCommitInfo.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/DelegatingCommitInfo.java
index a087822e4f..25f2ee968c 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/DelegatingCommitInfo.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/DelegatingCommitInfo.java
@@ -11,6 +11,7 @@
package org.eclipse.emf.cdo.internal.common.commit;
import org.eclipse.emf.cdo.common.branch.CDOBranch;
+import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
import org.eclipse.emf.cdo.common.commit.CDOChangeKind;
import org.eclipse.emf.cdo.common.commit.CDOChangeSetData;
import org.eclipse.emf.cdo.common.commit.CDOCommitInfo;
@@ -49,6 +50,11 @@ public abstract class DelegatingCommitInfo implements CDOCommitInfo
return getDelegate().getPreviousTimeStamp();
}
+ public CDOCommitInfo getPreviousCommitInfo()
+ {
+ return getDelegate().getPreviousCommitInfo();
+ }
+
public long getTimeStamp()
{
return getDelegate().getTimeStamp();
@@ -64,6 +70,16 @@ public abstract class DelegatingCommitInfo implements CDOCommitInfo
return getDelegate().getComment();
}
+ public CDOBranchPoint getMergeSource()
+ {
+ return getDelegate().getMergeSource();
+ }
+
+ public CDOCommitInfo getMergedCommitInfo()
+ {
+ return getDelegate().getMergedCommitInfo();
+ }
+
public boolean isEmpty()
{
return getDelegate().isEmpty();
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/FailureCommitInfo.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/FailureCommitInfo.java
index 37985bb18c..87c1ebd9eb 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/FailureCommitInfo.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/commit/FailureCommitInfo.java
@@ -11,6 +11,7 @@
package org.eclipse.emf.cdo.internal.common.commit;
import org.eclipse.emf.cdo.common.branch.CDOBranch;
+import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
import org.eclipse.emf.cdo.common.commit.CDOChangeKind;
import org.eclipse.emf.cdo.common.commit.CDOChangeSetData;
import org.eclipse.emf.cdo.common.commit.CDOCommitInfo;
@@ -19,6 +20,7 @@ import org.eclipse.emf.cdo.common.id.CDOID;
import org.eclipse.emf.cdo.common.model.CDOPackageUnit;
import org.eclipse.emf.cdo.common.revision.CDOIDAndVersion;
import org.eclipse.emf.cdo.common.revision.CDORevisionKey;
+import org.eclipse.emf.cdo.spi.common.commit.InternalCDOCommitInfoManager;
import java.util.Collections;
import java.util.List;
@@ -29,16 +31,24 @@ import java.util.Map;
*/
public class FailureCommitInfo implements CDOCommitInfo
{
- private long timeStamp;
+ private final InternalCDOCommitInfoManager commitInfoManager;
- private long previousTimeStamp;
+ private final long timeStamp;
- public FailureCommitInfo(long timeStamp, long previousTimeStamp)
+ private final long previousTimeStamp;
+
+ public FailureCommitInfo(InternalCDOCommitInfoManager commitInfoManager, long timeStamp, long previousTimeStamp)
{
+ this.commitInfoManager = commitInfoManager;
this.timeStamp = timeStamp;
this.previousTimeStamp = previousTimeStamp;
}
+ public CDOCommitInfoManager getCommitInfoManager()
+ {
+ return commitInfoManager;
+ }
+
public long getTimeStamp()
{
return timeStamp;
@@ -49,6 +59,12 @@ public class FailureCommitInfo implements CDOCommitInfo
return previousTimeStamp;
}
+ public CDOCommitInfo getPreviousCommitInfo()
+ {
+ return previousTimeStamp == CDOBranchPoint.UNSPECIFIED_DATE ? null
+ : commitInfoManager.getCommitInfo(previousTimeStamp);
+ }
+
public CDOBranch getBranch()
{
return null;
@@ -64,7 +80,12 @@ public class FailureCommitInfo implements CDOCommitInfo
return null;
}
- public CDOCommitInfoManager getCommitInfoManager()
+ public CDOBranchPoint getMergeSource()
+ {
+ return null;
+ }
+
+ public CDOCommitInfo getMergedCommitInfo()
{
return null;
}
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/commit/InternalCDOCommitInfoManager.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/commit/InternalCDOCommitInfoManager.java
index 998f117d53..e3e237ec12 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/commit/InternalCDOCommitInfoManager.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/commit/InternalCDOCommitInfoManager.java
@@ -12,6 +12,7 @@ package org.eclipse.emf.cdo.spi.common.commit;
import org.eclipse.emf.cdo.common.CDOCommonRepository;
import org.eclipse.emf.cdo.common.branch.CDOBranch;
+import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
import org.eclipse.emf.cdo.common.commit.CDOCommitData;
import org.eclipse.emf.cdo.common.commit.CDOCommitInfo;
import org.eclipse.emf.cdo.common.commit.CDOCommitInfoHandler;
@@ -50,6 +51,17 @@ public interface InternalCDOCommitInfoManager extends CDOCommitInfoManager, ILif
String comment, CDOCommitData commitData);
/**
+ * @since 4.6
+ */
+ public CDOCommitInfo createCommitInfo(CDOBranch branch, long timeStamp, long previousTimeStamp, String userID,
+ String comment, CDOBranchPoint mergeSource, CDOCommitData commitData);
+
+ /**
+ * @since 4.6
+ */
+ public void setLastCommitOfBranch(CDOBranch branch, long lastCommit);
+
+ /**
* If the meaning of this type isn't clear, there really should be more of a description here...
*
* @author Eike Stepper
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/protocol/CDODataInputImpl.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/protocol/CDODataInputImpl.java
index 4075fc2b08..a93b48febb 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/protocol/CDODataInputImpl.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/protocol/CDODataInputImpl.java
@@ -275,6 +275,7 @@ public abstract class CDODataInputImpl extends ExtendedDataInput.Delegating impl
public CDOCommitInfo readCDOCommitInfo() throws IOException
{
+ InternalCDOCommitInfoManager commitInfoManager = (InternalCDOCommitInfoManager)getCommitInfoManager();
long timeStamp = readLong();
long previousTimeStamp = readLong();
@@ -283,13 +284,14 @@ public abstract class CDODataInputImpl extends ExtendedDataInput.Delegating impl
CDOBranch branch = readCDOBranch();
String userID = readString();
String comment = readString();
+ CDOBranchPoint mergeSource = readBoolean() ? readCDOBranchPoint() : null;
CDOCommitData commitData = readCDOCommitData();
- InternalCDOCommitInfoManager commitInfoManager = (InternalCDOCommitInfoManager)getCommitInfoManager();
- return commitInfoManager.createCommitInfo(branch, timeStamp, previousTimeStamp, userID, comment, commitData);
+ return commitInfoManager.createCommitInfo(branch, timeStamp, previousTimeStamp, userID, comment, mergeSource,
+ commitData);
}
- return new FailureCommitInfo(timeStamp, previousTimeStamp);
+ return new FailureCommitInfo(commitInfoManager, timeStamp, previousTimeStamp);
}
public CDOLockChangeInfo readCDOLockChangeInfo() throws IOException
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/protocol/CDODataOutputImpl.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/protocol/CDODataOutputImpl.java
index a241173486..9a26dc9432 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/protocol/CDODataOutputImpl.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/protocol/CDODataOutputImpl.java
@@ -229,6 +229,18 @@ public class CDODataOutputImpl extends ExtendedDataOutput.Delegating implements
writeCDOBranch(branch);
writeString(commitInfo.getUserID());
writeString(commitInfo.getComment());
+
+ CDOBranchPoint mergeSource = commitInfo.getMergeSource();
+ if (mergeSource != null)
+ {
+ writeBoolean(true);
+ writeCDOBranchPoint(mergeSource);
+ }
+ else
+ {
+ writeBoolean(false);
+ }
+
writeCDOCommitData(commitInfo);
}
else
diff --git a/plugins/org.eclipse.emf.cdo.examples.client/ExampleClient.launch b/plugins/org.eclipse.emf.cdo.examples.client/ExampleClient.launch
index 39b2ae3b3a..42db57e1f2 100644
--- a/plugins/org.eclipse.emf.cdo.examples.client/ExampleClient.launch
+++ b/plugins/org.eclipse.emf.cdo.examples.client/ExampleClient.launch
@@ -17,12 +17,12 @@
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl}&#13;&#10;-debug&#13;&#10;-console"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m&#13;&#10;-Xmx1g&#13;&#10;-Ddebug=true&#13;&#10;-Dosgi.console.enable.builtin=true"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m&#13;&#10;-Xmx1g&#13;&#10;-Ddebug=true&#13;&#10;-Dosgi.console.enable.builtin=true&#13;&#10;-Dorg.eclipse.emf.cdo.ui.team.history.test=false"/>
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${project_loc:/org.eclipse.emf.cdo.examples.client}"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.platform.ide"/>
-<stringAttribute key="selected_target_plugins" value="com.ibm.icu@default:default,javax.annotation@default:default,javax.inject@default:default,javax.servlet@default:default,javax.xml@default:default,org.apache.batik.css*1.7.0.v201011041433@default:default,org.apache.batik.util*1.7.0.v201011041433@default:default,org.apache.batik.util.gui*1.7.0.v200903091627@default:default,org.apache.lucene.analysis@default:default,org.apache.lucene.core@default:default,org.eclipse.ant.core@default:default,org.eclipse.compare.core@default:default,org.eclipse.compare@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.core.filesystem.win32.x86_64@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.net.win32.x86_64@default:false,org.eclipse.core.net@default:default,org.eclipse.core.resources.win32.x86_64@default:default,org.eclipse.core.resources@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.e4.core.commands@default:default,org.eclipse.e4.core.contexts@default:default,org.eclipse.e4.core.di.extensions@default:default,org.eclipse.e4.core.di@default:default,org.eclipse.e4.core.services@default:default,org.eclipse.e4.ui.bindings@default:default,org.eclipse.e4.ui.css.core@default:default,org.eclipse.e4.ui.css.swt.theme@default:default,org.eclipse.e4.ui.css.swt@default:default,org.eclipse.e4.ui.di@default:default,org.eclipse.e4.ui.model.workbench@default:default,org.eclipse.e4.ui.services@default:default,org.eclipse.e4.ui.widgets@default:default,org.eclipse.e4.ui.workbench.addons.swt@default:default,org.eclipse.e4.ui.workbench.renderers.swt@default:default,org.eclipse.e4.ui.workbench.swt@default:default,org.eclipse.e4.ui.workbench3@default:default,org.eclipse.e4.ui.workbench@default:default,org.eclipse.emf.common.ui@default:default,org.eclipse.emf.common@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.emf.ecore.edit@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.emf.edit.ui@default:default,org.eclipse.emf.edit@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.bidi@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.event@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.security.win32.x86_64@default:false,org.eclipse.equinox.security@default:default,org.eclipse.equinox.util@default:default,org.eclipse.help.base@default:default,org.eclipse.help.ui@default:default,org.eclipse.help@default:default,org.eclipse.jetty.continuation@default:default,org.eclipse.jetty.http@default:default,org.eclipse.jetty.io@default:default,org.eclipse.jetty.security@default:default,org.eclipse.jetty.server@default:default,org.eclipse.jetty.servlet@default:default,org.eclipse.jetty.util@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jface.text@default:default,org.eclipse.jface@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.osgi.compatibility.state@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,org.eclipse.platform@default:default,org.eclipse.swt.win32.win32.x86_64@default:false,org.eclipse.swt@default:default,org.eclipse.team.core@default:default,org.eclipse.team.ui@default:default,org.eclipse.text@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.ui.editors@default:default,org.eclipse.ui.forms@default:default,org.eclipse.ui.ide.application@default:default,org.eclipse.ui.ide@default:default,org.eclipse.ui.intro@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.ui.views@default:default,org.eclipse.ui.win32@default:false,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui@default:default,org.w3c.css.sac@default:default,org.w3c.dom.events@default:default,org.w3c.dom.smil@default:default,org.w3c.dom.svg@default:default"/>
-<stringAttribute key="selected_workspace_plugins" value="org.eclipse.emf.cdo.admin@default:default,org.eclipse.emf.cdo.common@default:default,org.eclipse.emf.cdo.ecore.retrofit@default:default,org.eclipse.emf.cdo.edit@default:default,org.eclipse.emf.cdo.examples.client@default:default,org.eclipse.emf.cdo.examples.company.edit@default:default,org.eclipse.emf.cdo.examples.company@default:default,org.eclipse.emf.cdo.expressions.edit@default:default,org.eclipse.emf.cdo.expressions@default:default,org.eclipse.emf.cdo.net4j@default:default,org.eclipse.emf.cdo.security.edit@default:default,org.eclipse.emf.cdo.security@default:default,org.eclipse.emf.cdo.team@default:default,org.eclipse.emf.cdo.transfer.repository@default:default,org.eclipse.emf.cdo.transfer.ui@default:default,org.eclipse.emf.cdo.transfer.workspace@default:default,org.eclipse.emf.cdo.transfer@default:default,org.eclipse.emf.cdo.ui.admin@default:default,org.eclipse.emf.cdo.ui.ide@default:default,org.eclipse.emf.cdo.ui.shared@default:default,org.eclipse.emf.cdo.ui@default:default,org.eclipse.emf.cdo@default:default,org.eclipse.net4j.jvm@default:default,org.eclipse.net4j.tcp@default:default,org.eclipse.net4j.ui.shared@default:default,org.eclipse.net4j.ui@default:default,org.eclipse.net4j.util.ui@default:default,org.eclipse.net4j.util@default:default,org.eclipse.net4j@default:default"/>
+<stringAttribute key="selected_target_plugins" value="com.ibm.icu@default:default,javax.annotation@default:default,javax.inject@default:default,javax.servlet@default:default,javax.xml@default:default,org.apache.batik.css*1.7.0.v201011041433@default:default,org.apache.batik.util*1.7.0.v201011041433@default:default,org.apache.batik.util.gui*1.7.0.v200903091627@default:default,org.apache.lucene.analysis@default:default,org.apache.lucene.core@default:default,org.eclipse.ant.core@default:default,org.eclipse.compare.core@default:default,org.eclipse.compare@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.core.filesystem.win32.x86_64@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.net.win32.x86_64@default:false,org.eclipse.core.net@default:default,org.eclipse.core.resources.win32.x86_64@default:false,org.eclipse.core.resources@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.e4.core.commands@default:default,org.eclipse.e4.core.contexts@default:default,org.eclipse.e4.core.di.extensions@default:default,org.eclipse.e4.core.di@default:default,org.eclipse.e4.core.services@default:default,org.eclipse.e4.ui.bindings@default:default,org.eclipse.e4.ui.css.core@default:default,org.eclipse.e4.ui.css.swt.theme@default:default,org.eclipse.e4.ui.css.swt@default:default,org.eclipse.e4.ui.di@default:default,org.eclipse.e4.ui.model.workbench@default:default,org.eclipse.e4.ui.services@default:default,org.eclipse.e4.ui.widgets@default:default,org.eclipse.e4.ui.workbench.addons.swt@default:default,org.eclipse.e4.ui.workbench.renderers.swt@default:default,org.eclipse.e4.ui.workbench.swt@default:default,org.eclipse.e4.ui.workbench3@default:default,org.eclipse.e4.ui.workbench@default:default,org.eclipse.emf.common.ui@default:default,org.eclipse.emf.common@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.emf.ecore.edit@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.emf.edit.ui@default:default,org.eclipse.emf.edit@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.bidi@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.event@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.security.win32.x86_64@default:false,org.eclipse.equinox.security@default:default,org.eclipse.equinox.util@default:default,org.eclipse.help.base@default:default,org.eclipse.help.ui@default:default,org.eclipse.help@default:default,org.eclipse.jetty.continuation@default:default,org.eclipse.jetty.http@default:default,org.eclipse.jetty.io@default:default,org.eclipse.jetty.security@default:default,org.eclipse.jetty.server@default:default,org.eclipse.jetty.servlet@default:default,org.eclipse.jetty.util@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jface.text@default:default,org.eclipse.jface@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.osgi.compatibility.state@default:false,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,org.eclipse.platform@default:default,org.eclipse.swt.win32.win32.x86_64@default:false,org.eclipse.swt@default:default,org.eclipse.team.core@default:default,org.eclipse.team.ui@default:default,org.eclipse.text@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.ui.editors@default:default,org.eclipse.ui.forms@default:default,org.eclipse.ui.ide.application@default:default,org.eclipse.ui.ide@default:default,org.eclipse.ui.intro@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.ui.views@default:default,org.eclipse.ui.win32@default:false,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui@default:default,org.w3c.css.sac@default:default,org.w3c.dom.events@default:default,org.w3c.dom.smil@default:default,org.w3c.dom.svg@default:default"/>
+<stringAttribute key="selected_workspace_plugins" value="org.eclipse.emf.cdo.admin@default:default,org.eclipse.emf.cdo.common@default:default,org.eclipse.emf.cdo.ecore.retrofit@default:false,org.eclipse.emf.cdo.edit@default:default,org.eclipse.emf.cdo.examples.client@default:default,org.eclipse.emf.cdo.examples.company.edit@default:default,org.eclipse.emf.cdo.examples.company@default:default,org.eclipse.emf.cdo.expressions.edit@default:default,org.eclipse.emf.cdo.expressions@default:default,org.eclipse.emf.cdo.net4j@default:default,org.eclipse.emf.cdo.security.edit@default:default,org.eclipse.emf.cdo.security@default:default,org.eclipse.emf.cdo.transfer.repository@default:default,org.eclipse.emf.cdo.transfer.ui@default:default,org.eclipse.emf.cdo.transfer.workspace@default:default,org.eclipse.emf.cdo.transfer@default:default,org.eclipse.emf.cdo.ui.admin@default:default,org.eclipse.emf.cdo.ui.shared@default:default,org.eclipse.emf.cdo.ui@default:default,org.eclipse.emf.cdo@default:default,org.eclipse.net4j.jvm@default:default,org.eclipse.net4j.tcp@default:default,org.eclipse.net4j.ui.shared@default:default,org.eclipse.net4j.ui@default:default,org.eclipse.net4j.util.ui@default:default,org.eclipse.net4j.util@default:default,org.eclipse.net4j@default:default"/>
<booleanAttribute key="show_selected_only" value="true"/>
<stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/>
<booleanAttribute key="tracing" value="true"/>
diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client/ExampleClient.launch b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client/ExampleClient.launch
index e00bb4b846..3c6d2ef7ed 100644
--- a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client/ExampleClient.launch
+++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client/ExampleClient.launch
@@ -17,12 +17,12 @@
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl}&#13;&#10;-debug&#13;&#10;-console"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m&#13;&#10;-Xmx1g&#13;&#10;-Ddebug=true&#13;&#10;-Dosgi.console.enable.builtin=true"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m&#13;&#10;-Xmx1g&#13;&#10;-Ddebug=true&#13;&#10;-Dosgi.console.enable.builtin=true&#13;&#10;-Dorg.eclipse.emf.cdo.ui.team.history.test=false"/>
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${project_loc:/org.eclipse.emf.cdo.examples.client}"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.platform.ide"/>
-<stringAttribute key="selected_target_plugins" value="com.ibm.icu@default:default,javax.annotation@default:default,javax.inject@default:default,javax.servlet@default:default,javax.xml@default:default,org.apache.batik.css*1.7.0.v201011041433@default:default,org.apache.batik.util*1.7.0.v201011041433@default:default,org.apache.batik.util.gui*1.7.0.v200903091627@default:default,org.apache.lucene.analysis@default:default,org.apache.lucene.core@default:default,org.eclipse.ant.core@default:default,org.eclipse.compare.core@default:default,org.eclipse.compare@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.core.filesystem.win32.x86_64@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.net.win32.x86_64@default:false,org.eclipse.core.net@default:default,org.eclipse.core.resources.win32.x86_64@default:default,org.eclipse.core.resources@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.e4.core.commands@default:default,org.eclipse.e4.core.contexts@default:default,org.eclipse.e4.core.di.extensions@default:default,org.eclipse.e4.core.di@default:default,org.eclipse.e4.core.services@default:default,org.eclipse.e4.ui.bindings@default:default,org.eclipse.e4.ui.css.core@default:default,org.eclipse.e4.ui.css.swt.theme@default:default,org.eclipse.e4.ui.css.swt@default:default,org.eclipse.e4.ui.di@default:default,org.eclipse.e4.ui.model.workbench@default:default,org.eclipse.e4.ui.services@default:default,org.eclipse.e4.ui.widgets@default:default,org.eclipse.e4.ui.workbench.addons.swt@default:default,org.eclipse.e4.ui.workbench.renderers.swt@default:default,org.eclipse.e4.ui.workbench.swt@default:default,org.eclipse.e4.ui.workbench3@default:default,org.eclipse.e4.ui.workbench@default:default,org.eclipse.emf.common.ui@default:default,org.eclipse.emf.common@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.emf.ecore.edit@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.emf.edit.ui@default:default,org.eclipse.emf.edit@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.bidi@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.event@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.security.win32.x86_64@default:false,org.eclipse.equinox.security@default:default,org.eclipse.equinox.util@default:default,org.eclipse.help.base@default:default,org.eclipse.help.ui@default:default,org.eclipse.help@default:default,org.eclipse.jetty.continuation@default:default,org.eclipse.jetty.http@default:default,org.eclipse.jetty.io@default:default,org.eclipse.jetty.security@default:default,org.eclipse.jetty.server@default:default,org.eclipse.jetty.servlet@default:default,org.eclipse.jetty.util@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jface.text@default:default,org.eclipse.jface@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.osgi.compatibility.state@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,org.eclipse.platform@default:default,org.eclipse.swt.win32.win32.x86_64@default:false,org.eclipse.swt@default:default,org.eclipse.team.core@default:default,org.eclipse.team.ui@default:default,org.eclipse.text@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.ui.editors@default:default,org.eclipse.ui.forms@default:default,org.eclipse.ui.ide.application@default:default,org.eclipse.ui.ide@default:default,org.eclipse.ui.intro@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.ui.views@default:default,org.eclipse.ui.win32@default:false,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui@default:default,org.w3c.css.sac@default:default,org.w3c.dom.events@default:default,org.w3c.dom.smil@default:default,org.w3c.dom.svg@default:default,org.eclipse.emf.cdo.admin@default:default,org.eclipse.emf.cdo.common@default:default,org.eclipse.emf.cdo.ecore.retrofit@default:default,org.eclipse.emf.cdo.edit@default:default,org.eclipse.emf.cdo.examples.client@default:default,org.eclipse.emf.cdo.examples.company.edit@default:default,org.eclipse.emf.cdo.examples.company@default:default,org.eclipse.emf.cdo.expressions.edit@default:default,org.eclipse.emf.cdo.expressions@default:default,org.eclipse.emf.cdo.net4j@default:default,org.eclipse.emf.cdo.security.edit@default:default,org.eclipse.emf.cdo.security@default:default,org.eclipse.emf.cdo.team@default:default,org.eclipse.emf.cdo.transfer.repository@default:default,org.eclipse.emf.cdo.transfer.ui@default:default,org.eclipse.emf.cdo.transfer.workspace@default:default,org.eclipse.emf.cdo.transfer@default:default,org.eclipse.emf.cdo.ui.admin@default:default,org.eclipse.emf.cdo.ui.ide@default:default,org.eclipse.emf.cdo.ui.shared@default:default,org.eclipse.emf.cdo.ui@default:default,org.eclipse.emf.cdo@default:default,org.eclipse.net4j.jvm@default:default,org.eclipse.net4j.tcp@default:default,org.eclipse.net4j.ui.shared@default:default,org.eclipse.net4j.ui@default:default,org.eclipse.net4j.util.ui@default:default,org.eclipse.net4j.util@default:default,org.eclipse.net4j@default:default"/>
-<stringAttribute key="selected_workspace_plugins" value="com.ibm.icu@default:default,javax.annotation@default:default,javax.inject@default:default,javax.servlet@default:default,javax.xml@default:default,org.apache.batik.css*1.7.0.v201011041433@default:default,org.apache.batik.util*1.7.0.v201011041433@default:default,org.apache.batik.util.gui*1.7.0.v200903091627@default:default,org.apache.lucene.analysis@default:default,org.apache.lucene.core@default:default,org.eclipse.ant.core@default:default,org.eclipse.compare.core@default:default,org.eclipse.compare@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.core.filesystem.win32.x86_64@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.net.win32.x86_64@default:false,org.eclipse.core.net@default:default,org.eclipse.core.resources.win32.x86_64@default:default,org.eclipse.core.resources@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.e4.core.commands@default:default,org.eclipse.e4.core.contexts@default:default,org.eclipse.e4.core.di.extensions@default:default,org.eclipse.e4.core.di@default:default,org.eclipse.e4.core.services@default:default,org.eclipse.e4.ui.bindings@default:default,org.eclipse.e4.ui.css.core@default:default,org.eclipse.e4.ui.css.swt.theme@default:default,org.eclipse.e4.ui.css.swt@default:default,org.eclipse.e4.ui.di@default:default,org.eclipse.e4.ui.model.workbench@default:default,org.eclipse.e4.ui.services@default:default,org.eclipse.e4.ui.widgets@default:default,org.eclipse.e4.ui.workbench.addons.swt@default:default,org.eclipse.e4.ui.workbench.renderers.swt@default:default,org.eclipse.e4.ui.workbench.swt@default:default,org.eclipse.e4.ui.workbench3@default:default,org.eclipse.e4.ui.workbench@default:default,org.eclipse.emf.common.ui@default:default,org.eclipse.emf.common@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.emf.ecore.edit@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.emf.edit.ui@default:default,org.eclipse.emf.edit@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.bidi@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.event@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.security.win32.x86_64@default:false,org.eclipse.equinox.security@default:default,org.eclipse.equinox.util@default:default,org.eclipse.help.base@default:default,org.eclipse.help.ui@default:default,org.eclipse.help@default:default,org.eclipse.jetty.continuation@default:default,org.eclipse.jetty.http@default:default,org.eclipse.jetty.io@default:default,org.eclipse.jetty.security@default:default,org.eclipse.jetty.server@default:default,org.eclipse.jetty.servlet@default:default,org.eclipse.jetty.util@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jface.text@default:default,org.eclipse.jface@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.osgi.compatibility.state@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,org.eclipse.platform@default:default,org.eclipse.swt.win32.win32.x86_64@default:false,org.eclipse.swt@default:default,org.eclipse.team.core@default:default,org.eclipse.team.ui@default:default,org.eclipse.text@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.ui.editors@default:default,org.eclipse.ui.forms@default:default,org.eclipse.ui.ide.application@default:default,org.eclipse.ui.ide@default:default,org.eclipse.ui.intro@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.ui.views@default:default,org.eclipse.ui.win32@default:false,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui@default:default,org.w3c.css.sac@default:default,org.w3c.dom.events@default:default,org.w3c.dom.smil@default:default,org.w3c.dom.svg@default:default,org.eclipse.emf.cdo.admin@default:default,org.eclipse.emf.cdo.common@default:default,org.eclipse.emf.cdo.ecore.retrofit@default:default,org.eclipse.emf.cdo.edit@default:default,org.eclipse.emf.cdo.examples.client@default:default,org.eclipse.emf.cdo.examples.company.edit@default:default,org.eclipse.emf.cdo.examples.company@default:default,org.eclipse.emf.cdo.expressions.edit@default:default,org.eclipse.emf.cdo.expressions@default:default,org.eclipse.emf.cdo.net4j@default:default,org.eclipse.emf.cdo.security.edit@default:default,org.eclipse.emf.cdo.security@default:default,org.eclipse.emf.cdo.team@default:default,org.eclipse.emf.cdo.transfer.repository@default:default,org.eclipse.emf.cdo.transfer.ui@default:default,org.eclipse.emf.cdo.transfer.workspace@default:default,org.eclipse.emf.cdo.transfer@default:default,org.eclipse.emf.cdo.ui.admin@default:default,org.eclipse.emf.cdo.ui.ide@default:default,org.eclipse.emf.cdo.ui.shared@default:default,org.eclipse.emf.cdo.ui@default:default,org.eclipse.emf.cdo@default:default,org.eclipse.net4j.jvm@default:default,org.eclipse.net4j.tcp@default:default,org.eclipse.net4j.ui.shared@default:default,org.eclipse.net4j.ui@default:default,org.eclipse.net4j.util.ui@default:default,org.eclipse.net4j.util@default:default,org.eclipse.net4j@default:default"/>
+<stringAttribute key="selected_target_plugins" value="com.ibm.icu@default:default,javax.annotation@default:default,javax.inject@default:default,javax.servlet@default:default,javax.xml@default:default,org.apache.batik.css*1.7.0.v201011041433@default:default,org.apache.batik.util*1.7.0.v201011041433@default:default,org.apache.batik.util.gui*1.7.0.v200903091627@default:default,org.apache.lucene.analysis@default:default,org.apache.lucene.core@default:default,org.eclipse.ant.core@default:default,org.eclipse.compare.core@default:default,org.eclipse.compare@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.core.filesystem.win32.x86_64@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.net.win32.x86_64@default:false,org.eclipse.core.net@default:default,org.eclipse.core.resources.win32.x86_64@default:false,org.eclipse.core.resources@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.e4.core.commands@default:default,org.eclipse.e4.core.contexts@default:default,org.eclipse.e4.core.di.extensions@default:default,org.eclipse.e4.core.di@default:default,org.eclipse.e4.core.services@default:default,org.eclipse.e4.ui.bindings@default:default,org.eclipse.e4.ui.css.core@default:default,org.eclipse.e4.ui.css.swt.theme@default:default,org.eclipse.e4.ui.css.swt@default:default,org.eclipse.e4.ui.di@default:default,org.eclipse.e4.ui.model.workbench@default:default,org.eclipse.e4.ui.services@default:default,org.eclipse.e4.ui.widgets@default:default,org.eclipse.e4.ui.workbench.addons.swt@default:default,org.eclipse.e4.ui.workbench.renderers.swt@default:default,org.eclipse.e4.ui.workbench.swt@default:default,org.eclipse.e4.ui.workbench3@default:default,org.eclipse.e4.ui.workbench@default:default,org.eclipse.emf.common.ui@default:default,org.eclipse.emf.common@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.emf.ecore.edit@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.emf.edit.ui@default:default,org.eclipse.emf.edit@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.bidi@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.event@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.security.win32.x86_64@default:false,org.eclipse.equinox.security@default:default,org.eclipse.equinox.util@default:default,org.eclipse.help.base@default:default,org.eclipse.help.ui@default:default,org.eclipse.help@default:default,org.eclipse.jetty.continuation@default:default,org.eclipse.jetty.http@default:default,org.eclipse.jetty.io@default:default,org.eclipse.jetty.security@default:default,org.eclipse.jetty.server@default:default,org.eclipse.jetty.servlet@default:default,org.eclipse.jetty.util@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jface.text@default:default,org.eclipse.jface@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.osgi.compatibility.state@default:false,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,org.eclipse.platform@default:default,org.eclipse.swt.win32.win32.x86_64@default:false,org.eclipse.swt@default:default,org.eclipse.team.core@default:default,org.eclipse.team.ui@default:default,org.eclipse.text@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.ui.editors@default:default,org.eclipse.ui.forms@default:default,org.eclipse.ui.ide.application@default:default,org.eclipse.ui.ide@default:default,org.eclipse.ui.intro@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.ui.views@default:default,org.eclipse.ui.win32@default:false,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui@default:default,org.w3c.css.sac@default:default,org.w3c.dom.events@default:default,org.w3c.dom.smil@default:default,org.w3c.dom.svg@default:default,org.eclipse.emf.cdo.admin@default:default,org.eclipse.emf.cdo.common@default:default,org.eclipse.emf.cdo.ecore.retrofit@default:false,org.eclipse.emf.cdo.edit@default:default,org.eclipse.emf.cdo.examples.client@default:default,org.eclipse.emf.cdo.examples.company.edit@default:default,org.eclipse.emf.cdo.examples.company@default:default,org.eclipse.emf.cdo.expressions.edit@default:default,org.eclipse.emf.cdo.expressions@default:default,org.eclipse.emf.cdo.net4j@default:default,org.eclipse.emf.cdo.security.edit@default:default,org.eclipse.emf.cdo.security@default:default,org.eclipse.emf.cdo.transfer.repository@default:default,org.eclipse.emf.cdo.transfer.ui@default:default,org.eclipse.emf.cdo.transfer.workspace@default:default,org.eclipse.emf.cdo.transfer@default:default,org.eclipse.emf.cdo.ui.admin@default:default,org.eclipse.emf.cdo.ui.shared@default:default,org.eclipse.emf.cdo.ui@default:default,org.eclipse.emf.cdo@default:default,org.eclipse.net4j.jvm@default:default,org.eclipse.net4j.tcp@default:default,org.eclipse.net4j.ui.shared@default:default,org.eclipse.net4j.ui@default:default,org.eclipse.net4j.util.ui@default:default,org.eclipse.net4j.util@default:default,org.eclipse.net4j@default:default"/>
+<stringAttribute key="selected_workspace_plugins" value="com.ibm.icu@default:default,javax.annotation@default:default,javax.inject@default:default,javax.servlet@default:default,javax.xml@default:default,org.apache.batik.css*1.7.0.v201011041433@default:default,org.apache.batik.util*1.7.0.v201011041433@default:default,org.apache.batik.util.gui*1.7.0.v200903091627@default:default,org.apache.lucene.analysis@default:default,org.apache.lucene.core@default:default,org.eclipse.ant.core@default:default,org.eclipse.compare.core@default:default,org.eclipse.compare@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.core.filesystem.win32.x86_64@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.net.win32.x86_64@default:false,org.eclipse.core.net@default:default,org.eclipse.core.resources.win32.x86_64@default:false,org.eclipse.core.resources@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.e4.core.commands@default:default,org.eclipse.e4.core.contexts@default:default,org.eclipse.e4.core.di.extensions@default:default,org.eclipse.e4.core.di@default:default,org.eclipse.e4.core.services@default:default,org.eclipse.e4.ui.bindings@default:default,org.eclipse.e4.ui.css.core@default:default,org.eclipse.e4.ui.css.swt.theme@default:default,org.eclipse.e4.ui.css.swt@default:default,org.eclipse.e4.ui.di@default:default,org.eclipse.e4.ui.model.workbench@default:default,org.eclipse.e4.ui.services@default:default,org.eclipse.e4.ui.widgets@default:default,org.eclipse.e4.ui.workbench.addons.swt@default:default,org.eclipse.e4.ui.workbench.renderers.swt@default:default,org.eclipse.e4.ui.workbench.swt@default:default,org.eclipse.e4.ui.workbench3@default:default,org.eclipse.e4.ui.workbench@default:default,org.eclipse.emf.common.ui@default:default,org.eclipse.emf.common@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.emf.ecore.edit@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.emf.edit.ui@default:default,org.eclipse.emf.edit@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.bidi@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.event@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.security.win32.x86_64@default:false,org.eclipse.equinox.security@default:default,org.eclipse.equinox.util@default:default,org.eclipse.help.base@default:default,org.eclipse.help.ui@default:default,org.eclipse.help@default:default,org.eclipse.jetty.continuation@default:default,org.eclipse.jetty.http@default:default,org.eclipse.jetty.io@default:default,org.eclipse.jetty.security@default:default,org.eclipse.jetty.server@default:default,org.eclipse.jetty.servlet@default:default,org.eclipse.jetty.util@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jface.text@default:default,org.eclipse.jface@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.osgi.compatibility.state@default:false,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,org.eclipse.platform@default:default,org.eclipse.swt.win32.win32.x86_64@default:false,org.eclipse.swt@default:default,org.eclipse.team.core@default:default,org.eclipse.team.ui@default:default,org.eclipse.text@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.ui.editors@default:default,org.eclipse.ui.forms@default:default,org.eclipse.ui.ide.application@default:default,org.eclipse.ui.ide@default:default,org.eclipse.ui.intro@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.ui.views@default:default,org.eclipse.ui.win32@default:false,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui@default:default,org.w3c.css.sac@default:default,org.w3c.dom.events@default:default,org.w3c.dom.smil@default:default,org.w3c.dom.svg@default:default,org.eclipse.emf.cdo.admin@default:default,org.eclipse.emf.cdo.common@default:default,org.eclipse.emf.cdo.ecore.retrofit@default:false,org.eclipse.emf.cdo.edit@default:default,org.eclipse.emf.cdo.examples.client@default:default,org.eclipse.emf.cdo.examples.company.edit@default:default,org.eclipse.emf.cdo.examples.company@default:default,org.eclipse.emf.cdo.expressions.edit@default:default,org.eclipse.emf.cdo.expressions@default:default,org.eclipse.emf.cdo.net4j@default:default,org.eclipse.emf.cdo.security.edit@default:default,org.eclipse.emf.cdo.security@default:default,org.eclipse.emf.cdo.transfer.repository@default:default,org.eclipse.emf.cdo.transfer.ui@default:default,org.eclipse.emf.cdo.transfer.workspace@default:default,org.eclipse.emf.cdo.transfer@default:default,org.eclipse.emf.cdo.ui.admin@default:default,org.eclipse.emf.cdo.ui.shared@default:default,org.eclipse.emf.cdo.ui@default:default,org.eclipse.emf.cdo@default:default,org.eclipse.net4j.jvm@default:default,org.eclipse.net4j.tcp@default:default,org.eclipse.net4j.ui.shared@default:default,org.eclipse.net4j.ui@default:default,org.eclipse.net4j.util.ui@default:default,org.eclipse.net4j.util@default:default,org.eclipse.net4j@default:default"/>
<booleanAttribute key="show_selected_only" value="true"/>
<stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/>
<booleanAttribute key="tracing" value="true"/>
diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.master/config/cdo-server.xml b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.master/config/cdo-server.xml
index f953dd6469..4ee090478a 100644
--- a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.master/config/cdo-server.xml
+++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.master/config/cdo-server.xml
@@ -22,6 +22,7 @@
<property name="ensureReferentialIntegrity" value="false"/>
<property name="allowInterruptRunningQueries" value="true"/>
<property name="idGenerationLocation" value="CLIENT"/> <!-- Possible values: STORE | CLIENT -->
+ <property name="commitInfoStorage" value="WITH_MERGE_SOURCE"/> <!-- Possible values: NO | YES | WITH_MERGE_SOURCE -->
<property name="serializeCommits" value="false"/>
<property name="optimisticLockingTimeout" value="10000"/>
diff --git a/plugins/org.eclipse.emf.cdo.examples.master/config/cdo-server.xml b/plugins/org.eclipse.emf.cdo.examples.master/config/cdo-server.xml
index f953dd6469..4ee090478a 100644
--- a/plugins/org.eclipse.emf.cdo.examples.master/config/cdo-server.xml
+++ b/plugins/org.eclipse.emf.cdo.examples.master/config/cdo-server.xml
@@ -22,6 +22,7 @@
<property name="ensureReferentialIntegrity" value="false"/>
<property name="allowInterruptRunningQueries" value="true"/>
<property name="idGenerationLocation" value="CLIENT"/> <!-- Possible values: STORE | CLIENT -->
+ <property name="commitInfoStorage" value="WITH_MERGE_SOURCE"/> <!-- Possible values: NO | YES | WITH_MERGE_SOURCE -->
<property name="serializeCommits" value="false"/>
<property name="optimisticLockingTimeout" value="10000"/>
diff --git a/plugins/org.eclipse.emf.cdo.explorer.ui/CDOExplorer.launch b/plugins/org.eclipse.emf.cdo.explorer.ui/CDOExplorer.launch
index b179ae4acb..713b5e9303 100644
--- a/plugins/org.eclipse.emf.cdo.explorer.ui/CDOExplorer.launch
+++ b/plugins/org.eclipse.emf.cdo.explorer.ui/CDOExplorer.launch
@@ -16,11 +16,12 @@
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dorg.eclipse.emf.cdo.ui.team.history.test=false"/>
<booleanAttribute key="pde.generated.config" value="false"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.emf.cdo.explorer.product"/>
-<stringAttribute key="selected_target_plugins" value="com.ibm.icu@default:default,javax.annotation@default:default,javax.el@default:default,javax.inject@default:default,javax.servlet.jsp@default:default,javax.servlet@default:default,javax.xml@default:default,org.apache.ant@default:default,org.apache.batik.css*1.7.0.v201011041433@default:default,org.apache.batik.util*1.7.0.v201011041433@default:default,org.apache.batik.util.gui*1.7.0.v200903091627@default:default,org.apache.commons.logging@default:default,org.apache.lucene.analysis@default:default,org.apache.lucene.core@default:default,org.eclipse.ant.core@default:default,org.eclipse.compare.core@default:default,org.eclipse.compare@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.core.filesystem.win32.x86_64@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.resources.win32.x86_64@default:default,org.eclipse.core.resources@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.e4.core.commands@default:default,org.eclipse.e4.core.contexts@default:default,org.eclipse.e4.core.di.extensions@default:default,org.eclipse.e4.core.di@default:default,org.eclipse.e4.core.services@default:default,org.eclipse.e4.ui.bindings@default:default,org.eclipse.e4.ui.css.core@default:default,org.eclipse.e4.ui.css.swt.theme@default:default,org.eclipse.e4.ui.css.swt@default:default,org.eclipse.e4.ui.di@default:default,org.eclipse.e4.ui.model.workbench@default:default,org.eclipse.e4.ui.services@default:default,org.eclipse.e4.ui.widgets@default:default,org.eclipse.e4.ui.workbench.addons.swt@default:default,org.eclipse.e4.ui.workbench.renderers.swt@default:default,org.eclipse.e4.ui.workbench.swt@default:default,org.eclipse.e4.ui.workbench3@default:default,org.eclipse.e4.ui.workbench@default:default,org.eclipse.emf.common.ui@default:default,org.eclipse.emf.common@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.emf.ecore.edit@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.emf.edit.ui@default:default,org.eclipse.emf.edit@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.bidi@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.event@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.security.win32.x86_64@default:false,org.eclipse.equinox.security@default:default,org.eclipse.equinox.util@default:default,org.eclipse.help.base@default:default,org.eclipse.help@default:default,org.eclipse.jetty.continuation@default:default,org.eclipse.jetty.http@default:default,org.eclipse.jetty.io@default:default,org.eclipse.jetty.security@default:default,org.eclipse.jetty.server@default:default,org.eclipse.jetty.servlet@default:default,org.eclipse.jetty.util@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jface.text@default:default,org.eclipse.jface@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.osgi.compatibility.state@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,org.eclipse.swt.win32.win32.x86_64@default:false,org.eclipse.swt@default:default,org.eclipse.team.core@default:default,org.eclipse.team.ui@default:default,org.eclipse.text@default:default,org.eclipse.ui.editors@default:default,org.eclipse.ui.forms@default:default,org.eclipse.ui.ide@default:default,org.eclipse.ui.intro@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.ui.views@default:default,org.eclipse.ui.win32@default:false,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui@default:default,org.w3c.css.sac@default:default,org.w3c.dom.events@default:default,org.w3c.dom.smil@default:default,org.w3c.dom.svg@default:default"/>
-<stringAttribute key="selected_workspace_plugins" value="org.eclipse.emf.cdo.common@default:default,org.eclipse.emf.cdo.ecore.retrofit@default:default,org.eclipse.emf.cdo.edit@default:default,org.eclipse.emf.cdo.explorer@default:default,org.eclipse.emf.cdo.net4j@default:default,org.eclipse.emf.cdo.team@default:default,org.eclipse.emf.cdo.transfer.repository@default:default,org.eclipse.emf.cdo.transfer.ui@default:default,org.eclipse.emf.cdo.transfer.workspace@default:default,org.eclipse.emf.cdo.transfer@default:default,org.eclipse.emf.cdo.ui.ide@default:default,org.eclipse.emf.cdo.ui.shared@default:default,org.eclipse.emf.cdo.ui@default:default,org.eclipse.emf.cdo@default:default,org.eclipse.net4j.tcp@default:default,org.eclipse.net4j.ui.shared@default:default,org.eclipse.net4j.util.ui@default:default,org.eclipse.net4j.util@default:default,org.eclipse.net4j@default:default"/>
+<stringAttribute key="selected_target_plugins" value="com.ibm.icu@default:default,javax.annotation@default:default,javax.el@default:default,javax.inject@default:default,javax.servlet.jsp@default:default,javax.servlet@default:default,javax.xml@default:default,org.apache.ant@default:default,org.apache.batik.css*1.7.0.v201011041433@default:default,org.apache.batik.util*1.7.0.v201011041433@default:default,org.apache.batik.util.gui*1.7.0.v200903091627@default:default,org.apache.commons.logging@default:default,org.apache.lucene.analysis@default:default,org.apache.lucene.core@default:default,org.eclipse.ant.core@default:default,org.eclipse.compare.core@default:default,org.eclipse.compare@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.core.filesystem.win32.x86_64@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.resources.win32.x86_64@default:false,org.eclipse.core.resources@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.e4.core.commands@default:default,org.eclipse.e4.core.contexts@default:default,org.eclipse.e4.core.di.extensions@default:default,org.eclipse.e4.core.di@default:default,org.eclipse.e4.core.services@default:default,org.eclipse.e4.ui.bindings@default:default,org.eclipse.e4.ui.css.core@default:default,org.eclipse.e4.ui.css.swt.theme@default:default,org.eclipse.e4.ui.css.swt@default:default,org.eclipse.e4.ui.di@default:default,org.eclipse.e4.ui.model.workbench@default:default,org.eclipse.e4.ui.services@default:default,org.eclipse.e4.ui.widgets@default:default,org.eclipse.e4.ui.workbench.addons.swt@default:default,org.eclipse.e4.ui.workbench.renderers.swt@default:default,org.eclipse.e4.ui.workbench.swt@default:default,org.eclipse.e4.ui.workbench3@default:default,org.eclipse.e4.ui.workbench@default:default,org.eclipse.emf.common.ui@default:default,org.eclipse.emf.common@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.emf.ecore.edit@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.emf.edit.ui@default:default,org.eclipse.emf.edit@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.bidi@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.event@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.security.win32.x86_64@default:false,org.eclipse.equinox.security@default:default,org.eclipse.equinox.util@default:default,org.eclipse.help.base@default:default,org.eclipse.help@default:default,org.eclipse.jetty.continuation@default:default,org.eclipse.jetty.http@default:default,org.eclipse.jetty.io@default:default,org.eclipse.jetty.security@default:default,org.eclipse.jetty.server@default:default,org.eclipse.jetty.servlet@default:default,org.eclipse.jetty.util@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jface.text@default:default,org.eclipse.jface@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.osgi.compatibility.state@default:false,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,org.eclipse.swt.win32.win32.x86_64@default:false,org.eclipse.swt@default:default,org.eclipse.team.core@default:default,org.eclipse.team.ui@default:default,org.eclipse.text@default:default,org.eclipse.ui.editors@default:default,org.eclipse.ui.forms@default:default,org.eclipse.ui.ide@default:default,org.eclipse.ui.intro@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.ui.views@default:default,org.eclipse.ui.win32@default:false,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui@default:default,org.w3c.css.sac@default:default,org.w3c.dom.events@default:default,org.w3c.dom.smil@default:default,org.w3c.dom.svg@default:default"/>
+<stringAttribute key="selected_workspace_plugins" value="org.eclipse.emf.cdo.common@default:default,org.eclipse.emf.cdo.ecore.retrofit@default:false,org.eclipse.emf.cdo.edit@default:default,org.eclipse.emf.cdo.explorer@default:default,org.eclipse.emf.cdo.net4j@default:default,org.eclipse.emf.cdo.transfer.repository@default:default,org.eclipse.emf.cdo.transfer.ui@default:default,org.eclipse.emf.cdo.transfer.workspace@default:default,org.eclipse.emf.cdo.transfer@default:default,org.eclipse.emf.cdo.ui.shared@default:default,org.eclipse.emf.cdo.ui@default:default,org.eclipse.emf.cdo@default:default,org.eclipse.net4j.tcp@default:default,org.eclipse.net4j.ui.shared@default:default,org.eclipse.net4j.util.ui@default:default,org.eclipse.net4j.util@default:default,org.eclipse.net4j@default:default"/>
<booleanAttribute key="show_selected_only" value="false"/>
<booleanAttribute key="tracing" value="false"/>
<booleanAttribute key="useCustomFeatures" value="false"/>
diff --git a/plugins/org.eclipse.emf.cdo.explorer.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.explorer.ui/META-INF/MANIFEST.MF
index 78976289df..d3bc14050c 100644
--- a/plugins/org.eclipse.emf.cdo.explorer.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.explorer.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.emf.cdo.explorer.ui;singleton:=true
-Bundle-Version: 4.4.100.qualifier
+Bundle-Version: 4.4.200.qualifier
Bundle-Activator: org.eclipse.emf.cdo.explorer.ui.bundle.OM$Activator
Bundle-Vendor: %providerName
Bundle-ClassPath: .
@@ -24,15 +24,15 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
org.eclipse.emf.cdo.ui.shared;bundle-version="[4.0.0,5.0.0)",
org.eclipse.emf.cdo.ui.compare;bundle-version="[4.0.0,5.0.0)";resolution:=optional,
org.eclipse.emf.cdo.ui.team;bundle-version="[4.0.0,5.0.0)";resolution:=optional
-Export-Package: org.eclipse.emf.cdo.explorer.ui;version="4.4.100";x-internal:=true,
- org.eclipse.emf.cdo.explorer.ui.actions;version="4.4.100";x-internal:=true,
- org.eclipse.emf.cdo.explorer.ui.application;version="4.4.100";x-internal:=true,
- org.eclipse.emf.cdo.explorer.ui.bundle;version="4.4.100";x-internal:=true,
- org.eclipse.emf.cdo.explorer.ui.checkouts;version="4.4.100";x-internal:=true,
- org.eclipse.emf.cdo.explorer.ui.checkouts.actions;version="4.4.100";x-internal:=true,
- org.eclipse.emf.cdo.explorer.ui.checkouts.wizards;version="4.4.100";x-internal:=true,
- org.eclipse.emf.cdo.explorer.ui.handlers;version="4.4.100";x-internal:=true,
- org.eclipse.emf.cdo.explorer.ui.properties;version="4.4.100";x-internal:=true,
- org.eclipse.emf.cdo.explorer.ui.repositories;version="4.4.100";x-internal:=true,
- org.eclipse.emf.cdo.explorer.ui.repositories.wizards;version="4.4.100";x-internal:=true
+Export-Package: org.eclipse.emf.cdo.explorer.ui;version="4.4.200";x-internal:=true,
+ org.eclipse.emf.cdo.explorer.ui.actions;version="4.4.200";x-internal:=true,
+ org.eclipse.emf.cdo.explorer.ui.application;version="4.4.200";x-internal:=true,
+ org.eclipse.emf.cdo.explorer.ui.bundle;version="4.4.200";x-internal:=true,
+ org.eclipse.emf.cdo.explorer.ui.checkouts;version="4.4.200";x-internal:=true,
+ org.eclipse.emf.cdo.explorer.ui.checkouts.actions;version="4.4.200";x-internal:=true,
+ org.eclipse.emf.cdo.explorer.ui.checkouts.wizards;version="4.4.200";x-internal:=true,
+ org.eclipse.emf.cdo.explorer.ui.handlers;version="4.4.200";x-internal:=true,
+ org.eclipse.emf.cdo.explorer.ui.properties;version="4.4.200";x-internal:=true,
+ org.eclipse.emf.cdo.explorer.ui.repositories;version="4.4.200";x-internal:=true,
+ org.eclipse.emf.cdo.explorer.ui.repositories.wizards;version="4.4.200";x-internal:=true
Eclipse-BuddyPolicy: registered
diff --git a/plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/checkouts/CDOCheckoutContentProvider.java b/plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/checkouts/CDOCheckoutContentProvider.java
index 73e187f73c..650a9b9646 100644
--- a/plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/checkouts/CDOCheckoutContentProvider.java
+++ b/plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/checkouts/CDOCheckoutContentProvider.java
@@ -228,7 +228,11 @@ public class CDOCheckoutContentProvider implements ICommonContentProvider, IProp
}
else if (currentPage instanceof TabbedPropertySheetPage)
{
- ((TabbedPropertySheetPage)currentPage).refresh();
+ TabbedPropertySheetPage page = (TabbedPropertySheetPage)currentPage;
+ if (page.getCurrentTab() != null)
+ {
+ page.refresh();
+ }
}
return;
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/CDONet4jSessionConfigurationImpl.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/CDONet4jSessionConfigurationImpl.java
index 43990d53ff..3c3e938766 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/CDONet4jSessionConfigurationImpl.java
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/CDONet4jSessionConfigurationImpl.java
@@ -170,6 +170,8 @@ public class CDONet4jSessionConfigurationImpl extends CDOSessionConfigurationImp
private IDGenerationLocation idGenerationLocation;
+ private CommitInfoStorage commitInfoStorage;
+
private InternalCDOSession session;
public RepositoryInfo(InternalCDOSession session, OpenSessionResult result)
@@ -191,6 +193,7 @@ public class CDONet4jSessionConfigurationImpl extends CDOSessionConfigurationImp
serializingCommits = result.isEnsuringReferentialIntegrity();
ensuringReferentialIntegrity = result.isEnsuringReferentialIntegrity();
idGenerationLocation = result.getIDGenerationLocation();
+ commitInfoStorage = result.getCommitInfoStorage();
}
public InternalCDOSession getSession()
@@ -324,6 +327,11 @@ public class CDONet4jSessionConfigurationImpl extends CDOSessionConfigurationImp
return idGenerationLocation;
}
+ public CommitInfoStorage getCommitInfoStorage()
+ {
+ return commitInfoStorage;
+ }
+
public boolean waitWhileInitial(IProgressMonitor monitor)
{
return CDOCommonUtil.waitWhileInitial(this, session, monitor);
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/CDONet4jSessionImpl.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/CDONet4jSessionImpl.java
index 0b991fdb0b..1b94c13fa6 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/CDONet4jSessionImpl.java
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/CDONet4jSessionImpl.java
@@ -191,6 +191,7 @@ public class CDONet4jSessionImpl extends CDOSessionImpl implements org.eclipse.e
{
commitInfoManager.setRepository(repository);
commitInfoManager.setCommitInfoLoader(sessionProtocol);
+ commitInfoManager.setLastCommitOfBranch(null, getLastUpdateTime());
commitInfoManager.activate();
}
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CommitTransactionRequest.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CommitTransactionRequest.java
index 2106db1e39..4b2784e30e 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CommitTransactionRequest.java
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CommitTransactionRequest.java
@@ -17,6 +17,7 @@ package org.eclipse.emf.cdo.internal.net4j.protocol;
import org.eclipse.emf.cdo.CDOObject;
import org.eclipse.emf.cdo.CDOObjectReference;
import org.eclipse.emf.cdo.common.branch.CDOBranch;
+import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
import org.eclipse.emf.cdo.common.commit.CDOCommitData;
import org.eclipse.emf.cdo.common.id.CDOID;
import org.eclipse.emf.cdo.common.id.CDOIDProvider;
@@ -76,6 +77,8 @@ public class CommitTransactionRequest extends CDOClientRequestWithMonitoring<Com
private final String commitComment;
+ private CDOBranchPoint commitMergeSource;
+
private final CDOCommitData commitData;
private final Collection<CDOLob<?>> lobs;
@@ -114,6 +117,7 @@ public class CommitTransactionRequest extends CDOClientRequestWithMonitoring<Com
}
commitComment = context.getCommitComment();
+ commitMergeSource = context.getCommitMergeSource();
commitData = context.getCommitData();
lobs = context.getLobs();
locksOnNewObjects = context.getLocksOnNewObjects();
@@ -156,6 +160,17 @@ public class CommitTransactionRequest extends CDOClientRequestWithMonitoring<Com
out.writeLong(getLastUpdateTime());
out.writeInt(commitNumber);
out.writeString(commitComment);
+
+ if (commitMergeSource != null)
+ {
+ out.writeBoolean(true);
+ out.writeCDOBranchPoint(commitMergeSource);
+ }
+ else
+ {
+ out.writeBoolean(false);
+ }
+
out.writeInt(locksOnNewObjects.size());
out.writeInt(idsToUnlock.size());
out.writeInt(newPackageUnits.size());
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/LoadCommitInfosRequest.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/LoadCommitInfosRequest.java
index e463256958..6a32387b4c 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/LoadCommitInfosRequest.java
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/LoadCommitInfosRequest.java
@@ -11,6 +11,7 @@
package org.eclipse.emf.cdo.internal.net4j.protocol;
import org.eclipse.emf.cdo.common.branch.CDOBranch;
+import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
import org.eclipse.emf.cdo.common.commit.CDOCommitInfo;
import org.eclipse.emf.cdo.common.commit.CDOCommitInfoHandler;
import org.eclipse.emf.cdo.common.protocol.CDODataInput;
@@ -72,10 +73,11 @@ public class LoadCommitInfosRequest extends CDOClientRequest<Boolean>
long timeStamp = in.readLong();
String userID = in.readString();
String comment = in.readString();
+ CDOBranchPoint mergeSource = in.readBoolean() ? in.readCDOBranchPoint() : null;
try
{
- CDOCommitInfo commitInfo = manager.createCommitInfo(branch, timeStamp, id, userID, comment, null);
+ CDOCommitInfo commitInfo = manager.createCommitInfo(branch, timeStamp, id, userID, comment, mergeSource, null);
handler.handleCommitInfo(commitInfo);
}
catch (Exception ex)
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/ResetTransactionRequest.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/ResetTransactionRequest.java
index 140bd4c873..0bad95d223 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/ResetTransactionRequest.java
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/ResetTransactionRequest.java
@@ -66,7 +66,7 @@ public class ResetTransactionRequest extends CDOClientRequest<CDOCommitInfo>
long previousTimeStamp = in.readLong();
InternalCDOCommitInfoManager commitInfoManager = getSession().getCommitInfoManager();
- return commitInfoManager.createCommitInfo(null, timeStamp, previousTimeStamp, null, null, null);
+ return commitInfoManager.createCommitInfo(null, timeStamp, previousTimeStamp, null, null, null, null);
}
return null;
diff --git a/plugins/org.eclipse.emf.cdo.server.admin/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.server.admin/META-INF/MANIFEST.MF
index cc4f36f410..3da03bea82 100644
--- a/plugins/org.eclipse.emf.cdo.server.admin/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.server.admin/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.emf.cdo.server.admin;singleton:=true
-Bundle-Version: 4.2.200.qualifier
+Bundle-Version: 4.2.300.qualifier
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-Localization: plugin
@@ -17,11 +17,11 @@ Require-Bundle: org.eclipse.core.runtime;resolution:=optional;bundle-version="[3
org.eclipse.emf.cdo.server.security;bundle-version="[4.3.0,5.0.0)",
org.eclipse.emf.cdo.security;bundle-version="[4.3.0,5.0.0)",
org.eclipse.net4j.jvm;bundle-version="[4.1.100,5.0.0)";resolution:=optional
-Export-Package: org.eclipse.emf.cdo.server.admin;version="4.2.200",
- org.eclipse.emf.cdo.server.internal.admin;x-internal:=true;version="4.2.200",
- org.eclipse.emf.cdo.server.internal.admin.bundle;x-internal:=true;version="4.2.200",
- org.eclipse.emf.cdo.server.internal.admin.protocol;x-internal:=true;version="4.2.200",
- org.eclipse.emf.cdo.server.spi.admin;version="4.2.200",
- org.eclipse.emf.cdo.server.internal.admin.catalog;x-internal:=true;version="4.2.200",
- org.eclipse.emf.cdo.server.internal.admin.catalog.impl;x-internal:=true;version="4.2.200",
- org.eclipse.emf.cdo.server.internal.admin.catalog.util;x-internal:=true;version="4.2.200"
+Export-Package: org.eclipse.emf.cdo.server.admin;version="4.2.300",
+ org.eclipse.emf.cdo.server.internal.admin;x-internal:=true;version="4.2.300",
+ org.eclipse.emf.cdo.server.internal.admin.bundle;x-internal:=true;version="4.2.300",
+ org.eclipse.emf.cdo.server.internal.admin.protocol;x-internal:=true;version="4.2.300",
+ org.eclipse.emf.cdo.server.spi.admin;version="4.2.300",
+ org.eclipse.emf.cdo.server.internal.admin.catalog;x-internal:=true;version="4.2.300",
+ org.eclipse.emf.cdo.server.internal.admin.catalog.impl;x-internal:=true;version="4.2.300",
+ org.eclipse.emf.cdo.server.internal.admin.catalog.util;x-internal:=true;version="4.2.300"
diff --git a/plugins/org.eclipse.emf.cdo.server.admin/src/org/eclipse/emf/cdo/server/internal/admin/CDOAdminServerRepository.java b/plugins/org.eclipse.emf.cdo.server.admin/src/org/eclipse/emf/cdo/server/internal/admin/CDOAdminServerRepository.java
index 3fcce7e6d6..061adc65f5 100644
--- a/plugins/org.eclipse.emf.cdo.server.admin/src/org/eclipse/emf/cdo/server/internal/admin/CDOAdminServerRepository.java
+++ b/plugins/org.eclipse.emf.cdo.server.admin/src/org/eclipse/emf/cdo/server/internal/admin/CDOAdminServerRepository.java
@@ -199,6 +199,11 @@ public class CDOAdminServerRepository extends Notifier implements CDOAdminReposi
return delegate.getIDGenerationLocation();
}
+ public CommitInfoStorage getCommitInfoStorage()
+ {
+ return delegate.getCommitInfoStorage();
+ }
+
public long getTimeStamp() throws UnsupportedOperationException
{
return delegate.getTimeStamp();
@@ -249,6 +254,7 @@ public class CDOAdminServerRepository extends Notifier implements CDOAdminReposi
out.writeBoolean(isSerializingCommits());
out.writeBoolean(isEnsuringReferentialIntegrity());
out.writeEnum(getIDGenerationLocation());
+ out.writeEnum(getCommitInfoStorage());
}
public void dispose()
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/db/IDBStoreAccessor.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/db/IDBStoreAccessor.java
index 3c1bd04c72..19fb5be943 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/db/IDBStoreAccessor.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/db/IDBStoreAccessor.java
@@ -24,7 +24,7 @@ import java.sql.Connection;
* @noextend This interface is not intended to be extended by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
-public interface IDBStoreAccessor extends IStoreAccessor.Raw, UnitSupport
+public interface IDBStoreAccessor extends IStoreAccessor.Raw2, UnitSupport
{
public IDBStore getStore();
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/CDODBSchema.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/CDODBSchema.java
index a72dda6515..6dd6f157f6 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/CDODBSchema.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/CDODBSchema.java
@@ -135,39 +135,6 @@ public class CDODBSchema
+ " FROM " + BRANCHES + " WHERE " + BRANCHES_ID + " BETWEEN ? AND ? ORDER BY " + BRANCHES_ID; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
/**
- * DBTable cdo_commit_infos
- */
- public static final IDBTable COMMIT_INFOS = INSTANCE.addTable("cdo_commit_infos"); //$NON-NLS-1$
-
- public static final IDBField COMMIT_INFOS_TIMESTAMP = //
- COMMIT_INFOS.addField("commit_time", DBType.BIGINT, true); //$NON-NLS-1$
-
- public static final IDBField COMMIT_INFOS_PREVIOUS_TIMESTAMP = //
- COMMIT_INFOS.addField("previous_time", DBType.BIGINT); //$NON-NLS-1$
-
- public static final IDBField COMMIT_INFOS_BRANCH = //
- COMMIT_INFOS.addField("branch_id", DBType.INTEGER); //$NON-NLS-1$
-
- public static final IDBField COMMIT_INFOS_USER = //
- COMMIT_INFOS.addField("user_id", DBType.VARCHAR); //$NON-NLS-1$
-
- public static final IDBField COMMIT_INFOS_COMMENT = //
- COMMIT_INFOS.addField("commit_comment", DBType.VARCHAR); //$NON-NLS-1$
-
- public static final IDBIndex INDEX_COMMIT_INFOS_PK = //
- COMMIT_INFOS.addIndex(IDBIndex.Type.PRIMARY_KEY, COMMIT_INFOS_TIMESTAMP);
-
- public static final IDBIndex INDEX_COMMIT_INFOS_BRANCH = //
- COMMIT_INFOS.addIndex(IDBIndex.Type.NON_UNIQUE, COMMIT_INFOS_BRANCH);
-
- public static final IDBIndex INDEX_COMMIT_INFOS_USER = //
- COMMIT_INFOS.addIndex(IDBIndex.Type.NON_UNIQUE, COMMIT_INFOS_USER);
-
- public static final String SQL_CREATE_COMMIT_INFO = "INSERT INTO " + COMMIT_INFOS + "(" + COMMIT_INFOS_TIMESTAMP //$NON-NLS-1$ //$NON-NLS-2$
- + ", " + COMMIT_INFOS_PREVIOUS_TIMESTAMP + ", " + COMMIT_INFOS_BRANCH + ", " + COMMIT_INFOS_USER + ", " //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- + COMMIT_INFOS_COMMENT + ") " + "VALUES (?, ?, ?, ?, ?)"; //$NON-NLS-2$
-
- /**
* DBTable cdo_lobs
*/
public static final IDBTable LOBS = INSTANCE.addTable("cdo_lobs"); //$NON-NLS-1$
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/CommitInfoTable.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/CommitInfoTable.java
new file mode 100644
index 0000000000..b42431b0a3
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/CommitInfoTable.java
@@ -0,0 +1,370 @@
+/*
+ * Copyright (c) 2016 Eike Stepper (Berlin, Germany) and others.
+ * 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
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.server.internal.db;
+
+import org.eclipse.emf.cdo.common.CDOCommonRepository.CommitInfoStorage;
+import org.eclipse.emf.cdo.common.branch.CDOBranch;
+import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
+import org.eclipse.emf.cdo.common.commit.CDOCommitInfo;
+import org.eclipse.emf.cdo.common.commit.CDOCommitInfoHandler;
+import org.eclipse.emf.cdo.common.protocol.CDODataInput;
+import org.eclipse.emf.cdo.common.protocol.CDODataOutput;
+import org.eclipse.emf.cdo.server.db.IDBStoreAccessor;
+import org.eclipse.emf.cdo.spi.common.branch.InternalCDOBranch;
+import org.eclipse.emf.cdo.spi.common.branch.InternalCDOBranchManager;
+import org.eclipse.emf.cdo.spi.common.commit.CDOCommitInfoUtil;
+import org.eclipse.emf.cdo.spi.common.commit.InternalCDOCommitInfoManager;
+import org.eclipse.emf.cdo.spi.server.InternalRepository;
+
+import org.eclipse.net4j.db.DBException;
+import org.eclipse.net4j.db.DBType;
+import org.eclipse.net4j.db.DBUtil;
+import org.eclipse.net4j.db.IDBDatabase;
+import org.eclipse.net4j.db.IDBDatabase.RunnableWithSchema;
+import org.eclipse.net4j.db.IDBPreparedStatement;
+import org.eclipse.net4j.db.IDBPreparedStatement.ReuseProbability;
+import org.eclipse.net4j.db.ddl.IDBField;
+import org.eclipse.net4j.db.ddl.IDBIndex;
+import org.eclipse.net4j.db.ddl.IDBSchema;
+import org.eclipse.net4j.db.ddl.IDBTable;
+import org.eclipse.net4j.util.lifecycle.Lifecycle;
+import org.eclipse.net4j.util.om.monitor.OMMonitor;
+
+import java.io.IOException;
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+
+/**
+ * @author Eike Stepper
+ * @since 4.6
+ */
+public class CommitInfoTable extends Lifecycle
+{
+ private static final String COMMIT_INFOS = "cdo_commit_infos"; //$NON-NLS-1$
+
+ private static final String TIMESTAMP = "commit_time"; //$NON-NLS-1$
+
+ private static final String PREVIOUS_TIMESTAMP = "previous_time";
+
+ private static final String BRANCH = "branch_id"; //$NON-NLS-1$
+
+ private static final String USER = "user_id"; //$NON-NLS-1$
+
+ private static final String COMMENT = "commit_comment"; //$NON-NLS-1$
+
+ private static final String MERGED_BRANCH = "merged_branch"; //$NON-NLS-1$
+
+ private static final String MERGED_TIMESTAMP = "merged_time"; //$NON-NLS-1$
+
+ private DBStore store;
+
+ private boolean withMergeSource;
+
+ private IDBTable table;
+
+ private String sqlInsert;
+
+ public CommitInfoTable(DBStore store)
+ {
+ this.store = store;
+ }
+
+ public void writeCommitInfo(IDBStoreAccessor accessor, CDOBranch branch, long timeStamp, long previousTimeStamp,
+ String userID, String comment, CDOBranchPoint mergeSource, OMMonitor monitor)
+ {
+ IDBPreparedStatement stmt = accessor.getDBConnection().prepareStatement(sqlInsert, ReuseProbability.HIGH);
+
+ try
+ {
+ stmt.setLong(1, timeStamp);
+ stmt.setLong(2, previousTimeStamp);
+ stmt.setInt(3, branch.getID());
+ stmt.setString(4, userID);
+ stmt.setString(5, comment);
+
+ if (withMergeSource)
+ {
+ if (mergeSource != null)
+ {
+ stmt.setInt(6, mergeSource.getBranch().getID());
+ stmt.setLong(7, mergeSource.getTimeStamp());
+ }
+ else
+ {
+ stmt.setNull(6, DBType.INTEGER.getCode());
+ stmt.setNull(7, DBType.BIGINT.getCode());
+ }
+ }
+
+ DBUtil.update(stmt, true);
+ }
+ catch (SQLException ex)
+ {
+ throw new DBException(ex);
+ }
+ finally
+ {
+ DBUtil.close(stmt);
+ }
+ }
+
+ public void loadCommitInfos(IDBStoreAccessor accessor, CDOBranch branch, long startTime, long endTime,
+ CDOCommitInfoHandler handler)
+ {
+ int count = CDOCommitInfoUtil.decodeCount(endTime);
+
+ StringBuilder builder = new StringBuilder();
+ builder.append("SELECT "); //$NON-NLS-1$
+ builder.append(TIMESTAMP);
+ builder.append(", "); //$NON-NLS-1$
+ builder.append(PREVIOUS_TIMESTAMP);
+ builder.append(", "); //$NON-NLS-1$
+ builder.append(USER);
+ builder.append(", "); //$NON-NLS-1$
+ builder.append(COMMENT);
+
+ if (branch == null)
+ {
+ builder.append(", "); //$NON-NLS-1$
+ builder.append(BRANCH);
+ }
+
+ if (withMergeSource)
+ {
+ builder.append(", "); //$NON-NLS-1$
+ builder.append(MERGED_BRANCH);
+ builder.append(", "); //$NON-NLS-1$
+ builder.append(MERGED_TIMESTAMP);
+ }
+
+ builder.append(" FROM "); //$NON-NLS-1$
+ builder.append(COMMIT_INFOS);
+ boolean where = false;
+
+ if (branch != null)
+ {
+ builder.append(where ? " AND " : " WHERE "); //$NON-NLS-1$ //$NON-NLS-2$
+ builder.append(BRANCH);
+ builder.append("="); //$NON-NLS-1$
+ builder.append(branch.getID());
+ where = true;
+ }
+
+ if (startTime != CDOBranchPoint.UNSPECIFIED_DATE)
+ {
+ builder.append(where ? " AND " : " WHERE "); //$NON-NLS-1$ //$NON-NLS-2$
+ builder.append(TIMESTAMP);
+ builder.append(count < 0 ? "<=" : ">="); //$NON-NLS-1$
+ builder.append(startTime);
+ where = true;
+ }
+
+ if (endTime > CDOBranchPoint.UNSPECIFIED_DATE)
+ {
+ builder.append(where ? " AND " : " WHERE "); //$NON-NLS-1$ //$NON-NLS-2$
+ builder.append(TIMESTAMP);
+ builder.append("<="); //$NON-NLS-1$
+ builder.append(endTime);
+ where = true;
+ }
+
+ builder.append(" ORDER BY "); //$NON-NLS-1$
+ builder.append(TIMESTAMP);
+ builder.append(count < 0 || CDOBranchPoint.UNSPECIFIED_DATE <= endTime && endTime <= startTime ? " DESC" : " ASC"); //$NON-NLS-1$
+ String sql = builder.toString();
+
+ IDBPreparedStatement stmt = accessor.getDBConnection().prepareStatement(sql, ReuseProbability.LOW);
+ ResultSet resultSet = null;
+
+ InternalRepository repository = store.getRepository();
+ InternalCDOBranchManager branchManager = repository.getBranchManager();
+ InternalCDOCommitInfoManager commitInfoManager = repository.getCommitInfoManager();
+ count = Math.abs(count);
+
+ try
+ {
+ resultSet = stmt.executeQuery();
+ while (count-- > 0 && resultSet.next())
+ {
+ int column = 0;
+
+ long timeStamp = resultSet.getLong(++column);
+ long previousTimeStamp = resultSet.getLong(++column);
+ String userID = resultSet.getString(++column);
+ String comment = resultSet.getString(++column);
+
+ CDOBranch infoBranch = branch;
+ if (infoBranch == null)
+ {
+ int id = resultSet.getInt(++column);
+ infoBranch = branchManager.getBranch(id);
+ }
+
+ CDOBranchPoint mergeSource = null;
+ if (withMergeSource)
+ {
+ int id = resultSet.getInt(++column);
+ if (!resultSet.wasNull())
+ {
+ InternalCDOBranch mergedBranch = branchManager.getBranch(id);
+
+ long mergedTimeStamp = resultSet.getLong(++column);
+ mergeSource = mergedBranch.getPoint(mergedTimeStamp);
+ }
+ }
+
+ CDOCommitInfo commitInfo = commitInfoManager.createCommitInfo(infoBranch, timeStamp, previousTimeStamp, userID,
+ comment, mergeSource, null);
+ handler.handleCommitInfo(commitInfo);
+ }
+ }
+ catch (SQLException ex)
+ {
+ throw new DBException(ex);
+ }
+ finally
+ {
+ DBUtil.close(resultSet);
+ DBUtil.close(stmt);
+ }
+ }
+
+ public void rawExport(Connection connection, CDODataOutput out, long fromCommitTime, long toCommitTime)
+ throws IOException
+ {
+ out.writeBoolean(withMergeSource);
+
+ String where = " WHERE " + TIMESTAMP + " BETWEEN " + fromCommitTime + " AND " + toCommitTime;
+ DBUtil.serializeTable(out, connection, table, null, where);
+ }
+
+ public void rawImport(Connection connection, CDODataInput in, long fromCommitTime, long toCommitTime,
+ OMMonitor monitor) throws IOException
+ {
+ boolean actualWithMergeSource = in.readBoolean();
+ if (actualWithMergeSource != withMergeSource)
+ {
+ throw new IllegalStateException("Commit info data mismatch. Expected: " + (withMergeSource ? "with" : "without")
+ + " merge source. Actual: " + (actualWithMergeSource ? "with" : "without") + " merge source.");
+ }
+
+ DBUtil.deserializeTable(in, connection, table, monitor.fork());
+ }
+
+ public void repairAfterCrash(Connection connection)
+ {
+ IDBField timeStampField = table.getField(TIMESTAMP);
+
+ long lastCommitTime = DBUtil.selectMaximumLong(connection, timeStampField);
+ long lastNonLocalCommitTime = DBUtil.selectMaximumLong(connection, timeStampField,
+ CDOBranch.MAIN_BRANCH_ID + "<=" + BRANCH);
+
+ if (lastNonLocalCommitTime == CDOBranchPoint.UNSPECIFIED_DATE)
+ {
+ lastNonLocalCommitTime = lastCommitTime;
+ }
+
+ store.setLastCommitTime(lastCommitTime);
+ store.setLastNonLocalCommitTime(lastNonLocalCommitTime);
+ }
+
+ @Override
+ protected void doActivate() throws Exception
+ {
+ super.doActivate();
+
+ InternalRepository repository = store.getRepository();
+ withMergeSource = repository.getCommitInfoStorage() == CommitInfoStorage.WITH_MERGE_SOURCE;
+
+ IDBDatabase database = store.getDatabase();
+ table = database.getSchema().getTable(COMMIT_INFOS);
+ if (table == null)
+ {
+ database.updateSchema(new RunnableWithSchema()
+ {
+ public void run(IDBSchema schema)
+ {
+ table = schema.addTable(COMMIT_INFOS);
+ table.addField(TIMESTAMP, DBType.BIGINT, true);
+ table.addField(PREVIOUS_TIMESTAMP, DBType.BIGINT);
+ table.addField(BRANCH, DBType.INTEGER);
+ table.addField(USER, DBType.VARCHAR);
+ table.addField(COMMENT, DBType.VARCHAR);
+ table.addIndex(IDBIndex.Type.PRIMARY_KEY, TIMESTAMP);
+ table.addIndex(IDBIndex.Type.NON_UNIQUE, BRANCH);
+
+ if (withMergeSource)
+ {
+ table.addField(MERGED_BRANCH, DBType.INTEGER);
+ table.addField(MERGED_TIMESTAMP, DBType.BIGINT);
+ table.addIndex(IDBIndex.Type.NON_UNIQUE, MERGED_BRANCH, MERGED_TIMESTAMP);
+ }
+ }
+ });
+ }
+ else
+ {
+ if (withMergeSource && table.getField(MERGED_BRANCH) == null)
+ {
+ database.updateSchema(new RunnableWithSchema()
+ {
+ public void run(IDBSchema schema)
+ {
+ IDBTable table = schema.getTable(COMMIT_INFOS);
+ table.addField(MERGED_BRANCH, DBType.INTEGER);
+ table.addField(MERGED_TIMESTAMP, DBType.BIGINT);
+ table.addIndex(IDBIndex.Type.NON_UNIQUE, MERGED_BRANCH, MERGED_TIMESTAMP);
+ }
+ });
+ }
+ }
+
+ StringBuilder builder = new StringBuilder();
+ builder.append("INSERT INTO "); //$NON-NLS-1$
+ builder.append(COMMIT_INFOS);
+ builder.append("("); //$NON-NLS-1$
+ builder.append(TIMESTAMP);
+ builder.append(", "); //$NON-NLS-1$
+ builder.append(PREVIOUS_TIMESTAMP);
+ builder.append(", "); //$NON-NLS-1$
+ builder.append(BRANCH);
+ builder.append(", "); //$NON-NLS-1$
+ builder.append(USER);
+ builder.append(", "); //$NON-NLS-1$
+ builder.append(COMMENT);
+
+ if (withMergeSource)
+ {
+ builder.append(", "); //$NON-NLS-1$
+ builder.append(MERGED_BRANCH);
+ builder.append(", "); //$NON-NLS-1$
+ builder.append(MERGED_TIMESTAMP);
+ }
+
+ builder.append(") VALUES (?, ?, ?, ?, ?"); //$NON-NLS-1$
+ if (withMergeSource)
+ {
+ builder.append(", ?, ?"); //$NON-NLS-1$
+ }
+
+ builder.append(")"); //$NON-NLS-1$
+ sqlInsert = builder.toString();
+ }
+
+ @Override
+ protected void doDeactivate() throws Exception
+ {
+ sqlInsert = null;
+ table = null;
+ super.doDeactivate();
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStore.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStore.java
index d5a314979b..15e383d1f3 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStore.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStore.java
@@ -14,6 +14,7 @@
*/
package org.eclipse.emf.cdo.server.internal.db;
+import org.eclipse.emf.cdo.common.CDOCommonRepository.CommitInfoStorage;
import org.eclipse.emf.cdo.common.CDOCommonRepository.IDGenerationLocation;
import org.eclipse.emf.cdo.common.branch.CDOBranch;
import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
@@ -80,6 +81,10 @@ public class DBStore extends Store implements IDBStore, IMappingConstants, CDOAl
public static final int SCHEMA_VERSION = 4;
+ // public static final int SCHEMA_VERSION = 3; // Bug 404047: Indexed columns must be NOT NULL.
+ // public static final int SCHEMA_VERSION = 2; // Bug 344232: Rename cdo_lobs.size to cdo_lobs.lsize.
+ // public static final int SCHEMA_VERSION = 1; // Bug 351068: Delete detached objects from non-auditing stores.
+
private static final int FIRST_START = -1;
private static final String PROP_SCHEMA_VERSION = "org.eclipse.emf.cdo.server.db.schemaVersion"; //$NON-NLS-1$
@@ -118,6 +123,8 @@ public class DBStore extends Store implements IDBStore, IMappingConstants, CDOAl
private DurableLockingManager durableLockingManager = new DurableLockingManager(this);
+ private CommitInfoTable commitInfoTable;
+
private UnitMappingTable unitMappingTable;
private IMappingStrategy mappingStrategy;
@@ -247,6 +254,11 @@ public class DBStore extends Store implements IDBStore, IMappingConstants, CDOAl
return durableLockingManager;
}
+ public CommitInfoTable getCommitInfoTable()
+ {
+ return commitInfoTable;
+ }
+
public UnitMappingTable getUnitMappingTable()
{
return unitMappingTable;
@@ -667,6 +679,12 @@ public class DBStore extends Store implements IDBStore, IMappingConstants, CDOAl
LifecycleUtil.activate(durableLockingManager);
LifecycleUtil.activate(mappingStrategy);
+ if (repository.getCommitInfoStorage() != CommitInfoStorage.NO)
+ {
+ commitInfoTable = new CommitInfoTable(this);
+ commitInfoTable.activate();
+ }
+
if (repository.isSupportingUnits())
{
unitMappingTable = new UnitMappingTable(mappingStrategy);
@@ -693,6 +711,7 @@ public class DBStore extends Store implements IDBStore, IMappingConstants, CDOAl
protected void doDeactivate() throws Exception
{
LifecycleUtil.deactivate(unitMappingTable);
+ LifecycleUtil.deactivate(commitInfoTable);
LifecycleUtil.deactivate(mappingStrategy);
LifecycleUtil.deactivate(durableLockingManager);
LifecycleUtil.deactivate(metaDataManager);
@@ -799,7 +818,8 @@ public class DBStore extends Store implements IDBStore, IMappingConstants, CDOAl
protected void repairAfterCrash()
{
- String name = getRepository().getName();
+ InternalRepository repository = getRepository();
+ String name = repository.getName();
OM.LOG.warn(MessageFormat.format(Messages.getString("DBStore.9"), name)); //$NON-NLS-1$
Connection connection = getConnection();
@@ -811,7 +831,7 @@ public class DBStore extends Store implements IDBStore, IMappingConstants, CDOAl
mappingStrategy.repairAfterCrash(dbAdapter, connection); // Must update the idHandler
- boolean storeIDs = getRepository().getIDGenerationLocation() == IDGenerationLocation.STORE;
+ boolean storeIDs = repository.getIDGenerationLocation() == IDGenerationLocation.STORE;
CDOID lastObjectID = storeIDs ? idHandler.getLastObjectID() : CDOID.NULL;
CDOID nextLocalObjectID = storeIDs ? idHandler.getNextLocalObjectID() : CDOID.NULL;
@@ -821,12 +841,63 @@ public class DBStore extends Store implements IDBStore, IMappingConstants, CDOAl
int localBranchID = DBUtil.selectMinimumInt(connection, CDODBSchema.BRANCHES_ID);
setLastLocalBranchID(localBranchID < 0 ? localBranchID : 0);
- long lastCommitTime = DBUtil.selectMaximumLong(connection, CDODBSchema.COMMIT_INFOS_TIMESTAMP);
- setLastCommitTime(lastCommitTime);
+ if (commitInfoTable != null)
+ {
+ commitInfoTable.repairAfterCrash(connection);
+ }
+ else
+ {
+ boolean branching = repository.isSupportingBranches();
+
+ long lastCommitTime = CDOBranchPoint.UNSPECIFIED_DATE;
+ long lastNonLocalCommitTime = CDOBranchPoint.UNSPECIFIED_DATE;
- long lastNonLocalCommitTime = DBUtil.selectMaximumLong(connection, CDODBSchema.COMMIT_INFOS_TIMESTAMP,
- CDOBranch.MAIN_BRANCH_ID + "<=" + CDODBSchema.COMMIT_INFOS_BRANCH);
- setLastNonLocalCommitTime(lastNonLocalCommitTime);
+ // Unfortunately the package registry is still inactive, so the class mappings can not be used at this point.
+ // Use all tables with a "CDO_CREATED" field instead.
+ for (String tableName : DBUtil.getAllTableNames(connection, repository.getName()))
+ {
+ try
+ {
+ if (CDODBSchema.CDO_OBJECTS.equals(tableName))
+ {
+ continue;
+ }
+
+ IDBTable table = database.getSchema().getTable(tableName);
+ IDBField createdField = table.getField(IMappingConstants.ATTRIBUTES_CREATED);
+ if (createdField == null)
+ {
+ continue;
+ }
+
+ if (branching)
+ {
+ IDBField branchField = table.getField(IMappingConstants.ATTRIBUTES_BRANCH);
+ if (branchField == null)
+ {
+ continue;
+ }
+
+ lastNonLocalCommitTime = Math.max(lastNonLocalCommitTime, DBUtil.selectMaximumLong(connection,
+ branchField, CDOBranch.MAIN_BRANCH_ID + "<=" + IMappingConstants.ATTRIBUTES_BRANCH));
+ }
+
+ lastCommitTime = Math.max(lastCommitTime, DBUtil.selectMaximumLong(connection, createdField));
+ }
+ catch (Exception ex)
+ {
+ OM.LOG.warn(ex.getMessage());
+ }
+ }
+
+ if (lastNonLocalCommitTime == CDOBranchPoint.UNSPECIFIED_DATE)
+ {
+ lastNonLocalCommitTime = lastCommitTime;
+ }
+
+ setLastCommitTime(lastCommitTime);
+ setLastNonLocalCommitTime(lastNonLocalCommitTime);
+ }
if (storeIDs)
{
@@ -994,8 +1065,10 @@ public class DBStore extends Store implements IDBStore, IMappingConstants, CDOAl
}
};
+ private static final SchemaMigrator NULLABLE_COLUMNS_MIGRATION = null;
+
private static final SchemaMigrator[] SCHEMA_MIGRATORS = { NO_MIGRATION_NEEDED, NON_AUDIT_MIGRATION,
- LOB_SIZE_MIGRATION, NO_MIGRATION_NEEDED };
+ LOB_SIZE_MIGRATION, NULLABLE_COLUMNS_MIGRATION };
static
{
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreAccessor.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreAccessor.java
index 80f45e7846..2b3c84870e 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreAccessor.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreAccessor.java
@@ -19,7 +19,6 @@ import org.eclipse.emf.cdo.common.branch.CDOBranch;
import org.eclipse.emf.cdo.common.branch.CDOBranchHandler;
import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
import org.eclipse.emf.cdo.common.branch.CDOBranchVersion;
-import org.eclipse.emf.cdo.common.commit.CDOCommitInfo;
import org.eclipse.emf.cdo.common.commit.CDOCommitInfoHandler;
import org.eclipse.emf.cdo.common.id.CDOID;
import org.eclipse.emf.cdo.common.lob.CDOLobHandler;
@@ -55,8 +54,6 @@ import org.eclipse.emf.cdo.spi.common.branch.InternalCDOBranch;
import org.eclipse.emf.cdo.spi.common.branch.InternalCDOBranchManager;
import org.eclipse.emf.cdo.spi.common.branch.InternalCDOBranchManager.BranchLoader3;
import org.eclipse.emf.cdo.spi.common.commit.CDOChangeSetSegment;
-import org.eclipse.emf.cdo.spi.common.commit.CDOCommitInfoUtil;
-import org.eclipse.emf.cdo.spi.common.commit.InternalCDOCommitInfoManager;
import org.eclipse.emf.cdo.spi.common.model.InternalCDOPackageRegistry;
import org.eclipse.emf.cdo.spi.common.model.InternalCDOPackageUnit;
import org.eclipse.emf.cdo.spi.common.revision.DetachedCDORevision;
@@ -166,7 +163,7 @@ public class DBStoreAccessor extends StoreAccessor implements IDBStoreAccessor,
public IDBPreparedStatement getPreparedStatement(String sql, ReuseProbability reuseProbability)
{
org.eclipse.net4j.db.IDBPreparedStatement.ReuseProbability converted = //
- org.eclipse.net4j.db.IDBPreparedStatement.ReuseProbability.values()[reuseProbability.ordinal()];
+ org.eclipse.net4j.db.IDBPreparedStatement.ReuseProbability.values()[reuseProbability.ordinal()];
return connection.prepareStatement(sql, converted);
}
@@ -504,29 +501,23 @@ public class DBStoreAccessor extends StoreAccessor implements IDBStoreAccessor,
}
}
+ @Deprecated
@Override
protected void writeCommitInfo(CDOBranch branch, long timeStamp, long previousTimeStamp, String userID,
String comment, OMMonitor monitor)
{
- IDBPreparedStatement stmt = connection.prepareStatement(CDODBSchema.SQL_CREATE_COMMIT_INFO, ReuseProbability.HIGH);
-
- try
- {
- stmt.setLong(1, timeStamp);
- stmt.setLong(2, previousTimeStamp);
- stmt.setInt(3, branch.getID());
- stmt.setString(4, userID);
- stmt.setString(5, comment);
+ writeCommitInfo(branch, timeStamp, previousTimeStamp, userID, comment, null, monitor);
+ }
- DBUtil.update(stmt, true);
- }
- catch (SQLException ex)
- {
- throw new DBException(ex);
- }
- finally
+ @Override
+ protected void writeCommitInfo(CDOBranch branch, long timeStamp, long previousTimeStamp, String userID,
+ String comment, CDOBranchPoint mergeSource, OMMonitor monitor)
+ {
+ CommitInfoTable commitInfoTable = getStore().getCommitInfoTable();
+ if (commitInfoTable != null)
{
- DBUtil.close(stmt);
+ commitInfoTable.writeCommitInfo(this, branch, timeStamp, previousTimeStamp, userID, comment, mergeSource,
+ monitor);
}
}
@@ -1089,101 +1080,10 @@ public class DBStoreAccessor extends StoreAccessor implements IDBStoreAccessor,
public void loadCommitInfos(CDOBranch branch, long startTime, long endTime, CDOCommitInfoHandler handler)
{
- int count = CDOCommitInfoUtil.decodeCount(endTime);
-
- StringBuilder builder = new StringBuilder();
- builder.append("SELECT "); //$NON-NLS-1$
- builder.append(CDODBSchema.COMMIT_INFOS_TIMESTAMP);
- builder.append(", "); //$NON-NLS-1$
- builder.append(CDODBSchema.COMMIT_INFOS_PREVIOUS_TIMESTAMP);
- builder.append(", "); //$NON-NLS-1$
- builder.append(CDODBSchema.COMMIT_INFOS_USER);
- builder.append(", "); //$NON-NLS-1$
- builder.append(CDODBSchema.COMMIT_INFOS_COMMENT);
- if (branch == null)
+ CommitInfoTable commitInfoTable = getStore().getCommitInfoTable();
+ if (commitInfoTable != null)
{
- builder.append(", "); //$NON-NLS-1$
- builder.append(CDODBSchema.COMMIT_INFOS_BRANCH);
- }
-
- builder.append(" FROM "); //$NON-NLS-1$
- builder.append(CDODBSchema.COMMIT_INFOS);
- boolean where = false;
-
- if (branch != null)
- {
- builder.append(where ? " AND " : " WHERE "); //$NON-NLS-1$ //$NON-NLS-2$
- builder.append(CDODBSchema.COMMIT_INFOS_BRANCH);
- builder.append("="); //$NON-NLS-1$
- builder.append(branch.getID());
- where = true;
- }
-
- if (startTime != CDOBranchPoint.UNSPECIFIED_DATE)
- {
- builder.append(where ? " AND " : " WHERE "); //$NON-NLS-1$ //$NON-NLS-2$
- builder.append(CDODBSchema.COMMIT_INFOS_TIMESTAMP);
- builder.append(count < 0 ? "<=" : ">="); //$NON-NLS-1$
- builder.append(startTime);
- where = true;
- }
-
- if (endTime > CDOBranchPoint.UNSPECIFIED_DATE)
- {
- builder.append(where ? " AND " : " WHERE "); //$NON-NLS-1$ //$NON-NLS-2$
- builder.append(CDODBSchema.COMMIT_INFOS_TIMESTAMP);
- builder.append("<="); //$NON-NLS-1$
- builder.append(endTime);
- where = true;
- }
-
- builder.append(" ORDER BY "); //$NON-NLS-1$
- builder.append(CDODBSchema.COMMIT_INFOS_TIMESTAMP);
- builder.append(count < 0 || CDOBranchPoint.UNSPECIFIED_DATE <= endTime && endTime <= startTime ? " DESC" : " ASC"); //$NON-NLS-1$
- String sql = builder.toString();
-
- IDBPreparedStatement stmt = connection.prepareStatement(sql, ReuseProbability.MEDIUM);
- ResultSet resultSet = null;
-
- InternalRepository repository = getStore().getRepository();
- InternalCDOBranchManager branchManager = repository.getBranchManager();
- InternalCDOCommitInfoManager commitInfoManager = repository.getCommitInfoManager();
- count = Math.abs(count);
-
- try
- {
- resultSet = stmt.executeQuery();
- while (resultSet.next())
- {
- long timeStamp = resultSet.getLong(1);
- long previousTimeStamp = resultSet.getLong(2);
- String userID = resultSet.getString(3);
- String comment = resultSet.getString(4);
- CDOBranch infoBranch = branch;
- if (infoBranch == null)
- {
- int id = resultSet.getInt(5);
- infoBranch = branchManager.getBranch(id);
- }
-
- CDOCommitInfo commitInfo = commitInfoManager.createCommitInfo(infoBranch, timeStamp, previousTimeStamp, userID,
- comment, null);
- handler.handleCommitInfo(commitInfo);
-
- if (--count == 0)
- {
- break;
- }
- }
- }
- catch (SQLException ex)
- {
- throw new DBException(ex);
- }
- finally
- {
- DBUtil.close(resultSet);
- DBUtil.close(stmt);
+ commitInfoTable.loadCommitInfos(this, branch, startTime, endTime, handler);
}
}
@@ -1204,7 +1104,9 @@ public class DBStoreAccessor extends StoreAccessor implements IDBStoreAccessor,
throws IOException
{
DBStore store = getStore();
- if (store.getRepository().getIDGenerationLocation() == IDGenerationLocation.STORE)
+ InternalRepository repository = store.getRepository();
+
+ if (repository.getIDGenerationLocation() == IDGenerationLocation.STORE)
{
out.writeCDOID(store.getIDHandler().getLastObjectID()); // See bug 325097
}
@@ -1214,8 +1116,16 @@ public class DBStoreAccessor extends StoreAccessor implements IDBStoreAccessor,
String where = " WHERE " + CDODBSchema.BRANCHES_ID + " BETWEEN " + fromBranchID + " AND " + toBranchID;
DBUtil.serializeTable(out, connection, CDODBSchema.BRANCHES, null, where);
- where = " WHERE " + CDODBSchema.COMMIT_INFOS_TIMESTAMP + " BETWEEN " + fromCommitTime + " AND " + toCommitTime;
- DBUtil.serializeTable(out, connection, CDODBSchema.COMMIT_INFOS, null, where);
+ CommitInfoTable commitInfoTable = store.getCommitInfoTable();
+ if (commitInfoTable != null)
+ {
+ out.writeBoolean(true);
+ commitInfoTable.rawExport(connection, out, fromCommitTime, toCommitTime);
+ }
+ else
+ {
+ out.writeBoolean(false);
+ }
DurableLockingManager durableLockingManager = store.getDurableLockingManager();
durableLockingManager.rawExport(connection, out, fromCommitTime, toCommitTime);
@@ -1251,7 +1161,24 @@ public class DBStoreAccessor extends StoreAccessor implements IDBStoreAccessor,
try
{
DBUtil.deserializeTable(in, connection, CDODBSchema.BRANCHES, monitor.fork());
- DBUtil.deserializeTable(in, connection, CDODBSchema.COMMIT_INFOS, monitor.fork());
+
+ CommitInfoTable commitInfoTable = store.getCommitInfoTable();
+ if (in.readBoolean())
+ {
+ if (commitInfoTable == null)
+ {
+ throw new IllegalStateException("Commit info table is missing");
+ }
+
+ commitInfoTable.rawImport(connection, in, fromCommitTime, toCommitTime, monitor.fork());
+ }
+ else
+ {
+ if (commitInfoTable != null)
+ {
+ throw new IllegalStateException("Commit info data is expected but missing");
+ }
+ }
DurableLockingManager durableLockingManager = store.getDurableLockingManager();
durableLockingManager.rawImport(connection, in, fromCommitTime, toCommitTime, monitor.fork());
@@ -1308,7 +1235,7 @@ public class DBStoreAccessor extends StoreAccessor implements IDBStoreAccessor,
Connection connection = getConnection();
Collection<InternalCDOPackageUnit> imported = //
- metaDataManager.rawImport(connection, in, fromCommitTime, toCommitTime, monitor.fork());
+ metaDataManager.rawImport(connection, in, fromCommitTime, toCommitTime, monitor.fork());
packageUnits.addAll(imported);
if (!packageUnits.isEmpty())
@@ -1390,7 +1317,13 @@ public class DBStoreAccessor extends StoreAccessor implements IDBStoreAccessor,
public void rawStore(CDOBranch branch, long timeStamp, long previousTimeStamp, String userID, String comment,
OMMonitor monitor)
{
- writeCommitInfo(branch, timeStamp, previousTimeStamp, userID, comment, monitor);
+ writeCommitInfo(branch, timeStamp, previousTimeStamp, userID, comment, null, monitor);
+ }
+
+ public void rawStore(CDOBranch branch, long timeStamp, long previousTimeStamp, String userID, String comment,
+ CDOBranchPoint mergeSource, OMMonitor monitor)
+ {
+ writeCommitInfo(branch, timeStamp, previousTimeStamp, userID, comment, mergeSource, monitor);
}
public void rawDelete(CDOID id, int version, CDOBranch branch, EClass eClass, OMMonitor monitor)
diff --git a/plugins/org.eclipse.emf.cdo.server.db4o/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.server.db4o/META-INF/MANIFEST.MF
index feaeb28fcf..233e623a4b 100644
--- a/plugins/org.eclipse.emf.cdo.server.db4o/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.server.db4o/META-INF/MANIFEST.MF
@@ -2,13 +2,13 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.emf.cdo.server.db4o;singleton:=true
-Bundle-Version: 4.0.300.qualifier
+Bundle-Version: 4.0.400.qualifier
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Require-Bundle: org.eclipse.emf.cdo.server;bundle-version="[4.0.0,5.0.0)";visibility:=reexport
-Export-Package: org.eclipse.emf.cdo.server.db4o;version="4.0.300",
- org.eclipse.emf.cdo.server.internal.db4o;version="4.0.300";x-friends:="org.eclipse.emf.cdo.tests.db4o",
- org.eclipse.emf.cdo.server.internal.db4o.bundle;version="4.0.300";x-internal:=true
+Export-Package: org.eclipse.emf.cdo.server.db4o;version="4.0.400",
+ org.eclipse.emf.cdo.server.internal.db4o;version="4.0.400";x-friends:="org.eclipse.emf.cdo.tests.db4o",
+ org.eclipse.emf.cdo.server.internal.db4o.bundle;version="4.0.400";x-internal:=true
Import-Package: com.db4o;version="[7.4.0,9.0.0)",
com.db4o.config;version="[7.4.0,9.0.0)",
com.db4o.constraints;version="[7.4.0,9.0.0)",
diff --git a/plugins/org.eclipse.emf.cdo.server.db4o/src/org/eclipse/emf/cdo/server/internal/db4o/DB4OCommitInfo.java b/plugins/org.eclipse.emf.cdo.server.db4o/src/org/eclipse/emf/cdo/server/internal/db4o/DB4OCommitInfo.java
index 2f35583f9a..01c1a74948 100644
--- a/plugins/org.eclipse.emf.cdo.server.db4o/src/org/eclipse/emf/cdo/server/internal/db4o/DB4OCommitInfo.java
+++ b/plugins/org.eclipse.emf.cdo.server.db4o/src/org/eclipse/emf/cdo/server/internal/db4o/DB4OCommitInfo.java
@@ -55,7 +55,8 @@ public class DB4OCommitInfo
CDOCommitInfoHandler handler)
{
InternalCDOBranch branch = branchManager.getBranch(branchID);
- CDOCommitInfo commitInfo = manager.createCommitInfo(branch, timeStamp, previousTimeStamp, userID, comment, null);
+ CDOCommitInfo commitInfo = manager.createCommitInfo(branch, timeStamp, previousTimeStamp, userID, comment, null,
+ null);
handler.handleCommitInfo(commitInfo);
}
}
diff --git a/plugins/org.eclipse.emf.cdo.server.db4o/src/org/eclipse/emf/cdo/server/internal/db4o/DB4OStoreAccessor.java b/plugins/org.eclipse.emf.cdo.server.db4o/src/org/eclipse/emf/cdo/server/internal/db4o/DB4OStoreAccessor.java
index 07ce6a8e69..6fe2d6850b 100644
--- a/plugins/org.eclipse.emf.cdo.server.db4o/src/org/eclipse/emf/cdo/server/internal/db4o/DB4OStoreAccessor.java
+++ b/plugins/org.eclipse.emf.cdo.server.db4o/src/org/eclipse/emf/cdo/server/internal/db4o/DB4OStoreAccessor.java
@@ -619,6 +619,7 @@ public class DB4OStoreAccessor extends LongIDStoreAccessor implements Raw, Durab
}
}
+ @SuppressWarnings("deprecation")
@Override
protected void writeCommitInfo(CDOBranch branch, long timeStamp, long previousTimeStamp, String userID,
String comment, OMMonitor monitor)
diff --git a/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/HibernateRawCommitContext.java b/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/HibernateRawCommitContext.java
index 6692fb2f87..ab8a2bfcbd 100644
--- a/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/HibernateRawCommitContext.java
+++ b/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/HibernateRawCommitContext.java
@@ -106,6 +106,11 @@ public class HibernateRawCommitContext implements InternalCommitContext
return null;
}
+ public CDOBranchPoint getCommitMergeSource()
+ {
+ return null;
+ }
+
public long getLastUpdateTime()
{
return 0;
@@ -350,6 +355,10 @@ public class HibernateRawCommitContext implements InternalCommitContext
{
}
+ public void setCommitMergeSource(CDOBranchPoint mergeSource)
+ {
+ }
+
public void setLobs(ExtendedDataInputStream in)
{
}
diff --git a/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/HibernateStoreAccessor.java b/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/HibernateStoreAccessor.java
index e4d2b1b940..8bfbd30cf9 100644
--- a/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/HibernateStoreAccessor.java
+++ b/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/HibernateStoreAccessor.java
@@ -491,7 +491,7 @@ public class HibernateStoreAccessor extends StoreAccessor implements IHibernateS
final TeneoAuditCommitInfo teneoCommitInfo = (TeneoAuditCommitInfo)o;
final CDOCommitInfo cdoCommitInfo = commitInfoManager.createCommitInfo(
getStore().getRepository().getBranchManager().getMainBranch(), teneoCommitInfo.getCommitTime(),
- teneoCommitInfo.getCommitTime() - 1, teneoCommitInfo.getUser(), teneoCommitInfo.getComment(), null);
+ teneoCommitInfo.getCommitTime() - 1, teneoCommitInfo.getUser(), teneoCommitInfo.getComment(), null, null);
handler.handleCommitInfo(cdoCommitInfo);
}
}
@@ -680,11 +680,11 @@ public class HibernateStoreAccessor extends StoreAccessor implements IHibernateS
final boolean match = exactMatch || revisionName == null || name == null ? ObjectUtil.equals(revisionName, name)
: revisionName.startsWith(name);
- if (match && !context.addResource(HibernateUtil.getInstance().getCDOID(revision)))
- {
- // No more results allowed
- break;
- }
+ if (match && !context.addResource(HibernateUtil.getInstance().getCDOID(revision)))
+ {
+ // No more results allowed
+ break;
+ }
}
}
}
@@ -769,11 +769,11 @@ public class HibernateStoreAccessor extends StoreAccessor implements IHibernateS
return true;
}
else
- // not mapped
- if (null != eref.getEAnnotation(TENEO_UNMAPPED_SOURCE))
- {
- return false;
- }
+ // not mapped
+ if (null != eref.getEAnnotation(TENEO_UNMAPPED_SOURCE))
+ {
+ return false;
+ }
// not computed yet
for (String propName : session.getSessionFactory().getClassMetadata(entityName).getPropertyNames())
@@ -1148,6 +1148,7 @@ public class HibernateStoreAccessor extends StoreAccessor implements IHibernateS
}
}
+ @SuppressWarnings("deprecation")
@Override
protected void writeCommitInfo(CDOBranch branch, long timeStamp, long previousTimeStamp, String userID,
String comment, OMMonitor monitor)
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.server.lissome/META-INF/MANIFEST.MF
index 96965c1a89..5a816c3f01 100644
--- a/plugins/org.eclipse.emf.cdo.server.lissome/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.emf.cdo.server.lissome;singleton:=true
-Bundle-Version: 4.2.200.qualifier
+Bundle-Version: 4.2.300.qualifier
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-Localization: plugin
@@ -14,9 +14,9 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
org.eclipse.net4j.db.h2;bundle-version="[4.0.0,5.0.0)"
Import-Package: org.h2;version="[1.0.0,2.0.0)",
org.h2.jdbcx;version="[1.0.0,2.0.0)"
-Export-Package: org.eclipse.emf.cdo.server.internal.lissome;version="4.2.200";x-friends:="org.eclipse.emf.cdo.tests.lissome",
- org.eclipse.emf.cdo.server.internal.lissome.bundle;version="4.2.200";x-friends:="org.eclipse.emf.cdo.tests.lissome",
- org.eclipse.emf.cdo.server.internal.lissome.db;version="4.2.200";x-friends:="org.eclipse.emf.cdo.tests.lissome",
- org.eclipse.emf.cdo.server.internal.lissome.file;version="4.2.200";x-friends:="org.eclipse.emf.cdo.tests.lissome",
- org.eclipse.emf.cdo.server.internal.lissome.optimizer;version="4.2.200";x-friends:="org.eclipse.emf.cdo.tests.lissome",
- org.eclipse.emf.cdo.server.lissome;version="4.2.200"
+Export-Package: org.eclipse.emf.cdo.server.internal.lissome;version="4.2.300";x-friends:="org.eclipse.emf.cdo.tests.lissome",
+ org.eclipse.emf.cdo.server.internal.lissome.bundle;version="4.2.300";x-friends:="org.eclipse.emf.cdo.tests.lissome",
+ org.eclipse.emf.cdo.server.internal.lissome.db;version="4.2.300";x-friends:="org.eclipse.emf.cdo.tests.lissome",
+ org.eclipse.emf.cdo.server.internal.lissome.file;version="4.2.300";x-friends:="org.eclipse.emf.cdo.tests.lissome",
+ org.eclipse.emf.cdo.server.internal.lissome.optimizer;version="4.2.300";x-friends:="org.eclipse.emf.cdo.tests.lissome",
+ org.eclipse.emf.cdo.server.lissome;version="4.2.300"
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/file/Journal.java b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/file/Journal.java
index 656e467a32..8400ebca7f 100644
--- a/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/file/Journal.java
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/file/Journal.java
@@ -638,7 +638,7 @@ public class Journal extends LissomeFile
String comment = reader.readString();
InternalCDOCommitInfoManager commitInfoManager = getStore().getRepository().getCommitInfoManager();
- return commitInfoManager.createCommitInfo(branch, timeStamp, previousTimeStamp, userID, comment, null);
+ return commitInfoManager.createCommitInfo(branch, timeStamp, previousTimeStamp, userID, comment, null, null);
}
catch (IOException ex)
{
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/optimizer/CommitTransactionTask.java b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/optimizer/CommitTransactionTask.java
index b63017bd05..2a2ebcd44d 100644
--- a/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/optimizer/CommitTransactionTask.java
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/optimizer/CommitTransactionTask.java
@@ -137,7 +137,7 @@ public class CommitTransactionTask implements OptimizerTask
{
CDOBranch branch = branchPoint.getBranch();
long timeStamp = branchPoint.getTimeStamp();
- return commitInfoManager.createCommitInfo(branch, timeStamp, previousTimeStamp, userID, commitComment, null);
+ return commitInfoManager.createCommitInfo(branch, timeStamp, previousTimeStamp, userID, commitComment, null, null);
}
public void execute(Optimizer optimizer) throws IOException
diff --git a/plugins/org.eclipse.emf.cdo.server.mongodb/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.server.mongodb/META-INF/MANIFEST.MF
index 30eed6b900..bc968bbc34 100644
--- a/plugins/org.eclipse.emf.cdo.server.mongodb/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.server.mongodb/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.emf.cdo.server.mongodb;singleton:=true
-Bundle-Version: 4.0.400.qualifier
+Bundle-Version: 4.0.500.qualifier
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-Localization: plugin
@@ -11,9 +11,9 @@ Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ClassPath: .
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
org.eclipse.emf.cdo.server;bundle-version="[4.0.0,5.0.0)";visibility:=reexport
-Export-Package: org.eclipse.emf.cdo.server.internal.mongodb;version="4.0.400";x-friends:="org.eclipse.emf.cdo.tests,org.eclipse.emf.cdo.tests.mongodb",
- org.eclipse.emf.cdo.server.internal.mongodb.bundle;version="4.0.400";x-internal:=true,
- org.eclipse.emf.cdo.server.mongodb;version="4.0.400"
+Export-Package: org.eclipse.emf.cdo.server.internal.mongodb;version="4.0.500";x-friends:="org.eclipse.emf.cdo.tests,org.eclipse.emf.cdo.tests.mongodb",
+ org.eclipse.emf.cdo.server.internal.mongodb.bundle;version="4.0.500";x-internal:=true,
+ org.eclipse.emf.cdo.server.mongodb;version="4.0.500"
Import-Package: com.mongodb;version="[2.0.0,3.0.0)",
com.mongodb.gridfs;version="[2.0.0,3.0.0)",
com.mongodb.io;version="[2.0.0,3.0.0)",
diff --git a/plugins/org.eclipse.emf.cdo.server.mongodb/src/org/eclipse/emf/cdo/server/internal/mongodb/Commits.java b/plugins/org.eclipse.emf.cdo.server.mongodb/src/org/eclipse/emf/cdo/server/internal/mongodb/Commits.java
index 403d830234..f0aad8462d 100644
--- a/plugins/org.eclipse.emf.cdo.server.mongodb/src/org/eclipse/emf/cdo/server/internal/mongodb/Commits.java
+++ b/plugins/org.eclipse.emf.cdo.server.mongodb/src/org/eclipse/emf/cdo/server/internal/mongodb/Commits.java
@@ -921,7 +921,8 @@ public class Commits extends Coll
String user = (String)doc.get(COMMITS_USER);
String comment = (String)doc.get(COMMITS_COMMENT);
- CDOCommitInfo commitInfo = commitManager.createCommitInfo(commitBranch, time, previous, user, comment, null);
+ CDOCommitInfo commitInfo = commitManager.createCommitInfo(commitBranch, time, previous, user, comment, null,
+ null);
handler.handleCommitInfo(commitInfo);
return null;
}
diff --git a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CommitTransactionIndication.java b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CommitTransactionIndication.java
index facc99bf1f..a5890bb186 100644
--- a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CommitTransactionIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CommitTransactionIndication.java
@@ -128,6 +128,7 @@ public class CommitTransactionIndication extends CDOServerIndicationWithMonitori
long lastUpdateTime = in.readLong();
int commitNumber = in.readInt();
String commitComment = in.readString();
+ CDOBranchPoint commitMergeSource = in.readBoolean() ? in.readCDOBranchPoint() : null;
CDOLockState[] locksOnNewObjects = new CDOLockState[in.readInt()];
CDOID[] idsToUnlock = new CDOID[in.readInt()];
@@ -298,6 +299,7 @@ public class CommitTransactionIndication extends CDOServerIndicationWithMonitori
commitContext.setDetachedObjectTypes(detachedObjectTypes);
commitContext.setDetachedObjectVersions(detachedObjectVersions);
commitContext.setCommitComment(commitComment);
+ commitContext.setCommitMergeSource(commitMergeSource);
commitContext.setLobs(getIndicationStream());
commitContext.setLocksOnNewObjects(locksOnNewObjects);
commitContext.setIDsToUnlock(idsToUnlock);
diff --git a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/LoadCommitInfosIndication.java b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/LoadCommitInfosIndication.java
index 5b5d4fe474..cc3cca4bcd 100644
--- a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/LoadCommitInfosIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/LoadCommitInfosIndication.java
@@ -11,6 +11,7 @@
package org.eclipse.emf.cdo.server.internal.net4j.protocol;
import org.eclipse.emf.cdo.common.branch.CDOBranch;
+import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
import org.eclipse.emf.cdo.common.commit.CDOCommitInfo;
import org.eclipse.emf.cdo.common.commit.CDOCommitInfoHandler;
import org.eclipse.emf.cdo.common.protocol.CDODataInput;
@@ -68,6 +69,17 @@ public class LoadCommitInfosIndication extends CDOServerReadIndication
out.writeLong(commitInfo.getTimeStamp());
out.writeString(commitInfo.getUserID());
out.writeString(commitInfo.getComment());
+
+ CDOBranchPoint mergeSource = commitInfo.getMergeSource();
+ if (mergeSource != null)
+ {
+ out.writeBoolean(true);
+ out.writeCDOBranchPoint(mergeSource);
+ }
+ else
+ {
+ out.writeBoolean(false);
+ }
}
catch (IOException ex)
{
diff --git a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/OpenSessionIndication.java b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/OpenSessionIndication.java
index 2c20997c8f..6d55797ef2 100644
--- a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/OpenSessionIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/OpenSessionIndication.java
@@ -208,6 +208,7 @@ public class OpenSessionIndication extends CDOServerIndicationWithMonitoring
out.writeBoolean(repository.isSerializingCommits());
out.writeBoolean(repository.isEnsuringReferentialIntegrity());
out.writeEnum(repository.getIDGenerationLocation());
+ out.writeEnum(repository.getCommitInfoStorage());
CDOPackageUnit[] packageUnits = repository.getPackageRegistry(false).getPackageUnits();
out.writeCDOPackageUnits(packageUnits);
diff --git a/plugins/org.eclipse.emf.cdo.server.objectivity/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.server.objectivity/META-INF/MANIFEST.MF
index 3b182d2a7d..348bbb9aaf 100644
--- a/plugins/org.eclipse.emf.cdo.server.objectivity/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.server.objectivity/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.emf.cdo.server.objectivity;singleton:=true
-Bundle-Version: 4.0.400.qualifier
+Bundle-Version: 4.0.500.qualifier
Bundle-Activator: org.eclipse.emf.cdo.server.internal.objectivity.bundle.OM$Activator
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
org.eclipse.emf.cdo.server;bundle-version="[4.0.0,5.0.0)";visibility:=reexport
@@ -11,14 +11,14 @@ Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-ClassPath: .
-Export-Package: org.eclipse.emf.cdo.server.internal.objectivity;version="4.0.400";x-friends:="org.eclipse.emf.cdo.tests.objectivity",
- org.eclipse.emf.cdo.server.internal.objectivity.bundle;version="4.0.400";x-friends:="org.eclipse.emf.cdo.tests.objectivity",
- org.eclipse.emf.cdo.server.internal.objectivity.clustering;version="4.0.400";x-friends:="org.eclipse.emf.cdo.tests.objectivity",
- org.eclipse.emf.cdo.server.internal.objectivity.db;version="4.0.400";x-friends:="org.eclipse.emf.cdo.tests.objectivity",
- org.eclipse.emf.cdo.server.internal.objectivity.mapper;version="4.0.400";x-friends:="org.eclipse.emf.cdo.tests.objectivity",
- org.eclipse.emf.cdo.server.internal.objectivity.schema;version="4.0.400";x-friends:="org.eclipse.emf.cdo.tests.objectivity",
- org.eclipse.emf.cdo.server.internal.objectivity.utils;version="4.0.400";x-friends:="org.eclipse.emf.cdo.tests.objectivity",
- org.eclipse.emf.cdo.server.objectivity;version="4.0.400"
+Export-Package: org.eclipse.emf.cdo.server.internal.objectivity;version="4.0.500";x-friends:="org.eclipse.emf.cdo.tests.objectivity",
+ org.eclipse.emf.cdo.server.internal.objectivity.bundle;version="4.0.500";x-friends:="org.eclipse.emf.cdo.tests.objectivity",
+ org.eclipse.emf.cdo.server.internal.objectivity.clustering;version="4.0.500";x-friends:="org.eclipse.emf.cdo.tests.objectivity",
+ org.eclipse.emf.cdo.server.internal.objectivity.db;version="4.0.500";x-friends:="org.eclipse.emf.cdo.tests.objectivity",
+ org.eclipse.emf.cdo.server.internal.objectivity.mapper;version="4.0.500";x-friends:="org.eclipse.emf.cdo.tests.objectivity",
+ org.eclipse.emf.cdo.server.internal.objectivity.schema;version="4.0.500";x-friends:="org.eclipse.emf.cdo.tests.objectivity",
+ org.eclipse.emf.cdo.server.internal.objectivity.utils;version="4.0.500";x-friends:="org.eclipse.emf.cdo.tests.objectivity",
+ org.eclipse.emf.cdo.server.objectivity;version="4.0.500"
Import-Package: com.objy.as;version="[4.0.0,5.0.0)",
com.objy.as.app;version="[4.0.0,5.0.0)",
com.objy.db;version="[4.0.0,5.0.0)",
diff --git a/plugins/org.eclipse.emf.cdo.server.objectivity/src/org/eclipse/emf/cdo/server/internal/objectivity/ObjectivityStoreAccessor.java b/plugins/org.eclipse.emf.cdo.server.objectivity/src/org/eclipse/emf/cdo/server/internal/objectivity/ObjectivityStoreAccessor.java
index 03197ff179..eb9e2c9695 100644
--- a/plugins/org.eclipse.emf.cdo.server.objectivity/src/org/eclipse/emf/cdo/server/internal/objectivity/ObjectivityStoreAccessor.java
+++ b/plugins/org.eclipse.emf.cdo.server.objectivity/src/org/eclipse/emf/cdo/server/internal/objectivity/ObjectivityStoreAccessor.java
@@ -291,7 +291,7 @@ public class ObjectivityStoreAccessor extends StoreAccessor implements IObjectiv
if (TRACER_DEBUG.isEnabled())
{
TRACER_DEBUG
- .trace("getObjySession() - context's transaction: " + (cdoTrx == null ? "null" : cdoTrx.toString()));
+ .trace("getObjySession() - context's transaction: " + (cdoTrx == null ? "null" : cdoTrx.toString()));
}
if (cdoTrx != null)
{
@@ -741,7 +741,7 @@ public class ObjectivityStoreAccessor extends StoreAccessor implements IObjectiv
if (TRACER_DEBUG.isEnabled())
{
TRACER_DEBUG
- .trace(" writeRevisions: " + revisions.length + " - time: " + (System.nanoTime() - start) / 1000000.0);
+ .trace(" writeRevisions: " + revisions.length + " - time: " + (System.nanoTime() - start) / 1000000.0);
// TRACER_DEBUG.trace(" getObjectTime: " + ObjyObjectManager.getObjectTime / 1000000.0);
// TRACER_DEBUG.trace(" updateObjectTime: " + ObjyObjectManager.updateObjectTime / 1000000.0);
// TRACER_DEBUG.trace(" resourceCheckAndUpdateTime: " + ObjyObjectManager.resourceCheckAndUpdateTime /
@@ -1612,12 +1612,13 @@ public class ObjectivityStoreAccessor extends StoreAccessor implements IObjectiv
}
CDOCommitInfo commitInfo = commitInfoManager.createCommitInfo(infoBranch, timeStamp, previousTimeStamp, userID,
- comment, null);
+ comment, null, null);
handler.handleCommitInfo(commitInfo);
}
}
+ @SuppressWarnings("deprecation")
@Override
protected void writeCommitInfo(CDOBranch branch, long timeStamp, long previousTimeStamp, String userID,
String comment, OMMonitor monitor)
diff --git a/plugins/org.eclipse.emf.cdo.server.product/config/cdo-server.xml b/plugins/org.eclipse.emf.cdo.server.product/config/cdo-server.xml
index 7395e3c310..02168adb9e 100644
--- a/plugins/org.eclipse.emf.cdo.server.product/config/cdo-server.xml
+++ b/plugins/org.eclipse.emf.cdo.server.product/config/cdo-server.xml
@@ -22,6 +22,7 @@
<property name="ensureReferentialIntegrity" value="false"/>
<property name="allowInterruptRunningQueries" value="true"/>
<property name="idGenerationLocation" value="STORE"/> <!-- Possible values: STORE | CLIENT -->
+ <property name="commitInfoStorage" value="WITH_MERGE_SOURCE"/> <!-- Possible values: NO | YES | WITH_MERGE_SOURCE -->
<property name="serializeCommits" value="false"/>
<property name="optimisticLockingTimeout" value="10000"/>
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java
index 50ae3e6fb5..972e43c30b 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java
@@ -175,6 +175,8 @@ public class Repository extends Container<Object> implements InternalRepository,
private IDGenerationLocation idGenerationLocation;
+ private CommitInfoStorage commitInfoStorage;
+
private long optimisticLockingTimeout = 10000L;
/**
@@ -383,6 +385,11 @@ public class Repository extends Container<Object> implements InternalRepository,
return idGenerationLocation;
}
+ public CommitInfoStorage getCommitInfoStorage()
+ {
+ return commitInfoStorage;
+ }
+
public long getOptimisticLockingTimeout()
{
return optimisticLockingTimeout;
@@ -1952,6 +1959,23 @@ public class Repository extends Container<Object> implements InternalRepository,
idGenerationLocation = IDGenerationLocation.STORE;
}
+ // COMMIT_INFO_STORAGE
+ String valueCommitInfoStorage = properties.get(Props.COMMIT_INFO_STORAGE);
+ if (valueCommitInfoStorage != null)
+ {
+ commitInfoStorage = CommitInfoStorage.valueOf(valueCommitInfoStorage);
+ }
+
+ if (commitInfoStorage == null)
+ {
+ commitInfoStorage = CommitInfoStorage.WITH_MERGE_SOURCE;
+ }
+
+ if (commitInfoStorage != CommitInfoStorage.NO && !supportingBranches)
+ {
+ commitInfoStorage = CommitInfoStorage.YES;
+ }
+
// ENSURE_REFERENTIAL_INTEGRITY
String valueTimeout = properties.get(Props.OPTIMISTIC_LOCKING_TIMEOUT);
if (valueTimeout != null)
@@ -2188,7 +2212,7 @@ public class Repository extends Container<Object> implements InternalRepository,
initProperties();
if (idGenerationLocation == IDGenerationLocation.CLIENT && !(store instanceof CanHandleClientAssignedIDs))
{
- throw new IllegalStateException("Store can not handle client assigned IDs: " + store);
+ throw new IllegalStateException("Store can not handle client-assigned IDs: " + store);
}
store.setRevisionTemporality(
@@ -2220,6 +2244,7 @@ public class Repository extends Container<Object> implements InternalRepository,
long lastCommitTime = Math.max(creationTime, store.getLastCommitTime());
timeStampAuthority.setLastFinishedTimeStamp(lastCommitTime);
+ commitInfoManager.setLastCommitOfBranch(null, lastCommitTime);
if (store.isFirstStart())
{
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/ServerCDOView.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/ServerCDOView.java
index 4062f7138f..d72b2c6c5c 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/ServerCDOView.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/ServerCDOView.java
@@ -778,6 +778,11 @@ public class ServerCDOView extends AbstractCDOView implements org.eclipse.emf.cd
return repository.getIDGenerationLocation();
}
+ public CommitInfoStorage getCommitInfoStorage()
+ {
+ return repository.getCommitInfoStorage();
+ }
+
public boolean waitWhileInitial(IProgressMonitor monitor)
{
return repository.waitWhileInitial(monitor);
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/TransactionCommitContext.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/TransactionCommitContext.java
index 139fda152a..da0089aa9e 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/TransactionCommitContext.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/TransactionCommitContext.java
@@ -141,6 +141,8 @@ public class TransactionCommitContext implements InternalCommitContext
private String commitComment;
+ private CDOBranchPoint commitMergeSource;
+
private boolean usingEcore;
private boolean usingEtypes;
@@ -235,6 +237,11 @@ public class TransactionCommitContext implements InternalCommitContext
return commitComment;
}
+ public CDOBranchPoint getCommitMergeSource()
+ {
+ return commitMergeSource;
+ }
+
public long getLastUpdateTime()
{
return lastUpdateTime;
@@ -558,6 +565,11 @@ public class TransactionCommitContext implements InternalCommitContext
this.commitComment = commitComment;
}
+ public void setCommitMergeSource(CDOBranchPoint commitMergeSource)
+ {
+ this.commitMergeSource = commitMergeSource;
+ }
+
public ExtendedDataInputStream getLobs()
{
return lobs;
@@ -897,12 +909,14 @@ public class TransactionCommitContext implements InternalCommitContext
CDOCommitData commitData = createCommitData();
InternalCDOCommitInfoManager commitInfoManager = repository.getCommitInfoManager();
- return commitInfoManager.createCommitInfo(branch, timeStamp, previousTimeStamp, userID, commitComment, commitData);
+ return commitInfoManager.createCommitInfo(branch, timeStamp, previousTimeStamp, userID, commitComment,
+ commitMergeSource, commitData);
}
public CDOCommitInfo createFailureCommitInfo()
{
- return new FailureCommitInfo(timeStamp, previousTimeStamp);
+ InternalCDOCommitInfoManager commitInfoManager = repository.getCommitInfoManager();
+ return new FailureCommitInfo(commitInfoManager, timeStamp, previousTimeStamp);
}
protected CDOCommitData createCommitData()
@@ -1339,12 +1353,15 @@ public class TransactionCommitContext implements InternalCommitContext
{
try
{
- monitor.begin(8);
+ monitor.begin(9);
addNewPackageUnits(monitor.fork());
addRevisions(newObjects, monitor.fork());
addRevisions(dirtyObjects, monitor.fork());
reviseDetachedObjects(monitor.fork());
+ InternalCDOCommitInfoManager commitInfoManager = repository.getCommitInfoManager();
+ commitInfoManager.setLastCommitOfBranch(branch, timeStamp);
+
releaseImplicitLocks();
monitor.worked();
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/embedded/EmbeddedClientSessionConfiguration.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/embedded/EmbeddedClientSessionConfiguration.java
index e304e1b19d..7719880505 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/embedded/EmbeddedClientSessionConfiguration.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/embedded/EmbeddedClientSessionConfiguration.java
@@ -166,6 +166,11 @@ public class EmbeddedClientSessionConfiguration extends CDOSessionConfigurationI
return session.getRepository().getIDGenerationLocation();
}
+ public CommitInfoStorage getCommitInfoStorage()
+ {
+ return session.getRepository().getCommitInfoStorage();
+ }
+
public String getStoreType()
{
return session.getRepository().getStoreType();
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/mem/MEMStore.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/mem/MEMStore.java
index c34bcbf1bf..25e32d63bf 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/mem/MEMStore.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/mem/MEMStore.java
@@ -580,7 +580,7 @@ public class MEMStore extends LongIDStore implements IMEMStore, BranchLoader3, D
}
public synchronized void addCommitInfo(CDOBranch branch, long timeStamp, long previousTimeStamp, String userID,
- String comment)
+ String comment, CDOBranchPoint mergeSource)
{
int index = commitInfos.size() - 1;
while (index >= 0)
@@ -594,7 +594,7 @@ public class MEMStore extends LongIDStore implements IMEMStore, BranchLoader3, D
--index;
}
- CommitInfo commitInfo = new CommitInfo(branch, timeStamp, previousTimeStamp, userID, comment);
+ CommitInfo commitInfo = new CommitInfo(branch, timeStamp, previousTimeStamp, userID, comment, mergeSource);
commitInfos.add(index + 1, commitInfo);
}
@@ -1430,13 +1430,17 @@ public class MEMStore extends LongIDStore implements IMEMStore, BranchLoader3, D
private String comment;
- public CommitInfo(CDOBranch branch, long timeStamp, long previousTimeStamp, String userID, String comment)
+ private CDOBranchPoint mergeSource;
+
+ public CommitInfo(CDOBranch branch, long timeStamp, long previousTimeStamp, String userID, String comment,
+ CDOBranchPoint mergeSource)
{
super(timeStamp);
this.branch = branch;
this.previousTimeStamp = previousTimeStamp;
this.userID = userID;
this.comment = comment;
+ this.mergeSource = mergeSource;
}
public CDOBranch getBranch()
@@ -1447,7 +1451,7 @@ public class MEMStore extends LongIDStore implements IMEMStore, BranchLoader3, D
public void handle(InternalCDOCommitInfoManager manager, CDOCommitInfoHandler handler)
{
CDOCommitInfo commitInfo = manager.createCommitInfo(branch, getTimeStamp(), previousTimeStamp, userID, comment,
- null);
+ mergeSource, null);
handler.handleCommitInfo(commitInfo);
}
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/mem/MEMStoreAccessor.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/mem/MEMStoreAccessor.java
index 53be6856ea..0ff7819f42 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/mem/MEMStoreAccessor.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/mem/MEMStoreAccessor.java
@@ -29,7 +29,7 @@ import org.eclipse.emf.cdo.server.IQueryContext;
import org.eclipse.emf.cdo.server.IQueryHandler;
import org.eclipse.emf.cdo.server.ISession;
import org.eclipse.emf.cdo.server.IStoreAccessor.DurableLocking2;
-import org.eclipse.emf.cdo.server.IStoreAccessor.Raw;
+import org.eclipse.emf.cdo.server.IStoreAccessor.Raw2;
import org.eclipse.emf.cdo.server.ITransaction;
import org.eclipse.emf.cdo.spi.common.branch.InternalCDOBranchManager.BranchLoader3;
import org.eclipse.emf.cdo.spi.common.commit.CDOChangeSetSegment;
@@ -63,7 +63,7 @@ import java.util.Set;
/**
* @author Simon McDuff
*/
-public class MEMStoreAccessor extends LongIDStoreAccessor implements Raw, DurableLocking2, BranchLoader3
+public class MEMStoreAccessor extends LongIDStoreAccessor implements Raw2, DurableLocking2, BranchLoader3
{
private final MEMStore store;
@@ -294,11 +294,19 @@ public class MEMStoreAccessor extends LongIDStoreAccessor implements Raw, Durabl
}
}
+ @Deprecated
@Override
protected void writeCommitInfo(CDOBranch branch, long timeStamp, long previousTimeStamp, String userID,
String comment, OMMonitor monitor)
{
- store.addCommitInfo(branch, timeStamp, previousTimeStamp, userID, comment);
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ protected void writeCommitInfo(CDOBranch branch, long timeStamp, long previousTimeStamp, String userID,
+ String comment, CDOBranchPoint mergeSource, OMMonitor monitor)
+ {
+ store.addCommitInfo(branch, timeStamp, previousTimeStamp, userID, comment, mergeSource);
}
@Override
@@ -449,7 +457,13 @@ public class MEMStoreAccessor extends LongIDStoreAccessor implements Raw, Durabl
public void rawStore(CDOBranch branch, long timeStamp, long previousTimeStamp, String userID, String comment,
OMMonitor monitor)
{
- writeCommitInfo(branch, timeStamp, previousTimeStamp, userID, comment, monitor);
+ writeCommitInfo(branch, timeStamp, previousTimeStamp, userID, comment, null, monitor);
+ }
+
+ public void rawStore(CDOBranch branch, long timeStamp, long previousTimeStamp, String userID, String comment,
+ CDOBranchPoint mergeSource, OMMonitor monitor)
+ {
+ writeCommitInfo(branch, timeStamp, previousTimeStamp, userID, comment, mergeSource, monitor);
}
public void rawDelete(CDOID id, int version, CDOBranch branch, EClass eClass, OMMonitor monitor)
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/syncing/SynchronizableRepository.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/syncing/SynchronizableRepository.java
index 2ddb48c2e3..7f3f1b55c1 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/syncing/SynchronizableRepository.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/syncing/SynchronizableRepository.java
@@ -505,7 +505,7 @@ public abstract class SynchronizableRepository extends Repository.Default implem
String comment = "<replicate raw commits>"; //$NON-NLS-1$
final CDOCommitInfo commitInfo = manager.createCommitInfo( //
- branch, toCommitTime, previousCommitTime, SYSTEM_USER_ID, comment, data);
+ branch, toCommitTime, previousCommitTime, SYSTEM_USER_ID, comment, null, data);
CommitNotificationInfo info = new CommitNotificationInfo();
info.setSender(replicatorSession);
@@ -1090,6 +1090,11 @@ public abstract class SynchronizableRepository extends Repository.Default implem
return WriteThroughCommitContext.this.getCommitComment();
}
+ public CDOBranchPoint getCommitMergeSource()
+ {
+ return WriteThroughCommitContext.this.getCommitMergeSource();
+ }
+
public CDOBranch getBranch()
{
return WriteThroughCommitContext.this.getTransaction().getBranch();
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/CDOServerExporter.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/CDOServerExporter.java
index 9d014c9797..3b06c2e94c 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/CDOServerExporter.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/CDOServerExporter.java
@@ -262,6 +262,8 @@ public abstract class CDOServerExporter<OUT>
/**
* XML constants being used by both {@link CDOServerExporter exporters} and {@link CDOServerImporter importers}.
*
+ * @noextend This interface is not intended to be extended by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
* @author Eike Stepper
*/
public static interface XMLConstants
@@ -369,6 +371,16 @@ public abstract class CDOServerExporter<OUT>
public static final String COMMIT_USER = "user";
public static final String COMMIT_COMMENT = "comment";
+
+ /**
+ * @since 4.6
+ */
+ public static final String MERGE_SOURCE_BRANCH = "mergeSourceBranch";
+
+ /**
+ * @since 4.6
+ */
+ public static final String MERGE_SOURCE_TIME = "mergeSourceTime";
}
/**
@@ -377,7 +389,7 @@ public abstract class CDOServerExporter<OUT>
*
* @author Eike Stepper
*/
- public static class XML extends CDOServerExporter<XMLOutput>implements XMLConstants
+ public static class XML extends CDOServerExporter<XMLOutput> implements XMLConstants
{
public XML(IRepository repository)
{
@@ -649,6 +661,13 @@ public abstract class CDOServerExporter<OUT>
out.attribute(COMMIT_USER, commitInfo.getUserID());
out.attribute(COMMIT_COMMENT, commitInfo.getComment());
+
+ CDOBranchPoint mergeSource = commitInfo.getMergeSource();
+ if (mergeSource != null)
+ {
+ out.attribute(MERGE_SOURCE_BRANCH, mergeSource.getBranch().getID());
+ out.attribute(MERGE_SOURCE_TIME, mergeSource.getTimeStamp());
+ }
}
protected final String str(CDOID id)
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/CDOServerImporter.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/CDOServerImporter.java
index 48a884ff66..a02bee12d5 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/CDOServerImporter.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/CDOServerImporter.java
@@ -27,6 +27,7 @@ import org.eclipse.emf.cdo.common.revision.CDORevision;
import org.eclipse.emf.cdo.common.revision.CDORevisionFactory;
import org.eclipse.emf.cdo.common.revision.CDORevisionHandler;
import org.eclipse.emf.cdo.common.revision.CDORevisionUtil;
+import org.eclipse.emf.cdo.server.IStoreAccessor.Raw2;
import org.eclipse.emf.cdo.spi.common.branch.InternalCDOBranch;
import org.eclipse.emf.cdo.spi.common.branch.InternalCDOBranchManager;
import org.eclipse.emf.cdo.spi.common.model.InternalCDOPackageInfo;
@@ -144,9 +145,22 @@ public abstract class CDOServerImporter
}
/**
+ * Persists the data that has been read by a {@link CDOServerImporter importer} into a new {@link IRepository
+ * repository}.
+ *
* @author Eike Stepper
+ * @since 4.6
*/
- private final class FlushHandler implements Handler
+ public static interface Handler2 extends Handler
+ {
+ public void handleCommitInfo(long time, long previous, int branch, String user, String comment,
+ int mergeSourceBranchID, long mergeSourceTime);
+ }
+
+ /**
+ * @author Eike Stepper
+ */
+ private final class FlushHandler implements Handler2
{
private OMMonitor monitor = new Monitor();
@@ -286,8 +300,25 @@ public abstract class CDOServerImporter
public void handleCommitInfo(long time, long previous, int branchID, String user, String comment)
{
+ handleCommitInfo(time, previous, branchID, user, comment, 0, CDOBranchPoint.UNSPECIFIED_DATE);
+ }
+
+ public void handleCommitInfo(long time, long previous, int branchID, String user, String comment,
+ int mergeSourceBranchID, long mergeSourceTime)
+ {
CDOBranch branch = repository.getBranchManager().getBranch(branchID);
- accessor.rawStore(branch, time, previous, user, comment, monitor);
+ if (mergeSourceBranchID != 0 && accessor instanceof Raw2)
+ {
+ CDOBranch mergeSourceBranch = repository.getBranchManager().getBranch(mergeSourceBranchID);
+ CDOBranchPoint mergeSource = mergeSourceBranch.getPoint(mergeSourceTime);
+
+ Raw2 raw2 = (Raw2)accessor;
+ raw2.rawStore(branch, time, previous, user, comment, mergeSource, monitor);
+ }
+ else
+ {
+ accessor.rawStore(branch, time, previous, user, comment, monitor);
+ }
}
public void flush()
@@ -483,6 +514,21 @@ public abstract class CDOServerImporter
String user = attributes.getValue(COMMIT_USER);
String comment = attributes.getValue(COMMIT_COMMENT);
+ if (handler instanceof Handler2)
+ {
+ Handler2 handler2 = (Handler2)handler;
+
+ value = attributes.getValue(MERGE_SOURCE_BRANCH);
+ if (value != null)
+ {
+ int mergeSourceBranch = Integer.parseInt(value);
+ long mergeSourceTime = Long.parseLong(attributes.getValue(MERGE_SOURCE_TIME));
+
+ handler2.handleCommitInfo(time, previous, branch, user, comment, mergeSourceBranch, mergeSourceTime);
+ return;
+ }
+ }
+
handler.handleCommitInfo(time, previous, branch, user, comment);
}
}
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IRepository.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IRepository.java
index edfa1d8345..b8df28bf56 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IRepository.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IRepository.java
@@ -354,6 +354,11 @@ public interface IRepository extends CDOCommonRepository, IQueryHandlerProvider,
public static final String ID_GENERATION_LOCATION = "idGenerationLocation"; //$NON-NLS-1$
/**
+ * @since 4.6
+ */
+ public static final String COMMIT_INFO_STORAGE = "commitInfoStorage"; //$NON-NLS-1$
+
+ /**
* @since 4.2
*/
public static final String OPTIMISTIC_LOCKING_TIMEOUT = "optimisticLockingTimeout"; //$NON-NLS-1$
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IStoreAccessor.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IStoreAccessor.java
index 1d4f132e69..795982348f 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IStoreAccessor.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IStoreAccessor.java
@@ -307,6 +307,11 @@ public interface IStoreAccessor extends IQueryHandlerProvider, BranchLoader, Com
public String getCommitComment();
/**
+ * @since 4.6
+ */
+ public CDOBranchPoint getCommitMergeSource();
+
+ /**
* @since 4.2
*/
public long getLastUpdateTime();
@@ -776,6 +781,48 @@ public interface IStoreAccessor extends IQueryHandlerProvider, BranchLoader, Com
}
/**
+ * An extension interface for {@link IStoreAccessor store accessors} that support <i>raw data access</i> as needed by
+ * {@link IRepositorySynchronizer repository synchronizers} or {@link CDOServerImporter server importers}.
+ *
+ * @author Eike Stepper
+ * @since 4.6
+ * @apiviz.exclude
+ */
+ public interface Raw2 extends Raw
+ {
+ /**
+ * Stores the given {@link CDOCommitInfo commit} in the backend represented by this {@link IStoreAccessor.Raw raw
+ * store accessor} without going through a regular {@link IStoreAccessor#commit(OMMonitor) commit}.
+ * <p>
+ * <b>Implementation note:</b> The implementor of this method may rely on the fact that multiple subsequent calls to
+ * this method are followed by a single final call to the {@link #rawCommit(double, OMMonitor) rawCommit()} method
+ * where the accumulated backend changes can be committed atomically.
+ *
+ * @param branch
+ * the {@link CDOCommitInfo#getBranch() branch} of the commit info to be stored in the backend represented
+ * by this {@link IStoreAccessor.Raw raw store accessor}.
+ * @param timeStamp
+ * the {@link CDOCommitInfo#getTimeStamp() time stamp} of the commit info to be stored in the backend
+ * represented by this {@link IStoreAccessor.Raw raw store accessor}.
+ * @param previousTimeStamp
+ * the {@link CDOCommitInfo#getPreviousTimeStamp() previous time stamp} of the commit info to be stored in
+ * the backend represented by this {@link IStoreAccessor.Raw raw store accessor}.
+ * @param userID
+ * the {@link CDOCommitInfo#getUserID() user ID} of the commit info to be stored in the backend represented
+ * by this {@link IStoreAccessor.Raw raw store accessor}.
+ * @param comment
+ * the {@link CDOCommitInfo#getComment() comment} of the commit info to be stored in the backend
+ * represented by this {@link IStoreAccessor.Raw raw store accessor}.
+ * @param mergeSource
+ * the {@link CDOCommitInfo#getMergeSource() merge source} of the commit info to be stored in the backend
+ * represented by this {@link IStoreAccessor.Raw2 raw store accessor}.
+ * @see #rawCommit(double, OMMonitor)
+ */
+ public void rawStore(CDOBranch branch, long timeStamp, long previousTimeStamp, String userID, String comment,
+ CDOBranchPoint mergeSource, OMMonitor monitor);
+ }
+
+ /**
* An extension interface for {@link IStoreAccessor store accessors} that support <i>durable locking</i>.
*
* @see DurableLocking2
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalCommitContext.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalCommitContext.java
index fd885b81a5..f9238d24a2 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalCommitContext.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalCommitContext.java
@@ -10,6 +10,7 @@
*/
package org.eclipse.emf.cdo.spi.server;
+import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
import org.eclipse.emf.cdo.common.branch.CDOBranchVersion;
import org.eclipse.emf.cdo.common.id.CDOID;
import org.eclipse.emf.cdo.common.lock.CDOLockState;
@@ -163,6 +164,11 @@ public interface InternalCommitContext extends IStoreAccessor.CommitContext, CDO
public void setCommitComment(String comment);
/**
+ * @since 4.6
+ */
+ public void setCommitMergeSource(CDOBranchPoint mergeSource);
+
+ /**
* @since 4.0
*/
public void setLobs(ExtendedDataInputStream in);
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/StoreAccessor.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/StoreAccessor.java
index b929622f43..5dc4bb1854 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/StoreAccessor.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/StoreAccessor.java
@@ -14,6 +14,7 @@ package org.eclipse.emf.cdo.spi.server;
import org.eclipse.emf.cdo.common.CDOCommonRepository.IDGenerationLocation;
import org.eclipse.emf.cdo.common.branch.CDOBranch;
+import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
import org.eclipse.emf.cdo.common.id.CDOID;
import org.eclipse.emf.cdo.server.ISession;
import org.eclipse.emf.cdo.server.IStore;
@@ -62,6 +63,7 @@ public abstract class StoreAccessor extends StoreAccessorBase
long previousTimeStamp = context.getPreviousTimeStamp();
String userID = context.getUserID();
String commitComment = context.getCommitComment();
+ CDOBranchPoint mergeSource = context.getCommitMergeSource();
Store store = getStore();
boolean deltas = store.getSupportedChangeFormats().contains(IStore.ChangeFormat.DELTA);
@@ -77,7 +79,7 @@ public abstract class StoreAccessor extends StoreAccessorBase
{
monitor.begin(1 + newPackageUnits.length + 2 + newObjects.length + detachedObjects.length + dirtyCount + 1);
- writeCommitInfo(branch, timeStamp, previousTimeStamp, userID, commitComment, monitor.fork());
+ writeCommitInfo(branch, timeStamp, previousTimeStamp, userID, commitComment, mergeSource, monitor.fork());
writePackageUnits(newPackageUnits, monitor.fork(newPackageUnits.length));
IDGenerationLocation idGenerationLocation = store.getRepository().getIDGenerationLocation();
@@ -162,11 +164,22 @@ public abstract class StoreAccessor extends StoreAccessorBase
/**
* @since 4.0
+ * @deprecated As of 4.6 override {@link #writeCommitInfo(CDOBranch, long, long, String, String, CDOBranchPoint, OMMonitor)}.
*/
+ @Deprecated
protected abstract void writeCommitInfo(CDOBranch branch, long timeStamp, long previousTimeStamp, String userID,
String comment, OMMonitor monitor);
/**
+ * @since 4.6
+ */
+ protected void writeCommitInfo(CDOBranch branch, long timeStamp, long previousTimeStamp, String userID,
+ String comment, CDOBranchPoint mergeSource, OMMonitor monitor)
+ {
+ writeCommitInfo(branch, timeStamp, previousTimeStamp, userID, comment, monitor);
+ }
+
+ /**
* @since 4.5
*/
protected void writeNewObjectRevisions(InternalCommitContext context, InternalCDORevision[] newObjects,
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/CommitInfoTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/CommitInfoTest.java
index 5be4c7c91e..91c3313bbf 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/CommitInfoTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/CommitInfoTest.java
@@ -530,6 +530,27 @@ public class CommitInfoTest extends AbstractCDOTest
assertEquals(commitInfo.getTimeStamp(), infos.get(0).getTimeStamp());
}
+ public void testClientPreviousCommitInfo() throws Exception
+ {
+ CDOSession session = openSession();
+ CDOTransaction transaction = session.openTransaction();
+ CDOResource resource = transaction.createResource(getResourcePath(RESOURCE_PATH));
+
+ resource.getContents().add(getModel1Factory().createProduct1());
+ CDOCommitInfo commitInfo1 = transaction.commit();
+
+ resource.getContents().add(getModel1Factory().createProduct1());
+ CDOCommitInfo commitInfo2 = transaction.commit();
+ assertNotSame(commitInfo1, commitInfo2);
+ assertEquals(commitInfo1, commitInfo2.getPreviousCommitInfo());
+
+ resource.getContents().add(getModel1Factory().createProduct1());
+ CDOCommitInfo commitInfo3 = transaction.commit();
+ assertNotSame(commitInfo1, commitInfo3);
+ assertNotSame(commitInfo2, commitInfo3);
+ assertEquals(commitInfo2, commitInfo3.getPreviousCommitInfo());
+ }
+
@CleanRepositoriesBefore(reason = "Commit info counting")
@CleanRepositoriesAfter(reason = "Commit info counting")
public void testClientBranch() throws Exception
diff --git a/plugins/org.eclipse.emf.cdo.ui.compare/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.ui.compare/META-INF/MANIFEST.MF
index 6eb82f3240..293fe26901 100644
--- a/plugins/org.eclipse.emf.cdo.ui.compare/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.ui.compare/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.emf.cdo.ui.compare;singleton:=true
-Bundle-Version: 4.4.0.qualifier
+Bundle-Version: 4.4.100.qualifier
Bundle-Activator: org.eclipse.emf.cdo.ui.internal.compare.bundle.OM$Activator
Bundle-Vendor: %providerName
Bundle-ClassPath: .
@@ -20,6 +20,6 @@ Import-Package: com.google.common.base;version="[11.0.0,16.0.0)",
com.google.common.collect;version="[11.0.0,16.0.0)",
com.google.common.cache;version="[11.0.0,16.0.0)",
com.google.common.util.concurrent;version="[11.0.0,16.0.0)"
-Export-Package: org.eclipse.emf.cdo.ui.compare;version="4.4.0",
- org.eclipse.emf.cdo.ui.internal.compare;version="4.4.0";x-friends:="org.eclipse.emf.cdo.explorer.ui",
- org.eclipse.emf.cdo.ui.internal.compare.bundle;version="4.4.0";x-internal:=true
+Export-Package: org.eclipse.emf.cdo.ui.compare;version="4.4.100",
+ org.eclipse.emf.cdo.ui.internal.compare;version="4.4.100";x-friends:="org.eclipse.emf.cdo.explorer.ui",
+ org.eclipse.emf.cdo.ui.internal.compare.bundle;version="4.4.100";x-internal:=true
diff --git a/plugins/org.eclipse.emf.cdo.ui.compare/src/org/eclipse/emf/cdo/ui/compare/CDOCompareEditorUtil.java b/plugins/org.eclipse.emf.cdo.ui.compare/src/org/eclipse/emf/cdo/ui/compare/CDOCompareEditorUtil.java
index 4496509176..68251cf735 100644
--- a/plugins/org.eclipse.emf.cdo.ui.compare/src/org/eclipse/emf/cdo/ui/compare/CDOCompareEditorUtil.java
+++ b/plugins/org.eclipse.emf.cdo.ui.compare/src/org/eclipse/emf/cdo/ui/compare/CDOCompareEditorUtil.java
@@ -583,7 +583,7 @@ public class CDOCompareEditorUtil
configuration.setRightLabel(rightLabel);
configuration.setRightEditable(rightEditable);
- Input input = new Input(rightView, configuration, comparison, editingDomain, adapterFactory);
+ Input input = new Input(leftView, rightView, configuration, comparison, editingDomain, adapterFactory);
input.setTitle(title);
workaroundEMFCompareBug(leftView, leftLabel);
@@ -752,6 +752,8 @@ public class CDOCompareEditorUtil
{
private static final Image COMPARE_IMAGE = OM.getImage("icons/compare.gif");
+ private final CDOView sourceView;
+
private final CDOView targetView;
private final Comparison comparison;
@@ -762,11 +764,12 @@ public class CDOCompareEditorUtil
private boolean suppressCommit;
- private Input(CDOView targetView, CompareConfiguration configuration, Comparison comparison,
+ private Input(CDOView sourceView, CDOView targetView, CompareConfiguration configuration, Comparison comparison,
ICompareEditingDomain editingDomain, AdapterFactory adapterFactory)
{
super(new org.eclipse.emf.compare.ide.ui.internal.configuration.EMFCompareConfiguration(configuration),
comparison, editingDomain, adapterFactory);
+ this.sourceView = sourceView;
this.targetView = targetView;
this.comparison = comparison;
@@ -806,9 +809,9 @@ public class CDOCompareEditorUtil
@Override
public void saveChanges(IProgressMonitor monitor) throws CoreException
{
- if (targetView instanceof CDOTransaction)
+ if (targetView instanceof InternalCDOTransaction)
{
- CDOTransaction transaction = (CDOTransaction)targetView;
+ InternalCDOTransaction transaction = (InternalCDOTransaction)targetView;
if (transaction.isDirty())
{
Collection<CDOObject> values = transaction.getNewObjects().values();
@@ -860,6 +863,10 @@ public class CDOCompareEditorUtil
{
if (!suppressCommit)
{
+ CDOBranchPoint mergeSource = sourceView.isHistorical() ? CDOBranchUtil.copyBranchPoint(sourceView)
+ : sourceView.getBranch().getPoint(sourceView.getLastUpdateTime());
+
+ transaction.setCommitMergeSource(mergeSource);
transaction.commit(monitor);
setDirty(false);
}
diff --git a/plugins/org.eclipse.emf.cdo.ui.team/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.ui.team/META-INF/MANIFEST.MF
index db7aadaa2b..ea5991fcd0 100644
--- a/plugins/org.eclipse.emf.cdo.ui.team/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.ui.team/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.emf.cdo.ui.team;singleton:=true
-Bundle-Version: 4.2.300.qualifier
+Bundle-Version: 4.2.400.qualifier
Bundle-Activator: org.eclipse.emf.cdo.ui.internal.team.bundle.OM$Activator
Bundle-Vendor: %providerName
Bundle-ClassPath: .
@@ -13,5 +13,5 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
org.eclipse.team.ui;bundle-version="[3.5.0,4.0.0)";visibility:=reexport,
org.eclipse.emf.cdo.ui;bundle-version="[4.2.0,5.0.0)";visibility:=reexport,
org.eclipse.emf.cdo.ui.shared;bundle-version="[4.0.0,5.0.0)"
-Export-Package: org.eclipse.emf.cdo.ui.internal.team.bundle;version="4.2.300";x-internal:=true,
- org.eclipse.emf.cdo.ui.internal.team.history;version="4.2.300";x-friends:="org.eclipse.emf.cdo.explorer.ui"
+Export-Package: org.eclipse.emf.cdo.ui.internal.team.bundle;version="4.2.400";x-internal:=true,
+ org.eclipse.emf.cdo.ui.internal.team.history;version="4.2.400";x-friends:="org.eclipse.emf.cdo.explorer.ui"
diff --git a/plugins/org.eclipse.emf.cdo.ui.team/src/org/eclipse/emf/cdo/ui/internal/team/history/CDOHistoryPage.java b/plugins/org.eclipse.emf.cdo.ui.team/src/org/eclipse/emf/cdo/ui/internal/team/history/CDOHistoryPage.java
index d7abdaabfc..e198004d9e 100644
--- a/plugins/org.eclipse.emf.cdo.ui.team/src/org/eclipse/emf/cdo/ui/internal/team/history/CDOHistoryPage.java
+++ b/plugins/org.eclipse.emf.cdo.ui.team/src/org/eclipse/emf/cdo/ui/internal/team/history/CDOHistoryPage.java
@@ -11,11 +11,16 @@
package org.eclipse.emf.cdo.ui.internal.team.history;
import org.eclipse.emf.cdo.common.branch.CDOBranch;
+import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
import org.eclipse.emf.cdo.common.commit.CDOCommitInfo;
import org.eclipse.emf.cdo.common.commit.CDOCommitInfoHandler;
import org.eclipse.emf.cdo.common.commit.CDOCommitInfoManager;
import org.eclipse.emf.cdo.eresource.CDOResourceFolder;
+import org.eclipse.emf.cdo.internal.ui.history.Net;
+import org.eclipse.emf.cdo.internal.ui.history.NetRenderer;
+import org.eclipse.emf.cdo.internal.ui.history.Track;
import org.eclipse.emf.cdo.session.CDOSession;
+import org.eclipse.emf.cdo.spi.common.branch.CDOBranchUtil;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
import org.eclipse.emf.cdo.ui.widgets.CommitHistoryComposite;
import org.eclipse.emf.cdo.ui.widgets.CommitHistoryComposite.Input;
@@ -24,20 +29,32 @@ import org.eclipse.emf.cdo.ui.widgets.CommitHistoryComposite.LabelProvider;
import org.eclipse.emf.cdo.util.CDOUtil;
import org.eclipse.net4j.util.AdapterUtil;
+import org.eclipse.net4j.util.ReflectUtil;
import org.eclipse.net4j.util.event.IListener;
import org.eclipse.net4j.util.lifecycle.ILifecycle;
import org.eclipse.net4j.util.lifecycle.LifecycleEventAdapter;
import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
+import org.eclipse.net4j.util.om.OMPlatform;
import org.eclipse.net4j.util.ui.UIUtil;
import org.eclipse.net4j.util.ui.widgets.StackComposite;
+import org.eclipse.emf.spi.cdo.DefaultCDOMerger;
+
import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.util.LocalSelectionTransfer;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.ViewerDropAdapter;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.swt.dnd.TransferData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
@@ -54,14 +71,18 @@ public class CDOHistoryPage extends HistoryPage
{
private static final String POPUP_ID = "#PopupMenu";
+ private static final boolean DEBUG = Boolean
+ .parseBoolean(OMPlatform.INSTANCE.getProperty("org.eclipse.emf.cdo.ui.team.history.debug", "false"));
+
+ private static final boolean TEST = Boolean
+ .parseBoolean(OMPlatform.INSTANCE.getProperty("org.eclipse.emf.cdo.ui.team.history.test", "false"));
+
private StackComposite stackComposite;
private Control offlineControl;
private CommitHistoryComposite commitHistoryComposite;
- private boolean commitOnDoubleClick;
-
private Input input;
private IListener inputListener = new LifecycleEventAdapter()
@@ -117,52 +138,17 @@ public class CDOHistoryPage extends HistoryPage
@Override
protected void doubleClicked(CDOCommitInfo commitInfo)
{
- if (commitOnDoubleClick)
+ if (TEST)
{
- testCommit(commitInfo);
- }
- }
-
- private void testCommit(CDOCommitInfo commitInfo)
- {
- CDOTransaction transaction = null;
-
- try
- {
- CDOSession session = input.getSession();
- CDOBranch branch = commitInfo.getBranch();
-
- final long[] lastCommitTime = { 0 };
- CDOCommitInfoManager commitInfoManager = session.getCommitInfoManager();
- commitInfoManager.getCommitInfos(branch, Long.MAX_VALUE, null, null, -1, new CDOCommitInfoHandler()
+ new TransactionalBranchPointOperation()
{
- public void handleCommitInfo(CDOCommitInfo commitInfo)
+ @Override
+ protected void run(CDOTransaction transaction)
{
- lastCommitTime[0] = commitInfo.getTimeStamp();
+ CDOResourceFolder folder = transaction.getOrCreateResourceFolder("test");
+ folder.addResource("resource-" + folder.getNodes().size());
}
- });
-
- long timeStamp = commitInfo.getTimeStamp();
- if (timeStamp != lastCommitTime[0])
- {
- String name = "branch-" + (timeStamp - session.getRepositoryInfo().getCreationTime()) / 1000;
- branch = branch.createBranch(name, timeStamp);
- }
-
- transaction = session.openTransaction(branch);
- CDOUtil.configureView(transaction);
-
- CDOResourceFolder folder = transaction.getOrCreateResourceFolder("test");
- folder.addResource("resource-" + folder.getNodes().size());
- transaction.commit();
- }
- catch (Exception ex)
- {
- ex.printStackTrace();
- }
- finally
- {
- LifecycleUtil.deactivate(transaction);
+ }.execute(commitInfo);
}
}
};
@@ -170,10 +156,77 @@ public class CDOHistoryPage extends HistoryPage
stackComposite.setTopControl(commitHistoryComposite);
IPageSite site = getSite();
- TableViewer tableViewer = commitHistoryComposite.getTableViewer();
+ final TableViewer tableViewer = commitHistoryComposite.getTableViewer();
UIUtil.addDragSupport(tableViewer);
+ if (TEST)
+ {
+ tableViewer.addDropSupport(DND.DROP_MOVE, new Transfer[] { LocalSelectionTransfer.getTransfer() },
+ new ViewerDropAdapter(tableViewer)
+ {
+ {
+ // We don't want it to look like you can insert new elements, only drop onto existing elements
+ setFeedbackEnabled(false);
+ }
+
+ @Override
+ public boolean validateDrop(Object target, int operation, TransferData transferType)
+ {
+ if (target instanceof CDOBranchPoint
+ && LocalSelectionTransfer.getTransfer().isSupportedType(transferType))
+ {
+ CDOBranchPoint objectToDrop = getObjectToDrop(transferType);
+ if (objectToDrop != null)
+ {
+ if (CDOBranchUtil.isContainedBy(objectToDrop, (CDOBranchPoint)target))
+ {
+ return false;
+ }
+
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ @Override
+ public boolean performDrop(Object data)
+ {
+ final CDOBranchPoint objectToDrop = UIUtil.getElement((ISelection)data, CDOBranchPoint.class);
+ final CDOBranchPoint dropTarget = (CDOBranchPoint)getCurrentTarget();
+
+ boolean result = new TransactionalBranchPointOperation()
+ {
+ @Override
+ protected void run(CDOTransaction transaction)
+ {
+ transaction.merge(objectToDrop, new DefaultCDOMerger.PerFeature.ManyValued());
+ }
+ }.execute(dropTarget);
+
+ if (result)
+ {
+ tableViewer.getControl().setFocus();
+ tableViewer.setSelection(new StructuredSelection(dropTarget));
+ }
+
+ return result;
+ }
+
+ private CDOBranchPoint getObjectToDrop(TransferData transferType)
+ {
+ return UIUtil.getElement(LocalSelectionTransfer.getTransfer().getSelection(), CDOBranchPoint.class);
+ }
+ });
+ }
+
+ if (TEST)
+ {
+ ((LabelProvider)tableViewer.getLabelProvider()).setFormatTimeStamps(false);
+ }
+
MenuManager menuManager = new MenuManager(POPUP_ID);
menuManager.add(new Separator("compare"));
menuManager.add(new Separator("branching"));
@@ -198,7 +251,7 @@ public class CDOHistoryPage extends HistoryPage
public void refresh()
{
- commitHistoryComposite.refreshLayout();
+ commitHistoryComposite.refreshLayout(true);
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@@ -265,34 +318,55 @@ public class CDOHistoryPage extends HistoryPage
protected void setupToolBar(IToolBarManager manager)
{
+ if (DEBUG)
+ {
+ manager.add(new Action("DEBUG", IAction.AS_PUSH_BUTTON)
+ {
+ @SuppressWarnings("unused")
+ @Override
+ public void run()
+ {
+ NetRenderer netRenderer = (NetRenderer)ReflectUtil
+ .getValue(ReflectUtil.getField(CommitHistoryComposite.class, "netRenderer"), commitHistoryComposite);
+
+ Net net = netRenderer.getNet();
+ Track[] tracks = net.getTracks();
+ CDOSession session = net.getSession();
+ System.out.println("Debug " + net); // Set a breakpoint on this line to inspect the net.
+ }
+ });
+ }
}
protected void setupViewMenu(IMenuManager manager)
{
- manager.add(new Action("Format Time Stamps", SWT.CHECK)
+ manager.add(new TableRedrawingAction("Format Time Stamps", SWT.CHECK)
{
+ @Override
+ protected boolean getInitialCheckState(LabelProvider labelProvider)
{
- LabelProvider labelProvider = commitHistoryComposite.getLabelProvider();
- setChecked(labelProvider.isFormatTimeStamps());
+ return labelProvider.isFormatTimeStamps();
}
@Override
- public void run()
+ protected void doRun(LabelProvider labelProvider)
{
- LabelProvider labelProvider = commitHistoryComposite.getLabelProvider();
labelProvider.setFormatTimeStamps(!labelProvider.isFormatTimeStamps());
-
- TableViewer tableViewer = commitHistoryComposite.getTableViewer();
- tableViewer.refresh(true);
}
});
- manager.add(new Action("Test Commit on Double Click", SWT.CHECK)
+ manager.add(new TableRedrawingAction("Shorten Branch Paths", SWT.CHECK)
{
@Override
- public void run()
+ protected boolean getInitialCheckState(LabelProvider labelProvider)
{
- commitOnDoubleClick = !commitOnDoubleClick;
+ return labelProvider.isShortenBranchPaths();
+ }
+
+ @Override
+ protected void doRun(LabelProvider labelProvider)
+ {
+ labelProvider.setShortenBranchPaths(!labelProvider.isShortenBranchPaths());
}
});
}
@@ -314,4 +388,89 @@ public class CDOHistoryPage extends HistoryPage
return false;
}
}
+
+ /**
+ * @author Eike Stepper
+ */
+ private abstract class TableRedrawingAction extends Action
+ {
+ private final LabelProvider labelProvider = commitHistoryComposite.getLabelProvider();
+
+ public TableRedrawingAction(String text, int style)
+ {
+ super(text, style);
+ setChecked(getInitialCheckState(labelProvider));
+ }
+
+ @Override
+ public void run()
+ {
+ doRun(labelProvider);
+ commitHistoryComposite.getTableViewer().getTable().redraw();
+ }
+
+ protected abstract void doRun(LabelProvider labelProvider);
+
+ protected abstract boolean getInitialCheckState(LabelProvider labelProvider);
+ }
+
+ /**
+ * @author Eike Stepper
+ */
+ private abstract class TransactionalBranchPointOperation
+ {
+ public boolean execute(CDOBranchPoint branchPoint)
+ {
+ CDOTransaction transaction = null;
+
+ try
+ {
+ CDOSession session = input.getSession();
+ CDOBranch branch = branchPoint.getBranch();
+
+ final long[] lastCommitTime = { 0 };
+ CDOCommitInfoManager commitInfoManager = session.getCommitInfoManager();
+ commitInfoManager.getCommitInfos(branch, Long.MAX_VALUE, null, null, -1, new CDOCommitInfoHandler()
+ {
+ public void handleCommitInfo(CDOCommitInfo commitInfo)
+ {
+ lastCommitTime[0] = commitInfo.getTimeStamp();
+ }
+ });
+
+ long timeStamp = branchPoint.getTimeStamp();
+ if (timeStamp != lastCommitTime[0])
+ {
+ String name = "branch" + (timeStamp - session.getRepositoryInfo().getCreationTime()) / 1000;
+ branch = branch.createBranch(name, timeStamp);
+ }
+
+ transaction = session.openTransaction(branch);
+ CDOUtil.configureView(transaction);
+
+ try
+ {
+ run(transaction);
+ transaction.commit();
+ return true;
+ }
+ catch (Throwable ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+ catch (Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ finally
+ {
+ LifecycleUtil.deactivate(transaction);
+ }
+
+ return false;
+ }
+
+ protected abstract void run(CDOTransaction transaction) throws Exception;
+ }
}
diff --git a/plugins/org.eclipse.emf.cdo.ui/CDOClient1.launch b/plugins/org.eclipse.emf.cdo.ui/CDOClient1.launch
index 28acd859bb..b228702446 100644
--- a/plugins/org.eclipse.emf.cdo.ui/CDOClient1.launch
+++ b/plugins/org.eclipse.emf.cdo.ui/CDOClient1.launch
@@ -6,31 +6,31 @@
<setEntry value="org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.emf.edit:1.0.300.qualifier:default:true"/>
<setEntry value="org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf.edit:1.0.300.qualifier:default:true"/>
<setEntry value="org.eclipse.emf.cdo.dawn.examples.acore.edit:1.0.400.qualifier:default:true"/>
-<setEntry value="org.eclipse.emf.cdo.edit:4.4.0.qualifier:default:true"/>
+<setEntry value="org.eclipse.emf.cdo.edit:4.4.100.qualifier:default:true"/>
<setEntry value="org.eclipse.emf.cdo.examples.company.edit:4.0.400.qualifier:default:true"/>
-<setEntry value="org.eclipse.emf.cdo.expressions.edit:4.3.100.qualifier:default:true"/>
-<setEntry value="org.eclipse.emf.cdo.security.edit:4.3.100.qualifier:default:true"/>
-<setEntry value="org.eclipse.emf.compare.edit:4.2.0.201509130440:default:true"/>
-<setEntry value="org.eclipse.emf.databinding.edit:1.3.0.v20150904-1501:default:true"/>
-<setEntry value="org.eclipse.emf.ecore.edit:2.9.0.v20150904-1501:default:true"/>
-<setEntry value="org.eclipse.emf.ecore.editor:2.11.0.v20150904-1501:default:true"/>
-<setEntry value="org.eclipse.emf.ecp.edit:1.5.0.20141210-1818:default:true"/>
-<setEntry value="org.eclipse.emf.ecp.view.categorization.model.edit:1.5.0.20141210-1818:default:true"/>
-<setEntry value="org.eclipse.emf.ecp.view.compoundcontrol.model.edit:1.5.0.20141210-1818:default:true"/>
-<setEntry value="org.eclipse.emf.ecp.view.custom.model.edit:1.5.0.20141210-1818:default:true"/>
-<setEntry value="org.eclipse.emf.ecp.view.group.model.edit:1.5.0.20141210-1818:default:true"/>
-<setEntry value="org.eclipse.emf.ecp.view.horizontal.model.edit:1.5.0.20141210-1818:default:true"/>
-<setEntry value="org.eclipse.emf.ecp.view.label.model.edit:1.5.0.20141210-1818:default:true"/>
-<setEntry value="org.eclipse.emf.ecp.view.model.edit:1.5.0.20141210-1818:default:true"/>
-<setEntry value="org.eclipse.emf.ecp.view.rule.model.edit:1.5.0.20141210-1818:default:true"/>
-<setEntry value="org.eclipse.emf.ecp.view.stack.model.edit:1.5.0.20141210-1818:default:true"/>
-<setEntry value="org.eclipse.emf.ecp.view.table.model.edit:1.5.0.20141210-1818:default:true"/>
-<setEntry value="org.eclipse.emf.ecp.view.template.model.edit:1.5.0.20141210-1818:default:true"/>
-<setEntry value="org.eclipse.emf.ecp.view.treemasterdetail.model.edit:1.5.0.20141210-1818:default:true"/>
-<setEntry value="org.eclipse.emf.ecp.view.vertical.model.edit:1.5.0.20141210-1818:default:true"/>
-<setEntry value="org.eclipse.emf.edit:2.12.0.v20150904-1501:default:true"/>
-<setEntry value="org.eclipse.gmf.codegen.edit:2.9.0.201406111907:default:true"/>
-<setEntry value="org.eclipse.gmf.runtime.notation.edit:1.7.0.201505312221:default:true"/>
+<setEntry value="org.eclipse.emf.cdo.expressions.edit:4.3.200.qualifier:default:true"/>
+<setEntry value="org.eclipse.emf.cdo.security.edit:4.3.200.qualifier:default:true"/>
+<setEntry value="org.eclipse.emf.compare.edit:4.2.1.201608311750:default:true"/>
+<setEntry value="org.eclipse.emf.databinding.edit:1.3.0.v20160526-0356:default:true"/>
+<setEntry value="org.eclipse.emf.ecore.edit:2.9.0.v20160526-0356:default:true"/>
+<setEntry value="org.eclipse.emf.ecore.editor:2.12.0.v20160526-0356:default:true"/>
+<setEntry value="org.eclipse.emf.ecp.edit:1.10.0.20160912-1709:default:true"/>
+<setEntry value="org.eclipse.emf.ecp.view.categorization.model.edit:1.10.0.20160912-1709:default:true"/>
+<setEntry value="org.eclipse.emf.ecp.view.compoundcontrol.model.edit:1.10.0.20160912-1709:default:true"/>
+<setEntry value="org.eclipse.emf.ecp.view.custom.model.edit:1.10.0.20160912-1709:default:true"/>
+<setEntry value="org.eclipse.emf.ecp.view.group.model.edit:1.10.0.20160912-1709:default:true"/>
+<setEntry value="org.eclipse.emf.ecp.view.horizontal.model.edit:1.10.0.20160912-1709:default:true"/>
+<setEntry value="org.eclipse.emf.ecp.view.label.model.edit:1.10.0.20160912-1709:default:true"/>
+<setEntry value="org.eclipse.emf.ecp.view.model.edit:1.10.0.20160912-1709:default:true"/>
+<setEntry value="org.eclipse.emf.ecp.view.rule.model.edit:1.10.0.20160912-1709:default:true"/>
+<setEntry value="org.eclipse.emf.ecp.view.stack.model.edit:1.10.0.20160912-1709:default:true"/>
+<setEntry value="org.eclipse.emf.ecp.view.table.model.edit:1.10.0.20160912-1709:default:true"/>
+<setEntry value="org.eclipse.emf.ecp.view.template.model.edit:1.10.0.20160912-1709:default:true"/>
+<setEntry value="org.eclipse.emf.ecp.view.treemasterdetail.model.edit:1.10.0.20160912-1709:default:true"/>
+<setEntry value="org.eclipse.emf.ecp.view.vertical.model.edit:1.10.0.20160912-1709:default:true"/>
+<setEntry value="org.eclipse.emf.edit:2.12.0.v20160526-0356:default:true"/>
+<setEntry value="org.eclipse.gmf.codegen.edit:2.9.0.201509291144:default:true"/>
+<setEntry value="org.eclipse.gmf.runtime.notation.edit:1.7.0.201606071631:default:true"/>
</setAttribute>
<booleanAttribute key="append.args" value="true"/>
<booleanAttribute key="askclear" value="true"/>
@@ -59,7 +59,7 @@
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog -nosplash&#13;&#10;-clean"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-XX:MaxPermSize=512m&#13;&#10;-Xms40m&#13;&#10;-Xmx2g&#13;&#10;-Dosgi.console.enable.builtin=true&#13;&#10;-Dosgi.checkConfiguration=false"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-XX:MaxPermSize=512m&#13;&#10;-Xms40m&#13;&#10;-Xmx2g&#13;&#10;-Dosgi.console.enable.builtin=true&#13;&#10;-Dosgi.checkConfiguration=false&#13;&#10;-Dorg.eclipse.emf.cdo.ui.team.history.test=false"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.platform.ide"/>
<setAttribute key="selected_features">
diff --git a/plugins/org.eclipse.emf.cdo.ui/CDOClient2.launch b/plugins/org.eclipse.emf.cdo.ui/CDOClient2.launch
index 0313f9168e..99eb590748 100644
--- a/plugins/org.eclipse.emf.cdo.ui/CDOClient2.launch
+++ b/plugins/org.eclipse.emf.cdo.ui/CDOClient2.launch
@@ -24,7 +24,7 @@
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog -nosplash&#13;&#10;-console"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m&#13;&#10;-Xmx1g&#13;&#10;-Dosgi.console.enable.builtin=true&#13;&#10;-Dosgi.checkConfiguration=false"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m&#13;&#10;-Xmx1g&#13;&#10;-Dosgi.console.enable.builtin=true&#13;&#10;-Dosgi.checkConfiguration=false&#13;&#10;-Dorg.eclipse.emf.cdo.ui.team.history.test=false"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.platform.ide"/>
<stringAttribute key="selectedPlugin" value="org.eclipse.emf.cdo"/>
diff --git a/plugins/org.eclipse.emf.cdo.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.ui/META-INF/MANIFEST.MF
index 6d1ea311e2..cfab906df5 100644
--- a/plugins/org.eclipse.emf.cdo.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.emf.cdo.ui;singleton:=true
-Bundle-Version: 4.5.100.qualifier
+Bundle-Version: 4.6.0.qualifier
Bundle-Activator: org.eclipse.emf.cdo.internal.ui.bundle.OM$Activator
Bundle-Vendor: %providerName
Bundle-ClassPath: .
@@ -27,7 +27,7 @@ Require-Bundle: org.eclipse.core.expressions;bundle-version="[3.4.0,4.0.0)";reso
org.eclipse.emf.ecp.edit;bundle-version="[1.5.0,2.0.0)";resolution:=optional,
org.eclipse.emf.ecp.edit.swt;bundle-version="[1.5.0,2.0.0)";resolution:=optional,
org.eclipse.emf.ecp.ui.view.swt;bundle-version="[1.5.0,2.0.0)";resolution:=optional
-Export-Package: org.eclipse.emf.cdo.internal.ui;version="4.5.100";
+Export-Package: org.eclipse.emf.cdo.internal.ui;version="4.6.0";
x-friends:="org.eclipse.emf.cdo.ui.ide,
org.eclipse.emf.cdo.ui.location,
org.eclipse.emf.cdo.tests.ui,
@@ -36,7 +36,7 @@ Export-Package: org.eclipse.emf.cdo.internal.ui;version="4.5.100";
org.eclipse.emf.cdo.explorer.ui,
org.eclipse.emf.cdo.ui.team,
org.eclipse.emf.cdo.ui.compare",
- org.eclipse.emf.cdo.internal.ui.actions;version="4.5.100";
+ org.eclipse.emf.cdo.internal.ui.actions;version="4.6.0";
x-friends:="org.eclipse.emf.cdo.ui.ide,
org.eclipse.emf.cdo.ui.location,
org.eclipse.emf.cdo.tests.ui,
@@ -45,7 +45,7 @@ Export-Package: org.eclipse.emf.cdo.internal.ui;version="4.5.100";
org.eclipse.emf.cdo.explorer.ui,
org.eclipse.emf.cdo.ui.team,
org.eclipse.emf.cdo.ui.compare",
- org.eclipse.emf.cdo.internal.ui.handlers;version="4.5.100";
+ org.eclipse.emf.cdo.internal.ui.handlers;version="4.6.0";
x-friends:="org.eclipse.emf.cdo.ui.ide,
org.eclipse.emf.cdo.ui.location,
org.eclipse.emf.cdo.tests.ui,
@@ -54,9 +54,9 @@ Export-Package: org.eclipse.emf.cdo.internal.ui;version="4.5.100";
org.eclipse.emf.cdo.explorer.ui,
org.eclipse.emf.cdo.ui.team,
org.eclipse.emf.cdo.ui.compare",
- org.eclipse.emf.cdo.internal.ui.actions.delegates;version="4.5.100";x-internal:=true,
- org.eclipse.emf.cdo.internal.ui.bundle;version="4.5.100";x-internal:=true,
- org.eclipse.emf.cdo.internal.ui.dialogs;version="4.5.100";
+ org.eclipse.emf.cdo.internal.ui.actions.delegates;version="4.6.0";x-internal:=true,
+ org.eclipse.emf.cdo.internal.ui.bundle;version="4.6.0";x-internal:=true,
+ org.eclipse.emf.cdo.internal.ui.dialogs;version="4.6.0";
x-friends:="org.eclipse.emf.cdo.ui.ide,
org.eclipse.emf.cdo.ui.location,
org.eclipse.emf.cdo.tests.ui,
@@ -65,7 +65,7 @@ Export-Package: org.eclipse.emf.cdo.internal.ui;version="4.5.100";
org.eclipse.emf.cdo.explorer.ui,
org.eclipse.emf.cdo.ui.team,
org.eclipse.emf.cdo.ui.compare",
- org.eclipse.emf.cdo.internal.ui.dnd;version="4.5.100";
+ org.eclipse.emf.cdo.internal.ui.dnd;version="4.6.0";
x-friends:="org.eclipse.emf.cdo.ui.ide,
org.eclipse.emf.cdo.ui.location,
org.eclipse.emf.cdo.tests.ui,
@@ -74,7 +74,7 @@ Export-Package: org.eclipse.emf.cdo.internal.ui;version="4.5.100";
org.eclipse.emf.cdo.explorer.ui,
org.eclipse.emf.cdo.ui.team,
org.eclipse.emf.cdo.ui.compare",
- org.eclipse.emf.cdo.internal.ui.editor;version="4.5.100";
+ org.eclipse.emf.cdo.internal.ui.editor;version="4.6.0";
x-friends:="org.eclipse.emf.cdo.ui.ide,
org.eclipse.emf.cdo.ui.location,
org.eclipse.emf.cdo.tests.ui,
@@ -83,7 +83,7 @@ Export-Package: org.eclipse.emf.cdo.internal.ui;version="4.5.100";
org.eclipse.emf.cdo.explorer.ui,
org.eclipse.emf.cdo.ui.team,
org.eclipse.emf.cdo.ui.compare",
- org.eclipse.emf.cdo.internal.ui.filters;version="4.5.100";
+ org.eclipse.emf.cdo.internal.ui.filters;version="4.6.0";
x-friends:="org.eclipse.emf.cdo.ui.ide,
org.eclipse.emf.cdo.ui.location,
org.eclipse.emf.cdo.tests.ui,
@@ -92,7 +92,7 @@ Export-Package: org.eclipse.emf.cdo.internal.ui;version="4.5.100";
org.eclipse.emf.cdo.explorer.ui,
org.eclipse.emf.cdo.ui.team,
org.eclipse.emf.cdo.ui.compare",
- org.eclipse.emf.cdo.internal.ui.history;version="4.5.100";
+ org.eclipse.emf.cdo.internal.ui.history;version="4.6.0";
x-friends:="org.eclipse.emf.cdo.ui.ide,
org.eclipse.emf.cdo.ui.location,
org.eclipse.emf.cdo.tests.ui,
@@ -101,7 +101,7 @@ Export-Package: org.eclipse.emf.cdo.internal.ui;version="4.5.100";
org.eclipse.emf.cdo.explorer.ui,
org.eclipse.emf.cdo.ui.team,
org.eclipse.emf.cdo.ui.compare",
- org.eclipse.emf.cdo.internal.ui.messages;version="4.5.100";
+ org.eclipse.emf.cdo.internal.ui.messages;version="4.6.0";
x-friends:="org.eclipse.emf.cdo.ui.ide,
org.eclipse.emf.cdo.ui.location,
org.eclipse.emf.cdo.tests.ui,
@@ -110,7 +110,7 @@ Export-Package: org.eclipse.emf.cdo.internal.ui;version="4.5.100";
org.eclipse.emf.cdo.explorer.ui,
org.eclipse.emf.cdo.ui.team,
org.eclipse.emf.cdo.ui.compare",
- org.eclipse.emf.cdo.internal.ui.perspectives;version="4.5.100";
+ org.eclipse.emf.cdo.internal.ui.perspectives;version="4.6.0";
x-friends:="org.eclipse.emf.cdo.ui.ide,
org.eclipse.emf.cdo.ui.location,
org.eclipse.emf.cdo.tests.ui,
@@ -119,7 +119,7 @@ Export-Package: org.eclipse.emf.cdo.internal.ui;version="4.5.100";
org.eclipse.emf.cdo.explorer.ui,
org.eclipse.emf.cdo.ui.team,
org.eclipse.emf.cdo.ui.compare",
- org.eclipse.emf.cdo.internal.ui.preferences;version="4.5.100";
+ org.eclipse.emf.cdo.internal.ui.preferences;version="4.6.0";
x-friends:="org.eclipse.emf.cdo.ui.ide,
org.eclipse.emf.cdo.ui.location,
org.eclipse.emf.cdo.tests.ui,
@@ -128,7 +128,7 @@ Export-Package: org.eclipse.emf.cdo.internal.ui;version="4.5.100";
org.eclipse.emf.cdo.explorer.ui,
org.eclipse.emf.cdo.ui.team,
org.eclipse.emf.cdo.ui.compare",
- org.eclipse.emf.cdo.internal.ui.transfer;version="4.5.100";
+ org.eclipse.emf.cdo.internal.ui.transfer;version="4.6.0";
x-friends:="org.eclipse.emf.cdo.ui.ide,
org.eclipse.emf.cdo.ui.location,
org.eclipse.emf.cdo.tests.ui,
@@ -137,7 +137,7 @@ Export-Package: org.eclipse.emf.cdo.internal.ui;version="4.5.100";
org.eclipse.emf.cdo.explorer.ui,
org.eclipse.emf.cdo.ui.team,
org.eclipse.emf.cdo.ui.compare",
- org.eclipse.emf.cdo.internal.ui.views;version="4.5.100";
+ org.eclipse.emf.cdo.internal.ui.views;version="4.6.0";
x-friends:="org.eclipse.emf.cdo.ui.ide,
org.eclipse.emf.cdo.ui.location,
org.eclipse.emf.cdo.tests.ui,
@@ -146,5 +146,5 @@ Export-Package: org.eclipse.emf.cdo.internal.ui;version="4.5.100";
org.eclipse.emf.cdo.explorer.ui,
org.eclipse.emf.cdo.ui.team,
org.eclipse.emf.cdo.ui.compare",
- org.eclipse.emf.cdo.ui;version="4.5.100",
- org.eclipse.emf.cdo.ui.widgets;version="4.5.100"
+ org.eclipse.emf.cdo.ui;version="4.6.0",
+ org.eclipse.emf.cdo.ui.widgets;version="4.6.0"
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/Branch.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/Branch.java
index 80eb9f40ba..82a9818012 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/Branch.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/Branch.java
@@ -25,7 +25,7 @@ import org.eclipse.swt.graphics.Color;
/**
* @author Eike Stepper
*/
-public class Branch extends SegmentList
+public final class Branch extends SegmentList
{
private final CDOBranch cdoBranch;
@@ -74,26 +74,22 @@ public class Branch extends SegmentList
firstCommitTime = firstCommit.getTimeStamp();
}
- CDOCommitInfo lastCommit = commitInfoManager.getLastOfBranch(cdoBranch);
- if (lastCommit != null)
- {
- lastCommitTime = lastCommit.getTimeStamp();
- }
+ lastCommitTime = commitInfoManager.getLastCommitOfBranch(cdoBranch, true);
}
}
- public final CDOBranch getCDOBranch()
+ public CDOBranch getCDOBranch()
{
return cdoBranch;
}
- public final Color getColor()
+ public Color getColor()
{
return color;
}
@Deprecated
- public final Branch getBaseBranch()
+ public Branch getBaseBranch()
{
CDOBranchPoint cdoBase = cdoBranch.getBase();
CDOBranch cdoBaseBranch = cdoBase.getBranch();
@@ -107,34 +103,34 @@ public class Branch extends SegmentList
}
@Deprecated
- public final long getBaseTime()
+ public long getBaseTime()
{
return cdoBranch.getBase().getTimeStamp();
}
- public final Branch getBaseCommitBranch()
+ public Branch getBaseCommitBranch()
{
determineBaseCommitIfNeeded();
return baseCommitBranch;
}
- public final long getBaseCommitTime()
+ public long getBaseCommitTime()
{
determineBaseCommitIfNeeded();
return baseCommitTime;
}
- public final long getFirstCommitTime()
+ public long getFirstCommitTime()
{
return firstCommitTime;
}
- public final long getLastCommitTime()
+ public long getLastCommitTime()
{
return lastCommitTime;
}
- public final Segment getSegmentFrom(Segment[] segments)
+ public Segment getSegmentFrom(Segment[] segments)
{
for (int i = 0; i < segments.length; i++)
{
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/Commit.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/Commit.java
index 53c9f1f536..974b6fb997 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/Commit.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/Commit.java
@@ -12,10 +12,15 @@ package org.eclipse.emf.cdo.internal.ui.history;
import org.eclipse.emf.cdo.common.commit.CDOCommitInfo;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.ListIterator;
+
/**
* @author Eike Stepper
*/
-public class Commit
+public final class Commit
{
private final CDOCommitInfo commitInfo;
@@ -25,32 +30,74 @@ public class Commit
private int commitCounter = -1;
+ private Commit mergeSource;
+
+ private List<Commit> mergeTargets;
+
+ private Segment mergeSegment;
+
public Commit(CDOCommitInfo commitInfo, Segment segment)
{
this.segment = segment;
this.commitInfo = commitInfo;
+
+ CDOCommitInfo mergedCommitInfo = commitInfo.getMergedCommitInfo();
+ if (mergedCommitInfo != null)
+ {
+ Net net = getNet();
+
+ mergeSource = net.getCommit(mergedCommitInfo);
+ if (mergeSource != null)
+ {
+ mergeSource.addMergeTargets(Collections.singletonList(this));
+ }
+ else
+ {
+ net.addDanglingMergeTarget(mergedCommitInfo, this);
+ }
+ }
}
- public final CDOCommitInfo getCommitInfo()
+ public CDOCommitInfo getCommitInfo()
{
return commitInfo;
}
- public final Net getNet()
+ public Net getNet()
{
return segment.getNet();
}
- public final Branch getBranch()
+ public Track getTrack()
+ {
+ return segment.getTrack();
+ }
+
+ public Branch getBranch()
{
return segment.getBranch();
}
- public final long getTime()
+ public long getTime()
{
return commitInfo.getTimeStamp();
}
+ public Commit getMergeSource()
+ {
+ return mergeSource;
+ }
+
+ public List<Commit> getMergeTargets()
+ {
+ return mergeTargets;
+ }
+
+ public Segment getMergeSegment()
+ {
+ return mergeSegment;
+ }
+
public final Segment getSegment()
{
return segment;
@@ -65,6 +112,26 @@ public class Commit
{
long time = getTime();
rowSegments = net.createRowSegments(time);
+
+ // int xxx;
+ // String dump = "row = " + time + " --> ";
+ // for (Segment segment : rowSegments)
+ // {
+ // if (segment == null)
+ // {
+ // dump += " ";
+ // }
+ // else if (segment.isMerge())
+ // {
+ // dump += ":";
+ // }
+ // else
+ // {
+ // dump += "|";
+ // }
+ // }
+ // System.out.println(dump);
+
commitCounter = netCommitCounter;
}
@@ -88,4 +155,73 @@ public class Commit
{
return "Commit[" + getTime() + " --> " + segment + "]";
}
+
+ void setMergeSource(Commit mergeSource)
+ {
+ this.mergeSource = mergeSource;
+ }
+
+ void addMergeTargets(List<Commit> mergeTargets)
+ {
+ for (Commit mergeTarget : mergeTargets)
+ {
+ addMergeTargetToList(mergeTarget);
+ }
+
+ computeMergeSegment();
+ }
+
+ private void addMergeTargetToList(Commit mergeTarget)
+ {
+ if (mergeTargets == null)
+ {
+ mergeTargets = new ArrayList<Commit>(1);
+ }
+ else
+ {
+ for (ListIterator<Commit> it = mergeTargets.listIterator(); it.hasNext();)
+ {
+ Commit commit = it.next();
+ if (commit.getTime() > mergeTarget.getTime())
+ {
+ it.previous();
+ it.add(mergeTarget);
+ return;
+ }
+ }
+ }
+
+ mergeTargets.add(mergeTarget);
+ }
+
+ private void computeMergeSegment()
+ {
+ if (mergeSegment != null)
+ {
+ mergeSegment.getTrack().removeSegment(mergeSegment);
+ mergeSegment = null;
+ }
+
+ Commit lastMergeTarget = mergeTargets.get(mergeTargets.size() - 1);
+ long lastMergeTime = lastMergeTarget.getTime();
+
+ Net net = getNet();
+ Track track = getTrack();
+ Branch branch = getBranch();
+ long commitTime = getTime();
+
+ if (isLastInBranch() && !track.hasSegment(commitTime + 1, lastMergeTime))
+ {
+ mergeSegment = new Segment(track, branch, this);
+ mergeSegment.adjustCommitTimes(commitTime + 1);
+ mergeSegment.adjustCommitTimes(lastMergeTime);
+ track.addSegment(mergeSegment, true);
+ }
+ else // if (net.hasBranchCommitBetween(mergeTarget.getBranch(), commitTime, lastMergeTime))
+ {
+ mergeSegment = net.createMergeSegment(this, lastMergeTime);
+ mergeSegment.adjustCommitTimes(commitTime);
+ mergeSegment.adjustCommitTimes(lastMergeTime);
+ }
+ }
}
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/Net.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/Net.java
index 978834948a..fab90ad52e 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/Net.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/Net.java
@@ -19,7 +19,9 @@ import org.eclipse.jface.resource.ResourceManager;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.RGB;
+import java.util.ArrayList;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import java.util.WeakHashMap;
@@ -29,8 +31,8 @@ import java.util.WeakHashMap;
public class Net
{
private static final RGB[] RGBS = new RGB[] { new RGB(133, 166, 214), new RGB(221, 205, 93), new RGB(199, 134, 57),
- new RGB(131, 150, 98), new RGB(197, 123, 127), new RGB(139, 136, 140), new RGB(48, 135, 144),
- new RGB(190, 93, 66), new RGB(143, 163, 54), new RGB(180, 148, 74), new RGB(101, 101, 217), new RGB(72, 153, 119),
+ new RGB(131, 150, 98), new RGB(197, 123, 127), new RGB(139, 136, 140), new RGB(48, 135, 144),
+ new RGB(190, 93, 66), new RGB(143, 163, 54), new RGB(180, 148, 74), new RGB(101, 101, 217), new RGB(72, 153, 119),
new RGB(23, 101, 160), new RGB(132, 164, 118), new RGB(255, 230, 59), new RGB(136, 176, 70), new RGB(255, 138, 1),
new RGB(123, 187, 95), new RGB(233, 88, 98), new RGB(93, 158, 254), new RGB(175, 215, 0), new RGB(140, 134, 142),
new RGB(232, 168, 21), new RGB(0, 172, 191), new RGB(251, 58, 4), new RGB(63, 64, 255), new RGB(27, 194, 130),
@@ -48,9 +50,11 @@ public class Net
private Track[] tracks = {};
- private Map<CDOBranch, Branch> branches = new HashMap<CDOBranch, Branch>();
+ private final Map<CDOBranch, Branch> branches = new HashMap<CDOBranch, Branch>();
- private Map<CDOCommitInfo, Commit> commits = new WeakHashMap<CDOCommitInfo, Commit>();
+ private final Map<CDOCommitInfo, Commit> commits = new WeakHashMap<CDOCommitInfo, Commit>();
+
+ private final Map<CDOCommitInfo, List<Commit>> danglingMergeTargets = new WeakHashMap<CDOCommitInfo, List<Commit>>();
private int commitCounter;
@@ -58,6 +62,8 @@ public class Net
private Commit lastCommit;
+ private boolean hideExceptions;
+
public Net(CDOSession session, CDOID objectID, ResourceManager resourceManager)
{
this.session = session;
@@ -90,44 +96,47 @@ public class Net
return lastCommit;
}
- public Color getColor(int number)
+ public final Branch getBranch(CDOBranch cdoBranch)
{
- if (colors == null)
- {
- colors = new Color[RGBS.length];
- }
-
- int index = number % RGBS.length;
- if (colors[index] == null)
+ Branch branch = branches.get(cdoBranch);
+ if (branch == null)
{
- RGB rgb = RGBS[index];
- colors[index] = resourceManager.createColor(rgb);
+ branch = new Branch(this, cdoBranch);
+ branches.put(cdoBranch, branch);
}
- return colors[index];
+ return branch;
}
- @Override
- public String toString()
+ public final Commit getCommit(CDOCommitInfo commitInfo)
{
- return "Net[" + session + ", " + objectID + "]";
+ return commits.get(commitInfo);
}
- public final Branch getBranch(CDOBranch cdoBranch)
+ /**
+ * @deprecated
+ */
+ @Deprecated
+ public final boolean hasBranchCommitBetween(Branch branch, long fromTime, long toTime)
{
- Branch branch = branches.get(cdoBranch);
- if (branch == null)
+ for (Commit commit : commits.values())
{
- branch = new Branch(this, cdoBranch);
- branches.put(cdoBranch, branch);
+ if (commit.getBranch() == branch)
+ {
+ long time = commit.getTime();
+ if (fromTime < time && time < toTime)
+ {
+ return true;
+ }
+ }
}
- return branch;
+ return false;
}
- public final Commit getCommit(CDOCommitInfo commitInfo)
+ public final Commit getOrAddCommit(CDOCommitInfo commitInfo)
{
- Commit commit = commits.get(commitInfo);
+ Commit commit = getCommit(commitInfo);
if (commit == null)
{
commit = addCommit(commitInfo);
@@ -136,6 +145,29 @@ public class Net
return commit;
}
+ public Color getColor(int number)
+ {
+ if (colors == null)
+ {
+ colors = new Color[RGBS.length];
+ }
+
+ int index = number % RGBS.length;
+ if (colors[index] == null)
+ {
+ RGB rgb = RGBS[index];
+ colors[index] = resourceManager.createColor(rgb);
+ }
+
+ return colors[index];
+ }
+
+ @Override
+ public String toString()
+ {
+ return "Net[" + session + ", " + objectID + "]";
+ }
+
private final Segment getSegment(CDOCommitInfo commitInfo)
{
CDOBranch cdoBranch = commitInfo.getBranch();
@@ -267,7 +299,7 @@ public class Net
track = createTrack();
}
- Segment segment = new Segment(track, branch);
+ Segment segment = new Segment(track, branch, null);
track.addSegment(segment, afterLast);
branch.addSegment(segment, afterLast);
@@ -338,6 +370,64 @@ public class Net
return segments;
}
+ Segment createMergeSegment(Commit mergeSource, long toTime)
+ {
+ Branch branch = mergeSource.getBranch();
+ long fromTime = mergeSource.getTime();
+
+ for (int i = 0; i < tracks.length; i++)
+ {
+ Track track = tracks[i];
+
+ Segment segment = track.getFirstSegment();
+ long previousLastTime = 0;
+
+ while (segment != null)
+ {
+ if (previousLastTime < fromTime && toTime < segment.getFirstVisualTime())
+ {
+ Segment mergeSegment = new Segment(track, branch, mergeSource);
+
+ Segment previousInTrack = segment.getPreviousInTrack();
+ if (previousInTrack != null)
+ {
+ mergeSegment.setNextInTrack(segment);
+ segment.setPreviousInTrack(mergeSegment);
+
+ mergeSegment.setPreviousInTrack(previousInTrack);
+ previousInTrack.setNextInTrack(mergeSegment);
+ }
+ else
+ {
+ track.addSegment(mergeSegment, false);
+ }
+
+ return mergeSegment;
+ }
+
+ previousLastTime = segment.getLastCommitTime();
+ if (previousLastTime > fromTime)
+ {
+ break;
+ }
+
+ segment = segment.getNextInTrack();
+ }
+
+ if (previousLastTime < fromTime && toTime < lastCommit.getTime())
+ {
+ Segment mergeSegment = new Segment(track, branch, mergeSource);
+ track.addSegment(mergeSegment, true);
+ return mergeSegment;
+ }
+ }
+
+ Track track = createTrack();
+ Segment mergeSegment = new Segment(track, branch, mergeSource);
+ track.addSegment(mergeSegment, true);
+ return mergeSegment;
+ }
+
Commit addCommit(CDOCommitInfo commitInfo)
{
Segment segment = getSegment(commitInfo);
@@ -368,11 +458,45 @@ public class Net
}
commits.put(commitInfo, commit);
+
+ List<Commit> mergeTargets = danglingMergeTargets.remove(commitInfo);
+ if (mergeTargets != null)
+ {
+ for (Commit mergeTarget : mergeTargets)
+ {
+ mergeTarget.setMergeSource(commit);
+ }
+
+ commit.addMergeTargets(mergeTargets);
+ }
+
return commit;
}
+ void addDanglingMergeTarget(CDOCommitInfo mergedCommitInfo, Commit mergeTarget)
+ {
+ List<Commit> mergeTargets = danglingMergeTargets.get(mergedCommitInfo);
+ if (mergeTargets == null)
+ {
+ mergeTargets = new ArrayList<Commit>(1);
+ danglingMergeTargets.put(mergedCommitInfo, mergeTargets);
+ }
+
+ mergeTargets.add(mergeTarget);
+ }
+
int getCommitCounter()
{
return commitCounter;
}
+
+ boolean isHideExceptions()
+ {
+ return hideExceptions;
+ }
+
+ void hideExceptions()
+ {
+ hideExceptions = true;
+ }
}
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/NetRenderer.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/NetRenderer.java
index e64d20fdde..3407d77ca2 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/NetRenderer.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/NetRenderer.java
@@ -11,11 +11,13 @@
package org.eclipse.emf.cdo.internal.ui.history;
import org.eclipse.emf.cdo.CDOObject;
+import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
import org.eclipse.emf.cdo.common.commit.CDOCommitHistory.TriggerLoadElement;
import org.eclipse.emf.cdo.common.commit.CDOCommitInfo;
import org.eclipse.emf.cdo.common.id.CDOID;
import org.eclipse.emf.cdo.internal.ui.bundle.OM;
import org.eclipse.emf.cdo.session.CDOSession;
+import org.eclipse.emf.cdo.transaction.CDOTransactionCommentator;
import org.eclipse.emf.cdo.ui.widgets.CommitHistoryComposite.Input;
import org.eclipse.emf.cdo.ui.widgets.CommitHistoryComposite.LabelProvider;
@@ -37,10 +39,12 @@ import org.eclipse.swt.widgets.TableItem;
/**
* @author Eike Stepper
*/
-public class NetRenderer implements Listener
+public final class NetRenderer implements Listener
{
private static final int ROUND_EDGE = 3;
+ private static final int ARC_SIZE = 8;
+
private static final int TRACK_OFFSET = 4;
private static final int TRACK_WIDTH = 14;
@@ -53,6 +57,10 @@ public class NetRenderer implements Listener
private final Color colorDotOutline;
+ private final Color colorBadgeFill;
+
+ private final Color colorBadgeOutline;
+
private Net net;
private GC gc;
@@ -86,6 +94,8 @@ public class NetRenderer implements Listener
ResourceManager resourceManager = labelProvider.getResourceManager();
colorDotFill = resourceManager.createColor(new RGB(220, 220, 220));
colorDotOutline = resourceManager.createColor(new RGB(110, 110, 110));
+ colorBadgeFill = resourceManager.createColor(new RGB(188, 220, 188));
+ colorBadgeOutline = resourceManager.createColor(new RGB(0, 128, 0));
Table table = tableViewer.getTable();
table.addListener(SWT.MeasureItem, this);
@@ -93,7 +103,7 @@ public class NetRenderer implements Listener
table.addListener(SWT.EraseItem, this);
}
- public final Net getNet()
+ public Net getNet()
{
return net;
}
@@ -180,7 +190,12 @@ public class NetRenderer implements Listener
}
catch (Throwable ex)
{
- OM.LOG.error(ex);
+ if (!net.isHideExceptions())
+ {
+ OM.LOG.error(ex);
+ net.hideExceptions();
+ }
+
return 0;
}
}
@@ -213,21 +228,40 @@ public class NetRenderer implements Listener
}
String text = labelProvider.getColumnText(commitInfo, columnIndex);
- int width = drawText(text, x, cellHeightHalf, justMeasureWidth);
+
+ if (columnIndex == 1)
+ {
+ CDOBranchPoint mergeSource = commitInfo.getMergeSource();
+ if (mergeSource != null && !text.startsWith(CDOTransactionCommentator.MERGE_PREFIX))
+ {
+ StringBuilder builder = new StringBuilder();
+ CDOTransactionCommentator.appendMerge(builder, mergeSource);
+
+ if (text.length() != 0)
+ {
+ builder.append(", ");
+ builder.append(text);
+ }
+
+ text = builder.toString();
+ }
+ }
+
+ int width = drawText(text, x, cellHeightHalf, false, justMeasureWidth);
x += width;
if (commitInfo instanceof TriggerLoadElement)
{
if (width != 0)
{
- width += 2 * TRACK_OFFSET;
+ width += 4 * TRACK_OFFSET;
}
if (!justMeasureWidth)
{
int y = cellHeightHalf + 1;
int x2 = gc.getClipping().width;
- drawLine(colorDotOutline, width, y, x2, y);
+ drawLine(width, y, x2, y, colorDotOutline);
}
}
@@ -236,83 +270,122 @@ public class NetRenderer implements Listener
private int drawCommit(CDOCommitInfo commitInfo, boolean justMeasureWidth)
{
- Commit commit = net.getCommit(commitInfo);
+ Commit commit = net.getOrAddCommit(commitInfo);
Segment[] segments = commit.getRowSegments();
+ Segment commitSegment = commit.getSegment();
+ long commitTime = commit.getTime();
+ boolean commitLastInBranch = commitTime == commitSegment.getLastCommitTime();
if (!justMeasureWidth)
{
- Segment commitSegment = commit.getSegment();
- long commitTime = commit.getTime();
+ Track commitTrack = commitSegment.getTrack();
+ Color commitColor = commitSegment.getBranch().getColor();
+ int commitTrackPosition = commitTrack.getPosition();
+ int commitTrackCenter = getTrackCenter(commitTrackPosition);
for (int i = 0; i < segments.length; i++)
{
Segment segment = segments[i];
- if (segment != null)
+ if (segment != null && segment != commitSegment)
{
Branch branch = segment.getBranch();
- Color color = branch.getColor();
+ boolean merge = segment.isMerge();
+ Color color = branch.getColor();
+ int lineStyle = merge ? SWT.LINE_DOT : SWT.LINE_SOLID;
int trackCenter = getTrackCenter(i);
- if (segment != commitSegment)
+
+ int positionDelta = Math.abs(i - commitTrackPosition);
+
+ int horizontal = (positionDelta - 1) * TRACK_WIDTH + 6 + ROUND_EDGE;
+ if (i < commitTrackPosition)
{
- if (commitTime == segment.getFirstVisualTime() && segment.isComplete())
- {
- Track commitTrack = commitSegment.getTrack();
- int commitTrackPosition = commitTrack.getPosition();
- int commitTrackCenter = getTrackCenter(commitTrackPosition);
- int positionDelta = Math.abs(i - commitTrackPosition);
-
- int horizontal = (positionDelta - 1) * TRACK_WIDTH + 6 + ROUND_EDGE;
- if (i < commitTrackPosition)
- {
- horizontal = -horizontal;
- }
-
- LinePlotter plotter = new LinePlotter(color, commitTrackCenter, cellHeightHalf);
- plotter.relative(horizontal, 0);
- plotter.absolute(getTrackCenter(i), ROUND_EDGE);
- plotter.relative(0, -ROUND_EDGE);
- }
- else
+ horizontal = -horizontal;
+ }
+
+ if (merge ? commitTime == segment.getLastCommitTime() || commitTime == segment.getFirstCommitTime()
+ : commitTime == segment.getFirstVisualTime() && segment.isComplete())
+ {
+ // Plot horizontal line to left or right and a round edge up or down.
+ boolean down = merge && commitTime == segment.getLastCommitTime();
+ drawHorizontalLineWithRoundEdge(color, lineStyle, commitTrackCenter, trackCenter, horizontal, down);
+ }
+ else
+ {
+ Commit mergeSource = commit.getMergeSource();
+ if (mergeSource != null && mergeSource == segment.getMergeSource())
{
- // Full vertical line
- drawLine(color, trackCenter, 0, trackCenter, cellHeight);
+ drawHorizontalLineWithRoundEdge(color, lineStyle, commitTrackCenter, trackCenter, horizontal, true);
}
+
+ // Draw full vertical line.
+ drawLine(trackCenter, 0, trackCenter, cellHeight, color, lineStyle);
}
}
+ }
- Color color = commitSegment.getBranch().getColor();
- int position = commitSegment.getTrack().getPosition();
- int trackCenter = getTrackCenter(position);
-
- if (commitTime < commitSegment.getLastCommitTime())
+ if (!commitLastInBranch)
+ {
+ // Draw half vertical line up (solid).
+ drawLine(commitTrackCenter, 0, commitTrackCenter, cellHeightHalf, commitColor);
+ }
+ else if (commit.getMergeTargets() != null)
+ {
+ Segment mergeSegment = commit.getMergeSegment();
+ if (mergeSegment != null && mergeSegment.getTrack() == commitTrack)
{
- // Half vertical line to top
- drawLine(color, trackCenter, 0, trackCenter, cellHeightHalf);
+ // Draw half vertical line up (dotted).
+ drawLine(commitTrackCenter, 0, commitTrackCenter, cellHeightHalf, commitColor, SWT.LINE_DOT);
}
+ }
- if (commitTime > commitSegment.getFirstVisualTime() || !commitSegment.isComplete())
+ if (commitTime > commitSegment.getFirstVisualTime() || !commitSegment.isComplete())
+ {
+ if (!commitInfo.isInitialCommit())
{
- if (!commitInfo.isInitialCommit())
- {
- // Half vertical line to bottom
- drawLine(color, trackCenter, cellHeightHalf, trackCenter, cellHeight);
- }
+ // Draw half vertical line down (solid).
+ drawLine(commitTrackCenter, cellHeightHalf, commitTrackCenter, cellHeight, commitColor);
}
-
- int dotX = trackCenter - dotSizeHalf - 1;
- int dotY = cellHeightHalf - dotSizeHalf;
- drawDot(dotX, dotY, dotSize, dotSize);
}
+
+ // Draw center dot.
+ int dotX = commitTrackCenter - dotSizeHalf - 1;
+ int dotY = cellHeightHalf - dotSizeHalf;
+ drawDot(dotX, dotY, dotSize, dotSize);
}
- return getTrackX(segments.length);
+ int x = getTrackX(segments.length);
+
+ if (commitLastInBranch)
+ {
+ String branchLabel = labelProvider.getBranchString(commit.getBranch().getCDOBranch());
+
+ x += TRACK_OFFSET;
+ x += drawText(branchLabel, x + TRACK_OFFSET, cellHeightHalf, true, justMeasureWidth);
+ }
+
+ return x;
}
- private void drawLine(Color color, int x1, int y1, int x2, int y2)
+ private void drawHorizontalLineWithRoundEdge(Color color, int lineStyle, int commitTrackCenter, int trackCenter,
+ int horizontal, boolean down)
+ {
+ LinePlotter plotter = new LinePlotter(color, lineStyle, commitTrackCenter, cellHeightHalf);
+ plotter.relative(horizontal, 0);
+ plotter.absolute(trackCenter, down ? cellHeight - ROUND_EDGE : ROUND_EDGE);
+ plotter.relative(0, down ? ROUND_EDGE : -ROUND_EDGE);
+ }
+
+ private void drawLine(int x1, int y1, int x2, int y2, Color color)
+ {
+ drawLine(x1, y1, x2, y2, color, SWT.LINE_SOLID);
+ }
+
+ private void drawLine(int x1, int y1, int x2, int y2, Color color, int lineStyle)
{
gc.setForeground(color);
gc.setLineWidth(LINE_WIDTH);
+ gc.setLineStyle(lineStyle);
gc.drawLine(cellX + x1, cellY + y1, cellX + x2, cellY + y2);
}
@@ -322,26 +395,52 @@ public class NetRenderer implements Listener
int dotY = cellY + y + 1;
int dotW = w - 2;
int dotH = h - 2;
+
gc.setBackground(colorDotFill);
gc.fillOval(dotX, dotY, dotW, dotH);
+
gc.setForeground(colorDotOutline);
gc.setLineWidth(2);
+ gc.setLineStyle(SWT.LINE_SOLID);
gc.drawOval(dotX, dotY, dotW, dotH);
}
- private int drawText(final String msg, final int x, final int y, boolean justMeasureWidth)
+ private int drawText(String msg, int x, int y, boolean badge, boolean justMeasureWidth)
{
Point extent = gc.textExtent(msg);
+ int width = extent.x;
+
+ if (badge)
+ {
+ width += 2 * TRACK_OFFSET;
+ }
+
if (!justMeasureWidth)
{
- int textY = (y * 2 - extent.y) / 2;
+ x += cellX;
+ y = (y * 2 - extent.y) / 2 + cellY - 1;
+ int height = extent.y + 1;
+
+ if (badge)
+ {
+ gc.setBackground(colorBadgeFill);
+ gc.fillRoundRectangle(x + 2, y + 2, width - 3, height - 3, ARC_SIZE, ARC_SIZE);
+
+ gc.setLineWidth(1);
+ gc.setLineStyle(SWT.LINE_SOLID);
+ gc.setForeground(colorBadgeOutline);
+ gc.drawRoundRectangle(x, y, width, height, ARC_SIZE, ARC_SIZE);
+ }
+ else
+ {
+ gc.setBackground(cellBackground);
+ }
+
gc.setForeground(cellForeground);
- gc.setBackground(cellBackground);
- gc.setBackground(cellBackground);
- gc.drawString(msg, cellX + x, cellY + textY, true);
+ gc.drawString(msg, x + TRACK_OFFSET + 1, y + 1, true);
}
- return extent.x;
+ return width;
}
private int getTrackX(int position)
@@ -361,13 +460,16 @@ public class NetRenderer implements Listener
{
private final Color color;
+ private final int lineStyle;
+
private int x;
private int y;
- public LinePlotter(Color color, int x, int y)
+ public LinePlotter(Color color, int lineStyle, int x, int y)
{
this.color = color;
+ this.lineStyle = lineStyle;
this.x = x;
this.y = y;
}
@@ -378,12 +480,12 @@ public class NetRenderer implements Listener
int fromY = y;
x += width;
y += height;
- drawLine(color, fromX, fromY, x, y);
+ drawLine(fromX, fromY, x, y, color, lineStyle);
}
public void absolute(int x, int y)
{
- drawLine(color, this.x, this.y, x, y);
+ drawLine(this.x, this.y, x, y, color, lineStyle);
this.x = x;
this.y = y;
}
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/Segment.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/Segment.java
index 4621cc0dda..58d0e01a01 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/Segment.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/Segment.java
@@ -13,12 +13,14 @@ package org.eclipse.emf.cdo.internal.ui.history;
/**
* @author Eike Stepper
*/
-public class Segment
+public final class Segment
{
private final Track track;
private final Branch branch;
+ private final Commit mergeSource;
+
private boolean complete;
private long firstVisualTime;
@@ -35,73 +37,84 @@ public class Segment
private Segment nextInBranch;
- public Segment(Track track, Branch branch)
+ public Segment(Track track, Branch branch, Commit mergeSource)
{
this.track = track;
this.branch = branch;
+ this.mergeSource = mergeSource;
}
- public final Net getNet()
+ public Net getNet()
{
return track.getNet();
}
- public final Track getTrack()
+ public Track getTrack()
{
return track;
}
- public final Branch getBranch()
+ public Branch getBranch()
{
return branch;
}
- public final boolean isComplete()
+ public Commit getMergeSource()
+ {
+ return mergeSource;
+ }
+
+ public boolean isMerge()
+ {
+ return mergeSource != null;
+ }
+
+ public boolean isComplete()
{
return complete;
}
- public final long getFirstVisualTime()
+ public long getFirstVisualTime()
{
return firstVisualTime;
}
- public final long getFirstCommitTime()
+ public long getFirstCommitTime()
{
return firstCommitTime;
}
- public final long getLastCommitTime()
+ public long getLastCommitTime()
{
return lastCommitTime;
}
- public final Segment getPreviousInTrack()
+ public Segment getPreviousInTrack()
{
return previousInTrack;
}
- public final Segment getNextInTrack()
+ public Segment getNextInTrack()
{
return nextInTrack;
}
- public final Segment getPreviousInBranch()
+ public Segment getPreviousInBranch()
{
return previousInBranch;
}
- public final Segment getNextInBranch()
+ public Segment getNextInBranch()
{
return nextInBranch;
}
- public final boolean containsCommitTime(long time)
+ public boolean containsCommitTime(long time)
{
return time >= firstCommitTime && time <= lastCommitTime;
}
- public final boolean containsVisualTime(long time)
+ public boolean containsVisualTime(long time)
{
return time >= getFirstVisualTime() && time <= lastCommitTime;
}
@@ -114,9 +127,17 @@ public class Segment
void adjustVisualTime(long time, boolean complete)
{
- if (firstVisualTime == 0 || time < firstVisualTime)
+ if (isMerge())
+ {
+ firstVisualTime = firstCommitTime;
+ this.complete = true;
+ }
+ else
{
- firstVisualTime = time;
+ if (firstVisualTime == 0 || time < firstVisualTime)
+ {
+ firstVisualTime = time;
+ }
}
this.complete |= complete;
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/SegmentList.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/SegmentList.java
index 6aa7b0895c..8fcef0aae9 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/SegmentList.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/SegmentList.java
@@ -78,6 +78,30 @@ public abstract class SegmentList
}
}
+ void removeSegment(Segment segment)
+ {
+ Segment nextSegment = getNextSegment(segment);
+ Segment previousSegment = getPreviousSegment(segment);
+
+ if (nextSegment != null)
+ {
+ setPreviousSegment(nextSegment, previousSegment);
+ }
+ else
+ {
+ lastSegment = previousSegment;
+ }
+
+ if (previousSegment != null)
+ {
+ setNextSegment(previousSegment, nextSegment);
+ }
+ else
+ {
+ firstSegment = nextSegment;
+ }
+ }
+
protected abstract Segment getNextSegment(Segment segment);
protected abstract void setNextSegment(Segment segment, Segment nextSegment);
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/Track.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/Track.java
index e6fbde769a..2d4c08453a 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/Track.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/Track.java
@@ -13,7 +13,7 @@ package org.eclipse.emf.cdo.internal.ui.history;
/**
* @author Eike Stepper
*/
-public class Track extends SegmentList
+public final class Track extends SegmentList
{
private final int position;
@@ -28,6 +28,28 @@ public class Track extends SegmentList
return position;
}
+ public boolean hasSegment(long fromTime, long toTime)
+ {
+ Segment segment = getLastSegment();
+
+ while (segment != null)
+ {
+ if (segment.getLastCommitTime() < fromTime)
+ {
+ return false;
+ }
+
+ if (segment.getFirstVisualTime() < toTime)
+ {
+ return true;
+ }
+
+ segment = segment.getPreviousInTrack();
+ }
+
+ return false;
+ }
+
@Override
public String toString()
{
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/widgets/CommitHistoryComposite.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/widgets/CommitHistoryComposite.java
index 7fdbb63793..58c544ba42 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/widgets/CommitHistoryComposite.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/widgets/CommitHistoryComposite.java
@@ -13,6 +13,7 @@ package org.eclipse.emf.cdo.ui.widgets;
import org.eclipse.emf.cdo.CDOObject;
import org.eclipse.emf.cdo.CDOState;
import org.eclipse.emf.cdo.common.branch.CDOBranch;
+import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
import org.eclipse.emf.cdo.common.commit.CDOCommitHistory;
import org.eclipse.emf.cdo.common.commit.CDOCommitHistory.TriggerLoadElement;
import org.eclipse.emf.cdo.common.commit.CDOCommitInfo;
@@ -50,8 +51,6 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.spi.cdo.CDOSessionProtocol;
import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IDoubleClickListener;
import org.eclipse.jface.viewers.IOpenListener;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
@@ -83,6 +82,20 @@ public class CommitHistoryComposite extends Composite
}
};
+ private CDOCommitInfoHandler revealElementHandler = new CDOCommitInfoHandler()
+ {
+ public void handleCommitInfo(final CDOCommitInfo commitInfo)
+ {
+ getDisplay().asyncExec(new Runnable()
+ {
+ public void run()
+ {
+ tableViewer.reveal(commitInfo);
+ }
+ });
+ }
+ };
+
private int viewerStyle;
private TableViewer tableViewer;
@@ -116,14 +129,6 @@ public class CommitHistoryComposite extends Composite
}
});
- tableViewer.addDoubleClickListener(new IDoubleClickListener()
- {
- public void doubleClick(DoubleClickEvent event)
- {
- doubleClicked();
- }
- });
-
tableViewer.addOpenListener(new IOpenListener()
{
public void open(OpenEvent event)
@@ -198,18 +203,31 @@ public class CommitHistoryComposite extends Composite
public void refreshLayout()
{
+ refreshLayout(false);
+ }
+
+ /**
+ * @since 4.6
+ */
+ public void refreshLayout(boolean refreshCommits)
+ {
+ Table table = tableViewer.getTable();
+ int topIndex = table.getTopIndex();
+
netRenderer.setInput(input);
- CDOCommitInfo[] elements = history.getElements();
- for (int i = 0; i < elements.length; i++)
+
+ if (refreshCommits)
{
- CDOCommitInfo commitInfo = elements[i];
- netRenderer.addCommit(commitInfo);
+ CDOCommitInfo[] elements = history.getElements();
+ for (int i = 0; i < elements.length; i++)
+ {
+ CDOCommitInfo commitInfo = elements[i];
+ netRenderer.addCommit(commitInfo);
+ }
}
- Table table = tableViewer.getTable();
- table.setTopIndex(0);
tableViewer.setInput(history);
- table.setTopIndex(0);
+ table.setTopIndex(topIndex);
}
public final CDOCommitHistory getHistory()
@@ -273,7 +291,7 @@ public class CommitHistoryComposite extends Composite
{
if (commitInfo instanceof TriggerLoadElement)
{
- history.triggerLoad(new RevealElementHandler());
+ history.triggerLoad(revealElementHandler);
}
else
{
@@ -283,23 +301,6 @@ public class CommitHistoryComposite extends Composite
}
/**
- * @author Eike Stepper
- */
- private final class RevealElementHandler implements CDOCommitInfoHandler
- {
- public void handleCommitInfo(final CDOCommitInfo commitInfo)
- {
- getDisplay().asyncExec(new Runnable()
- {
- public void run()
- {
- tableViewer.reveal(commitInfo);
- }
- });
- }
- }
-
- /**
* Encapsulates the input of a {@link CommitHistoryComposite}.
*
* @author Eike Stepper
@@ -600,6 +601,8 @@ public class CommitHistoryComposite extends Composite
private boolean formatTimeStamps = true;
+ private boolean shortenBranchPaths = true;
+
public LabelProvider()
{
addColumn(new Column<CDOCommitInfo>("Time", 160)
@@ -612,12 +615,7 @@ public class CommitHistoryComposite extends Composite
return StringUtil.EMPTY;
}
- if (formatTimeStamps)
- {
- return CDOCommonUtil.formatTimeStamp(commitInfo.getTimeStamp());
- }
-
- return "" + commitInfo.getTimeStamp();
+ return getTimeStampString(commitInfo.getTimeStamp());
}
@Override
@@ -697,11 +695,11 @@ public class CommitHistoryComposite extends Composite
{
if (builder == null)
{
- builder = new StringBuilder(commitBranch.getPathName());
+ builder = new StringBuilder(getBranchString(commitBranch));
}
builder.append(", ");
- builder.append(childBranch.getPathName());
+ builder.append(getBranchString(childBranch));
}
}
@@ -710,7 +708,7 @@ public class CommitHistoryComposite extends Composite
return builder.toString();
}
- return commitBranch.getPathName();
+ return getBranchString(commitBranch);
}
@Override
@@ -729,6 +727,26 @@ public class CommitHistoryComposite extends Composite
return (Image)getResource(BRANCH_GRAY);
}
});
+
+ addColumn(new Column<CDOCommitInfo>("Merge Source", 160)
+ {
+ @Override
+ public String getText(CDOCommitInfo commitInfo)
+ {
+ if (commitInfo instanceof CDOCommitHistory.TriggerLoadElement)
+ {
+ return null;
+ }
+
+ CDOBranchPoint mergeSource = commitInfo.getMergeSource();
+ if (mergeSource != null)
+ {
+ return getBranchString(mergeSource.getBranch()) + ", " + getTimeStampString(mergeSource.getTimeStamp());
+ }
+
+ return null;
+ }
+ });
}
public String getLocalUserID()
@@ -760,5 +778,47 @@ public class CommitHistoryComposite extends Composite
{
this.formatTimeStamps = formatTimeStamps;
}
+
+ /**
+ * @since 4.6
+ */
+ public boolean isShortenBranchPaths()
+ {
+ return shortenBranchPaths;
+ }
+
+ /**
+ * @since 4.6
+ */
+ public void setShortenBranchPaths(boolean shortenBranchPaths)
+ {
+ this.shortenBranchPaths = shortenBranchPaths;
+ }
+
+ /**
+ * @since 4.6
+ */
+ public String getBranchString(CDOBranch branch)
+ {
+ if (shortenBranchPaths)
+ {
+ return branch.getName();
+ }
+
+ return branch.getPathName();
+ }
+
+ /**
+ * @since 4.6
+ */
+ public String getTimeStampString(long timeStamp)
+ {
+ if (formatTimeStamps)
+ {
+ return CDOCommonUtil.formatTimeStamp(timeStamp);
+ }
+
+ return "" + timeStamp;
+ }
}
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/transaction/CDOCommitContext.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/transaction/CDOCommitContext.java
index 6b5ad71e06..f5dd317c6a 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/transaction/CDOCommitContext.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/transaction/CDOCommitContext.java
@@ -13,6 +13,7 @@ package org.eclipse.emf.cdo.transaction;
import org.eclipse.emf.cdo.CDOObject;
import org.eclipse.emf.cdo.common.branch.CDOBranch;
+import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
import org.eclipse.emf.cdo.common.commit.CDOCommitData;
import org.eclipse.emf.cdo.common.id.CDOID;
import org.eclipse.emf.cdo.common.lob.CDOLob;
@@ -70,6 +71,11 @@ public interface CDOCommitContext
public String getCommitComment();
/**
+ * @since 4.6
+ */
+ public CDOBranchPoint getCommitMergeSource();
+
+ /**
* Returns a list of the new {@link CDOPackageUnit package units} that are to be committed with this commit context.
*/
public List<CDOPackageUnit> getNewPackageUnits();
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/transaction/CDOTransactionCommentator.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/transaction/CDOTransactionCommentator.java
index add2bba186..8cab9fa39e 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/transaction/CDOTransactionCommentator.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/transaction/CDOTransactionCommentator.java
@@ -10,6 +10,9 @@
*/
package org.eclipse.emf.cdo.transaction;
+import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
+import org.eclipse.emf.cdo.common.util.CDOCommonUtil;
+
import org.eclipse.net4j.util.collection.Closeable;
import org.eclipse.net4j.util.event.IListener;
import org.eclipse.net4j.util.lifecycle.ILifecycle;
@@ -24,6 +27,11 @@ import org.eclipse.net4j.util.lifecycle.LifecycleEventAdapter;
*/
public class CDOTransactionCommentator implements Closeable
{
+ /**
+ * @since 4.6
+ */
+ public static final String MERGE_PREFIX = "Merge from ";
+
private final IListener transactionListener = new LifecycleEventAdapter()
{
@Override
@@ -85,11 +93,29 @@ public class CDOTransactionCommentator implements Closeable
private CDOTransaction transaction;
+ private boolean showMerges;
+
public CDOTransactionCommentator(CDOTransaction transaction)
{
+ this(transaction, false);
+ }
+
+ /**
+ * @since 4.6
+ */
+ public CDOTransactionCommentator(final CDOTransaction transaction, boolean showMerges)
+ {
this.transaction = transaction;
- transaction.addListener(transactionListener);
- transaction.addTransactionHandler(transactionHandler);
+ this.showMerges = showMerges;
+
+ transaction.syncExec(new Runnable()
+ {
+ public void run()
+ {
+ transaction.addListener(transactionListener);
+ transaction.addTransactionHandler(transactionHandler);
+ }
+ });
}
public final CDOTransaction getTransaction()
@@ -97,6 +123,28 @@ public class CDOTransactionCommentator implements Closeable
return transaction;
}
+ /**
+ * @since 4.6
+ */
+ public final boolean isShowMerges()
+ {
+ return showMerges;
+ }
+
+ /**
+ * @since 4.6
+ */
+ public final void setShowMerges(final boolean showMerges)
+ {
+ transaction.syncExec(new Runnable()
+ {
+ public void run()
+ {
+ CDOTransactionCommentator.this.showMerges = showMerges;
+ }
+ });
+ }
+
public final boolean isClosed()
{
return transaction == null;
@@ -104,28 +152,68 @@ public class CDOTransactionCommentator implements Closeable
public void close()
{
- transaction.removeTransactionHandler(transactionHandler);
- transaction.removeListener(transactionListener);
+ transaction.syncExec(new Runnable()
+ {
+ public void run()
+ {
+ transaction.removeTransactionHandler(transactionHandler);
+ transaction.removeListener(transactionListener);
+ }
+ });
+
transaction = null;
}
protected String createComment(CDOCommitContext commitContext)
{
- StringBuilder builder = new StringBuilder("<");
+ StringBuilder builder = new StringBuilder();
appendSummary(builder, commitContext);
- builder.append(">");
return builder.toString();
}
/**
+ * @since 4.6
+ */
+ public static boolean appendMerge(StringBuilder builder, CDOBranchPoint mergeSource)
+ {
+ if (mergeSource != null)
+ {
+ builder.append(MERGE_PREFIX);
+ builder.append(mergeSource.getBranch().getPathName());
+ builder.append(", ");
+ builder.append(CDOCommonUtil.formatTimeStamp(mergeSource.getTimeStamp()));
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
* @since 4.2
*/
public static void appendSummary(StringBuilder builder, CDOCommitContext commitContext)
{
+ appendSummary(builder, commitContext, false);
+ }
+
+ /**
+ * @since 4.6
+ */
+ public static boolean appendSummary(StringBuilder builder, CDOCommitContext commitContext, boolean showMerges)
+ {
boolean needComma = false;
+
+ if (showMerges)
+ {
+ CDOBranchPoint mergeSource = commitContext.getCommitMergeSource();
+ needComma |= appendMerge(builder, mergeSource);
+ }
+
needComma |= appendSummary(builder, needComma, commitContext.getNewObjects().size(), "addition");
needComma |= appendSummary(builder, needComma, commitContext.getDirtyObjects().size(), "change");
needComma |= appendSummary(builder, needComma, commitContext.getDetachedObjects().size(), "removal");
+
+ return needComma;
}
private static boolean appendSummary(StringBuilder builder, boolean needComma, int count, String label)
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/messages/messages.properties b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/messages/messages.properties
index ef9c3e0637..614542e052 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/messages/messages.properties
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/messages/messages.properties
@@ -89,10 +89,17 @@ ObjectNotFoundException.0=Object {0} not found
ObjectNotFoundException.1=Object {0} not found in branch {1} at {2}
InvalidObjectException.0=Object {0} is invalid in branch {1} at {2}
InvalidURIException.0=Invalid URI "{0}": {1}
+SyncRevisionsRequest.2=Did not expect to receive object with id {0}
OpenSessionRequest.0=Repository {0} not found
OpenSessionRequest.3=Failed to open session for repository {0}
-SyncRevisionsRequest.2=Did not expect to receive object with id {0}
SessionPropertyTester_0=ID
+SessionPropertyTester_3=The ID of this session.
+SessionPropertyTester_4=User
+SessionPropertyTester_5=The ID of the authenticated user of this session.
+SessionPropertyTester_6=Passive Updates Enabled
+SessionPropertyTester_7=Whether this session is receiving passive updates from the repository.
+SessionPropertyTester_8=Passive Updates Mode
+SessionPropertyTester_9=One of INVALIDATIONS, CHANGES, ADDITIONS.
SessionPropertyTester_10=Name
SessionPropertyTester_11=The name of the repository of this session.
SessionPropertyTester_12=UUID
@@ -125,10 +132,5 @@ SessionPropertyTester_38=Serialize Commits
SessionPropertyTester_39=Whether the repository of this session is serializing commits.
SessionPropertyTester_40=Authenticating
SessionPropertyTester_41=Whether the repository of this session is authenticating users.
-SessionPropertyTester_3=The ID of this session.
-SessionPropertyTester_4=User
-SessionPropertyTester_5=The ID of the authenticated user of this session.
-SessionPropertyTester_6=Passive Updates Enabled
-SessionPropertyTester_7=Whether this session is receiving passive updates from the repository.
-SessionPropertyTester_8=Passive Updates Mode
-SessionPropertyTester_9=One of INVALIDATIONS, CHANGES, ADDITIONS.
+SessionPropertyTester_42=Commit Info Storage
+SessionPropertyTester_43=One of NO, YES, WITH_MERGE_SOURCE.
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOSessionImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOSessionImpl.java
index 576281409c..2d8555a313 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOSessionImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOSessionImpl.java
@@ -1990,7 +1990,8 @@ public abstract class CDOSessionImpl extends CDOTransactionContainerImpl
Map<CDORevision, CDOPermission> oldPermissions = null;
Map<CDOID, InternalCDORevision> oldRevisions = null;
- boolean success = commitInfo.getBranch() != null;
+ CDOBranch branch = commitInfo.getBranch();
+ boolean success = branch != null;
if (success)
{
oldRevisions = reviseRevisions();
@@ -1999,6 +2000,8 @@ public abstract class CDOSessionImpl extends CDOTransactionContainerImpl
{
oldPermissions = updatePermissions(views);
}
+
+ commitInfoManager.setLastCommitOfBranch(branch, timeStamp);
}
if (options.isPassiveUpdateEnabled()/* || sender != null */)
@@ -2295,6 +2298,11 @@ public abstract class CDOSessionImpl extends CDOTransactionContainerImpl
return commitInfo.getPreviousTimeStamp();
}
+ public CDOCommitInfo getPreviousCommitInfo()
+ {
+ return commitInfo.getPreviousCommitInfo();
+ }
+
public String getUserID()
{
return commitInfo.getUserID();
@@ -2305,6 +2313,18 @@ public abstract class CDOSessionImpl extends CDOTransactionContainerImpl
return commitInfo.getComment();
}
+ public CDOBranchPoint getMergeSource()
+ {
+ return commitInfo.getMergeSource();
+ }
+
+ public CDOCommitInfo getMergedCommitInfo()
+ {
+ CDOBranchPoint mergeSource = getMergeSource();
+ return mergeSource == null ? null
+ : commitInfoManager.getCommitInfo(mergeSource.getBranch(), mergeSource.getTimeStamp(), false);
+ }
+
public boolean isEmpty()
{
return false;
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/SessionProperties.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/SessionProperties.java
index eb77cc0716..52f98474cf 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/SessionProperties.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/SessionProperties.java
@@ -243,6 +243,17 @@ public class SessionProperties extends Properties<CDOSession> implements CDOComm
}
});
+ add(new Property<CDOSession>("commitInfoStorage", Messages.getString("SessionPropertyTester_42"), //
+ Messages.getString("SessionPropertyTester_43"), //$NON-NLS-1$
+ CATEGORY_REPOSITORY)
+ {
+ @Override
+ protected Object eval(CDOSession session)
+ {
+ return session.getRepositoryInfo().getCommitInfoStorage();
+ }
+ });
+
add(new Property<CDOSession>("storeType", Messages.getString("SessionPropertyTester_24"), //
Messages.getString("SessionPropertyTester_25"), //$NON-NLS-1$
CATEGORY_REPOSITORY)
@@ -337,6 +348,11 @@ public class SessionProperties extends Properties<CDOSession> implements CDOComm
throw new UnsupportedOperationException();
}
+ public CommitInfoStorage getCommitInfoStorage()
+ {
+ throw new UnsupportedOperationException();
+ }
+
public CDOID getRootResourceID()
{
throw new UnsupportedOperationException();
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOSingleTransactionStrategyImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOSingleTransactionStrategyImpl.java
index b648f83df9..de7f8331a7 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOSingleTransactionStrategyImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOSingleTransactionStrategyImpl.java
@@ -12,6 +12,7 @@
package org.eclipse.emf.internal.cdo.transaction;
import org.eclipse.emf.cdo.common.branch.CDOBranch;
+import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
import org.eclipse.emf.cdo.common.commit.CDOCommitData;
import org.eclipse.emf.cdo.common.commit.CDOCommitInfo;
import org.eclipse.emf.cdo.common.protocol.CDOProtocolConstants;
@@ -99,17 +100,22 @@ public class CDOSingleTransactionStrategyImpl implements CDOTransactionStrategy
String comment = transaction.getCommitComment();
transaction.setCommitComment(null);
+ CDOBranchPoint mergeSource = transaction.getCommitMergeSource();
+ transaction.setCommitMergeSource(null);
+
long previousTimeStamp = result.getPreviousTimeStamp();
CDOBranch branch = transaction.getBranch();
long timeStamp = result.getTimeStamp();
String userID = session.getUserID();
InternalCDOCommitInfoManager commitInfoManager = session.getCommitInfoManager();
- return commitInfoManager.createCommitInfo(branch, timeStamp, previousTimeStamp, userID, comment, commitData);
+ return commitInfoManager.createCommitInfo(branch, timeStamp, previousTimeStamp, userID, comment, mergeSource,
+ commitData);
}
public void rollback(InternalCDOTransaction transaction, InternalCDOUserSavepoint savepoint)
{
+ transaction.setCommitMergeSource(null);
transaction.handleRollback((InternalCDOSavepoint)savepoint);
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java
index 5323472d1f..978caadc5c 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java
@@ -249,6 +249,8 @@ public class CDOTransactionImpl extends CDOViewImpl implements InternalCDOTransa
private CommitToken commitToken;
+ private CDOBranchPoint commitMergeSource;
+
// Bug 283985 (Re-attachment)
private final ThreadLocal<Boolean> providingCDOID = new InheritableThreadLocal<Boolean>()
{
@@ -602,6 +604,9 @@ public class CDOTransactionImpl extends CDOViewImpl implements InternalCDOTransa
CDORevisionAvailabilityInfo targetBaseInfo = mergeData.getTargetBaseInfo();
CDORevisionAvailabilityInfo targetInfo = mergeData.getTargetInfo();
ApplyChangeSetResult changeSet = applyChangeSet(result, targetBaseInfo, targetInfo, source, false);
+
+ commitMergeSource = source;
+
return changeSet.getChangeSetData();
}
finally
@@ -3779,6 +3784,40 @@ public class CDOTransactionImpl extends CDOViewImpl implements InternalCDOTransa
}
}
+ public CDOBranchPoint getCommitMergeSource()
+ {
+ synchronized (getViewMonitor())
+ {
+ lockView();
+
+ try
+ {
+ return commitMergeSource;
+ }
+ finally
+ {
+ unlockView();
+ }
+ }
+ }
+
+ public void setCommitMergeSource(CDOBranchPoint mergeSource)
+ {
+ synchronized (getViewMonitor())
+ {
+ lockView();
+
+ try
+ {
+ commitMergeSource = mergeSource;
+ }
+ finally
+ {
+ unlockView();
+ }
+ }
+ }
+
public void setCommittables(Set<? extends EObject> committables)
{
synchronized (getViewMonitor())
@@ -4248,6 +4287,11 @@ public class CDOTransactionImpl extends CDOViewImpl implements InternalCDOTransa
return transaction.getCommitComment();
}
+ public CDOBranchPoint getCommitMergeSource()
+ {
+ return transaction.getCommitMergeSource();
+ }
+
public CDOCommitData getCommitData()
{
return commitData;
@@ -4386,7 +4430,8 @@ public class CDOTransactionImpl extends CDOViewImpl implements InternalCDOTransa
if (result.getRollbackMessage() != null)
{
- CDOCommitInfo commitInfo = new FailureCommitInfo(timeStamp, result.getPreviousTimeStamp());
+ InternalCDOCommitInfoManager commitInfoManager = session.getCommitInfoManager();
+ CDOCommitInfo commitInfo = new FailureCommitInfo(commitInfoManager, timeStamp, result.getPreviousTimeStamp());
InvalidationData invalidationData = new InvalidationData();
invalidationData.setCommitInfo(commitInfo);
@@ -4520,9 +4565,11 @@ public class CDOTransactionImpl extends CDOViewImpl implements InternalCDOTransa
CDOBranch branch = getBranch();
String userID = session.getUserID();
String comment = getCommitComment();
+ CDOBranchPoint mergeSource = getCommitMergeSource();
InternalCDOCommitInfoManager commitInfoManager = session.getCommitInfoManager();
- return commitInfoManager.createCommitInfo(branch, timeStamp, previousTimeStamp, userID, comment, commitData);
+ return commitInfoManager.createCommitInfo(branch, timeStamp, previousTimeStamp, userID, comment, mergeSource,
+ commitData);
}
private CDOLockChangeInfo makeUnlockChangeInfo(CommitTransactionResult result)
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOXACommitContextImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOXACommitContextImpl.java
index bdae9aea67..9f9c4e082a 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOXACommitContextImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOXACommitContextImpl.java
@@ -12,6 +12,7 @@ package org.eclipse.emf.internal.cdo.transaction;
import org.eclipse.emf.cdo.CDOObject;
import org.eclipse.emf.cdo.common.branch.CDOBranch;
+import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
import org.eclipse.emf.cdo.common.commit.CDOCommitData;
import org.eclipse.emf.cdo.common.id.CDOID;
import org.eclipse.emf.cdo.common.lob.CDOLob;
@@ -134,6 +135,11 @@ public class CDOXACommitContextImpl implements InternalCDOXACommitContext
return delegateCommitContext.getCommitComment();
}
+ public CDOBranchPoint getCommitMergeSource()
+ {
+ return delegateCommitContext.getCommitMergeSource();
+ }
+
public Map<CDOIDTempObjectExternalImpl, InternalCDOTransaction> getRequestedIDs()
{
return requestedIDs;
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOObjectHistoryImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOObjectHistoryImpl.java
index de99a530e2..08ed21e644 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOObjectHistoryImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOObjectHistoryImpl.java
@@ -15,7 +15,7 @@ import org.eclipse.emf.cdo.CDOObjectHistory;
import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
import org.eclipse.emf.cdo.common.branch.CDOBranchVersion;
import org.eclipse.emf.cdo.common.commit.CDOCommitInfo;
-import org.eclipse.emf.cdo.common.commit.CDOCommitInfoHandler;
+import org.eclipse.emf.cdo.common.commit.CDOCommitInfoManager;
import org.eclipse.emf.cdo.common.id.CDOID;
import org.eclipse.emf.cdo.common.revision.CDOIDAndVersion;
import org.eclipse.emf.cdo.common.revision.CDORevision;
@@ -23,8 +23,7 @@ import org.eclipse.emf.cdo.common.revision.CDORevisionKey;
import org.eclipse.emf.cdo.common.revision.CDORevisionManager;
import org.eclipse.emf.cdo.internal.common.commit.CDOCommitHistoryImpl;
-import org.eclipse.net4j.util.event.FinishedEvent;
-import org.eclipse.net4j.util.event.IListener;
+import java.util.List;
/**
* A cache for the {@link CDOCommitInfo commit infos} of a branch or of an entire repository.
@@ -53,7 +52,7 @@ public class CDOObjectHistoryImpl extends CDOCommitHistoryImpl implements CDOObj
}
@Override
- protected boolean filter(CDOCommitInfo commitInfo)
+ protected boolean filterCommitInfo(CDOCommitInfo commitInfo)
{
if (commitInfo.isCommitDataLoaded())
{
@@ -86,14 +85,13 @@ public class CDOObjectHistoryImpl extends CDOCommitHistoryImpl implements CDOObj
return true;
}
- return super.filter(commitInfo);
+ return super.filterCommitInfo(commitInfo);
}
@Override
- protected void doLoadCommitInfos(CDOCommitInfoHandler handler)
+ protected void loadCommitInfos(int loadCount, List<CDOCommitInfo> addedCommitInfos)
{
- int count = getLoadCount();
- for (int i = 0; i < count; i++)
+ for (int i = 0; i < loadCount; i++)
{
if (loadedRevision == null)
{
@@ -112,7 +110,7 @@ public class CDOObjectHistoryImpl extends CDOCommitHistoryImpl implements CDOObj
CDOBranchPoint base = loadedRevision.getBranch().getBase();
if (base.getBranch() == null)
{
- // Reached repository creation
+ // Reached repository creation.
setFull();
break;
}
@@ -121,7 +119,7 @@ public class CDOObjectHistoryImpl extends CDOCommitHistoryImpl implements CDOObj
CDORevision.DEPTH_NONE, true);
if (revision == null)
{
- // Reached branch where the object does not exist
+ // Reached branch where the object does not exist anymore.
setFull();
break;
}
@@ -130,19 +128,12 @@ public class CDOObjectHistoryImpl extends CDOCommitHistoryImpl implements CDOObj
}
}
- CDOCommitInfo commitInfo = getManager().getCommitInfo(loadedRevision.getTimeStamp());
- handleCommitInfo(commitInfo);
-
- if (handler != null)
+ CDOCommitInfoManager manager = getManager();
+ CDOCommitInfo commitInfo = manager.getCommitInfo(loadedRevision.getTimeStamp());
+ if (addCommitInfo(commitInfo))
{
- handler.handleCommitInfo(commitInfo);
+ addedCommitInfos.add(commitInfo);
}
}
-
- if (handler instanceof IListener)
- {
- IListener listener = (IListener)handler;
- listener.notifyEvent(FinishedEvent.INSTANCE);
- }
}
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/CDOSessionProtocol.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/CDOSessionProtocol.java
index 18d3de4b82..00f87a7b77 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/CDOSessionProtocol.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/CDOSessionProtocol.java
@@ -400,6 +400,8 @@ public interface CDOSessionProtocol extends CDOProtocol, PackageLoader, BranchLo
private IDGenerationLocation idGenerationLocation;
+ private CommitInfoStorage commitInfoStorage;
+
/**
* @since 4.4
*/
@@ -431,6 +433,7 @@ public interface CDOSessionProtocol extends CDOProtocol, PackageLoader, BranchLo
serializingCommits = in.readBoolean();
ensuringReferentialIntegrity = in.readBoolean();
idGenerationLocation = in.readEnum(IDGenerationLocation.class);
+ commitInfoStorage = in.readEnum(CommitInfoStorage.class);
CDOPackageUnit[] packageUnits = in.readCDOPackageUnits(null);
for (int i = 0; i < packageUnits.length; i++)
@@ -597,6 +600,14 @@ public interface CDOSessionProtocol extends CDOProtocol, PackageLoader, BranchLo
}
/**
+ * @since 4.6
+ */
+ public CommitInfoStorage getCommitInfoStorage()
+ {
+ return commitInfoStorage;
+ }
+
+ /**
* @since 3.0
*/
public long getLastUpdateTime()
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/InternalCDOTransaction.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/InternalCDOTransaction.java
index f71a612328..f93d04df3f 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/InternalCDOTransaction.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/InternalCDOTransaction.java
@@ -54,6 +54,16 @@ public interface InternalCDOTransaction extends CDOTransaction, InternalCDOUserT
public CommitToken getCommitToken();
/**
+ * @since 4.6
+ */
+ public CDOBranchPoint getCommitMergeSource();
+
+ /**
+ * @since 4.6
+ */
+ public void setCommitMergeSource(CDOBranchPoint mergeSource);
+
+ /**
* @since 4.3
*/
public boolean hasMultipleSavepoints();
diff --git a/plugins/org.eclipse.net4j.db/META-INF/MANIFEST.MF b/plugins/org.eclipse.net4j.db/META-INF/MANIFEST.MF
index cf7c043239..64471ecc72 100644
--- a/plugins/org.eclipse.net4j.db/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.net4j.db/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.net4j.db;singleton:=true
-Bundle-Version: 4.5.100.qualifier
+Bundle-Version: 4.6.0.qualifier
Bundle-Activator: org.eclipse.net4j.internal.db.bundle.OM$Activator
Bundle-Vendor: %providerName
Bundle-ClassPath: .
@@ -11,16 +11,16 @@ Bundle-RequiredExecutionEnvironment: J2SE-1.5
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
org.eclipse.net4j.util;bundle-version="[3.0.0,4.0.0)";visibility:=reexport,
org.eclipse.net4j.db.jdbc;bundle-version="[4.0.0,5.0.0)"
-Export-Package: org.eclipse.net4j.db;version="4.5.100",
- org.eclipse.net4j.db.ddl;version="4.5.100",
- org.eclipse.net4j.db.ddl.delta;version="4.5.100",
- org.eclipse.net4j.db.dml;version="4.5.100",
- org.eclipse.net4j.internal.db;version="4.5.100";x-internal:=true,
- org.eclipse.net4j.internal.db.bundle;version="4.5.100";x-internal:=true,
- org.eclipse.net4j.internal.db.ddl;version="4.5.100";x-friends:="org.eclipse.emf.cdo.server.db",
- org.eclipse.net4j.internal.db.ddl.delta;version="4.5.100";x-internal:=true,
- org.eclipse.net4j.internal.db.dml;version="4.5.100";x-internal:=true,
- org.eclipse.net4j.spi.db;version="4.5.100",
- org.eclipse.net4j.spi.db.ddl;version="4.5.100"
+Export-Package: org.eclipse.net4j.db;version="4.6.0",
+ org.eclipse.net4j.db.ddl;version="4.6.0",
+ org.eclipse.net4j.db.ddl.delta;version="4.6.0",
+ org.eclipse.net4j.db.dml;version="4.6.0",
+ org.eclipse.net4j.internal.db;version="4.6.0";x-internal:=true,
+ org.eclipse.net4j.internal.db.bundle;version="4.6.0";x-internal:=true,
+ org.eclipse.net4j.internal.db.ddl;version="4.6.0";x-friends:="org.eclipse.emf.cdo.server.db",
+ org.eclipse.net4j.internal.db.ddl.delta;version="4.6.0";x-internal:=true,
+ org.eclipse.net4j.internal.db.dml;version="4.6.0";x-internal:=true,
+ org.eclipse.net4j.spi.db;version="4.6.0",
+ org.eclipse.net4j.spi.db.ddl;version="4.6.0"
Bundle-ActivationPolicy: lazy
Eclipse-BuddyPolicy: registered
diff --git a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/spi/db/DBAdapter.java b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/spi/db/DBAdapter.java
index bd2dbefad6..0354782fbe 100644
--- a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/spi/db/DBAdapter.java
+++ b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/spi/db/DBAdapter.java
@@ -22,6 +22,7 @@ import org.eclipse.net4j.db.ddl.IDBSchema;
import org.eclipse.net4j.db.ddl.IDBTable;
import org.eclipse.net4j.db.ddl.delta.IDBDelta.ChangeKind;
import org.eclipse.net4j.db.ddl.delta.IDBDeltaVisitor;
+import org.eclipse.net4j.db.ddl.delta.IDBFieldDelta;
import org.eclipse.net4j.db.ddl.delta.IDBIndexDelta;
import org.eclipse.net4j.db.ddl.delta.IDBSchemaDelta;
import org.eclipse.net4j.db.ddl.delta.IDBTableDelta;
@@ -382,20 +383,21 @@ public abstract class DBAdapter implements IDBAdapter
{
IDBTable table = delta.getSchemaElement(schema);
ChangeKind changeKind = delta.getChangeKind();
+
switch (changeKind)
{
case ADD:
createTable(connection, table, delta);
break;
- case REMOVE:
- dropTable(connection, table, delta);
- break;
-
case CHANGE:
alterTable(connection, table, delta);
break;
+ case REMOVE:
+ dropTable(connection, table, delta);
+ break;
+
default:
throw new IllegalStateException("Illegal change kind: " + changeKind);
}
@@ -406,6 +408,7 @@ public abstract class DBAdapter implements IDBAdapter
{
InternalDBIndex index = (InternalDBIndex)delta.getSchemaElement(schema);
ChangeKind changeKind = delta.getChangeKind();
+
switch (changeKind)
{
case ADD:
@@ -422,10 +425,6 @@ public abstract class DBAdapter implements IDBAdapter
}
break;
- case REMOVE:
- dropIndex(connection, index, delta);
- break;
-
case CHANGE:
dropIndex(connection, index, delta);
try
@@ -441,6 +440,10 @@ public abstract class DBAdapter implements IDBAdapter
}
break;
+ case REMOVE:
+ dropIndex(connection, index, delta);
+ break;
+
default:
throw new IllegalStateException("Illegal change kind: " + changeKind);
}
@@ -481,6 +484,53 @@ public abstract class DBAdapter implements IDBAdapter
*/
protected void alterTable(Connection connection, IDBTable table, IDBTableDelta delta)
{
+ for (IDBFieldDelta fieldDelta : delta.getFieldDeltas().values())
+ {
+ ChangeKind changeKind = fieldDelta.getChangeKind();
+ String fieldName = fieldDelta.getName();
+ String tableName = table.getName();
+
+ switch (changeKind)
+ {
+ case ADD:
+ createField(connection, tableName, table.getField(fieldName));
+ break;
+
+ case CHANGE:
+ dropField(connection, tableName, fieldName);
+ createField(connection, tableName, table.getField(fieldName));
+ break;
+
+ case REMOVE:
+ dropField(connection, tableName, fieldName);
+ break;
+
+ default:
+ throw new IllegalStateException("Illegal change kind: " + changeKind);
+ }
+ }
+
+ if (delta.getIndexDeltaCount() != 0)
+ {
+ throw new UnsupportedOperationException("Not yet implemented");
+ }
+ }
+
+ /**
+ * @since 4.6
+ */
+ protected void createField(Connection connection, String tableName, IDBField field)
+ {
+ DBUtil.execute(connection,
+ "ALTER TABLE " + tableName + " ADD COLUMN " + field.getName() + " " + createFieldDefinition(field));
+ }
+
+ /**
+ * @since 4.6
+ */
+ protected void dropField(Connection connection, String tableName, String fieldName)
+ {
+ DBUtil.execute(connection, "ALTER TABLE " + tableName + " DROP COLUMN " + fieldName);
}
/**

Back to the top