Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 327405

Summary: Provide an offline CDOWorkspace with Checkout/Update/Commit workflows
Product: [Modeling] EMF Reporter: Eike Stepper <stepper>
Component: cdo.coreAssignee: Eike Stepper <stepper>
Status: ASSIGNED --- QA Contact: Eike Stepper <stepper>
Severity: enhancement    
Priority: P3 CC: antonel.pazargic, bulrich, cyril.jaquier, jerome.benois, lu.xingxiao, martin.fluegge, tom.seidel
Version: 4.13Keywords: noteworthy
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Patch v1 - incomplete
none
Patch v2 - incomplete none

Description Eike Stepper CLA 2010-10-10 09:26:41 EDT
What used to be called the offline mode in CDO is actually way more than that. It's more like Git repository cloning with background replication. Very powerful, but sometimes not desirable because:

- Setup is complex (may be fixed in the future)
- Consumes resources even if the full power of cloned repositories are not needed (no offline history, no offline branching, no multiple offline clients, etc)

Often the requirements are much simpler:

- Work offline on a snapshot (no history, no branches)
- Update the snapshot occasionally
- Commit changes of the snapshot to the remote repository occasionally
Comment 1 Eike Stepper CLA 2010-10-10 09:28:40 EDT
Initial Design:

public final class CDOWorkspaceUtil
{
  public static CDOWorkspace checkout(IStore local, CDOSessionConfigurationFactory remote, String branchPath, long timeStamp);
  public static CDOWorkspace open(IStore local, CDOSessionConfigurationFactory remote);
}

public interface CDOWorkspace extends Closeable
{
  public IRepository getLocalRepository();
  public CDOView openView();
  public CDOView openView(ResourceSet resourceSet);
  public CDOTransaction openTransaction();
  public CDOTransaction openTransaction(ResourceSet resourceSet);
  public CDOTransaction update(CDOMerger merger);
  public CDOTransaction update(CDOMerger merger, String branchPath);
  public CDOTransaction update(CDOMerger merger, String branchPath, long timeStamp);
  public void revert();
  public void replace(String branchPath, long timeStamp);
  public void commit(String comment);
}
Comment 2 Eike Stepper CLA 2010-10-10 09:45:45 EDT
Created attachment 180562 [details]
Patch v1 - incomplete

Working so far:
- Checkout
- Reading through CDOViews
- Modifying objects through CDOTransactions (local commit)
- Adding objects through CDOTransactions (local commit)
Comment 3 Eike Stepper CLA 2010-10-10 09:46:30 EDT
See org.eclipse.emf.cdo.tests.WorkspaceTest
Comment 4 Eike Stepper CLA 2010-10-10 12:04:54 EDT
All 11141 tests passed.

Committed patch v1 to HEAD.
Comment 5 Eike Stepper CLA 2010-10-27 13:50:20 EDT
Created attachment 181855 [details]
Patch v2 - incomplete
Comment 6 Eike Stepper CLA 2011-06-23 03:56:56 EDT
Moving all open enhancement requests to 4.1
Comment 7 Eike Stepper CLA 2012-08-14 22:50:34 EDT
Moving all open issues to 4.2. Open bugs can be ported to 4.1 maintenance after they've been fixed in master.
Comment 8 Eike Stepper CLA 2013-06-27 04:05:50 EDT
Moving all outstanding enhancements to 4.3
Comment 9 Eike Stepper CLA 2014-08-19 09:22:46 EDT
Moving all open enhancement requests to 4.4
Comment 10 Eike Stepper CLA 2014-08-19 09:34:50 EDT
Moving all open enhancement requests to 4.4
Comment 11 Eike Stepper CLA 2015-07-14 02:07:47 EDT
Moving all open bugzillas to 4.5.
Comment 12 Eike Stepper CLA 2016-07-31 00:50:37 EDT
Moving all unaddressed bugzillas to 4.6.
Comment 13 Eike Stepper CLA 2017-12-28 01:18:56 EST
Moving all open bugs to 4.7
Comment 14 Eike Stepper CLA 2019-11-08 02:07:06 EST
Moving all unresolved issues to version 4.8-
Comment 15 Eike Stepper CLA 2019-12-13 12:49:46 EST
Moving all unresolved issues to version 4.9
Comment 16 Eike Stepper CLA 2020-12-11 10:46:41 EST
Moving to 4.13.