summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-12-19 09:21:14 (EST)
committerEike Stepper2007-12-19 09:21:14 (EST)
commitd83bb86a8e7753e0961568b3e1c3dec8b528557e (patch)
tree76d6944a240b1e86deeb545952bb123d0a690a74
parentc2485924e9781add057687cbd7ffa419df31b471 (diff)
downloadcdo-d83bb86a8e7753e0961568b3e1c3dec8b528557e.zip
cdo-d83bb86a8e7753e0961568b3e1c3dec8b528557e.tar.gz
cdo-d83bb86a8e7753e0961568b3e1c3dec8b528557e.tar.bz2
[201266] Send the revision delta to the server
https://bugs.eclipse.org/bugs/show_bug.cgi?id=201266
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/RevisionManager.java23
1 files changed, 9 insertions, 14 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/RevisionManager.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/RevisionManager.java
index 27223d7..a6809a4 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/RevisionManager.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/RevisionManager.java
@@ -326,20 +326,6 @@ public class RevisionManager extends CDORevisionResolverImpl implements IRevisio
private WriteRevisionOperation(CDORevisionDeltaImpl revisionDelta)
{
this.revisionDelta = revisionDelta;
- CDORevisionImpl oldRevision = getRevisionByVersion(revisionDelta.getId(), CDORevision.UNCHUNKED, revisionDelta
- .getOriginVersion(), true);
- if (oldRevision == null)
- {
- if (!getRepository().isSupportingRevisionDeltas())
- {
- throw new IllegalArgumentException("Cannot retrieve origin revision");
- }
- }
- else
- {
- dirtyRevision = new CDORevisionImpl(oldRevision);
- revisionDelta.applyChanges(dirtyRevision);
- }
}
public void phase1(IStoreWriter storeWriter) throws Exception
@@ -351,6 +337,15 @@ public class RevisionManager extends CDORevisionResolverImpl implements IRevisio
}
else
{
+ CDORevisionImpl oldRevision = getRevisionByVersion(revisionDelta.getId(), CDORevision.UNCHUNKED, revisionDelta
+ .getOriginVersion(), true);
+ if (oldRevision == null)
+ {
+ throw new IllegalArgumentException("Cannot retrieve origin revision");
+ }
+
+ dirtyRevision = new CDORevisionImpl(oldRevision);
+ revisionDelta.applyChanges(dirtyRevision);
storeWriter.writeRevision(dirtyRevision);
}