[CDO] CDO Workspace. On commit 'Change set is outdated' [message #893883] |
Thu, 05 July 2012 15:38  |
Eclipse User |
|
|
|
Hello,
I am using the CDO Workspace feature and I get the message 'Change set is outdated'.
1. checkout
2. workspace.openTransaction. Add items. transaction.commit
3. workspace.openTransaction. Add items. transaction.commit
4. workspace.commit
5. workspace.openTransaction. Add items. transaction.commit
6. workspace.commit
At the point '6.' I get the message 'Change set is outdated'.
I have tried a 'workspace.update' after '4.' but it did not change the result. Am I missing something?
Regards,
Per Sterner
Here the code:
File: org.eclipse.emf.cdo.tests.WorkspaceTest.java
public void testCheckinAfterAddExt() throws Exception
{
InternalCDOWorkspace workspace = checkout("MAIN", CDOBranchPoint.UNSPECIFIED_DATE);
IOUtil.ERR().println("Checkout done");
int i;
CDOResource resource;
CDOCommitInfo info;
CDOTransaction transaction = workspace.openTransaction();
resource = transaction.getResource(getResourcePath(RESOURCE));
for (i = 0; i < PRODUCTS; i++)
{
resource.getContents().add(createProduct(i));
}
transaction.commit();
transaction.close();
transaction = workspace.openTransaction();
resource = transaction.getResource(getResourcePath(RESOURCE));
for (i = 0; i < PRODUCTS; i++)
{
resource.getContents().add(createProduct(i));
}
transaction.commit();
transaction.close();
info = workspace.checkin();
// workspace.update(null);
transaction = workspace.openTransaction();
resource = transaction.getResource(getResourcePath(RESOURCE));
for (i = 0; i < PRODUCTS; i++)
{
resource.getContents().add(createProduct(i));
}
transaction.commit();
transaction.close();
info = workspace.checkin();
}
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04793 seconds