Skip to content
dbu edited this page Jul 20, 2011 · 4 revisions

JCR feature request for workspace.mirror()

The purpose of this method is to be able to create "copies" of workspaces that do copy on write. Aka the creation of the copy is essentially "free", only when making changes to specific nodes will that and only that one node we stored in the "mirror". However the "mirrored" workspace should "shine through", aka the "mirror image" should have the exact state of the "mirrored" workspace even when changes are done to the "mirrored" workspace after the "mirror image" is created.

This would make it possible to work on changes to a "mirrored" workspace even on huge workspaces and more importantly without running into big merging issues and while maintaining the ability to preview the changes.

Analogies

  • clone is like an svn branch: we divert from a fix point and have the information to merge it back later
  • mirror is like a patch file: we only store a set of changes against some data. as long as the data does not change to much, the patch will still work.

Questions

what happens in case of potential conflicts?

  • change the same property of the same node in both trees
  • move a node that has changes in the mirror workspace
  • remove a node that has a changed field in the mirror
  • move a node in source that was moved in the mirror

TODO

have the typo3 people provide their specification to make this suggestion more precise.