[
https://issues.apache.org/jira/browse/OAK-783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13635226#comment-13635226
]
Michael Dürig commented on OAK-783:
-----------------------------------
We could attach the path of the source of a moved node (i.e. the path it has in
its base revision) to that node. We could use some kind of a hidden property
which is never persisted for that. That is, the property is attached when the
transient move is initiated, it is used in the commit hooks to determine
whether an add node event is effectively the result of a moved node, and it
would be removed (ignored) when persisting the branch on commit.
AFAIK this information would be enough to regain a sequence of move operations
that would take the base state to the current head state. See
https://github.com/apache/jackrabbit-oak/blob/trunk/doc/jsop-diff.md for a
description of such an algorithm and https://github.com/mduerig/json-diff for a
POC implementation.
> Reflect Move and Rename upon Root#commit
> ----------------------------------------
>
> Key: OAK-783
> URL: https://issues.apache.org/jira/browse/OAK-783
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: core
> Reporter: angela
>
> right now rename and move operations cannot be identified during
> commit processing in validators or commit hooks.
> for proper (and backwards compatible) permission evaluation however
> we need the ability to distinguish between moving a node around or
> having nodes + properties being removed and added.
> during the last oakathon michael and myself had a discussion regarding
> that issue and michael convinced me that this can't be achieved by simply
> passing the move information contained in RootImpl to the commit hook.
> therefore creating this issue to track progress and discussions regarding
> move and renaming.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira