[ https://issues.apache.org/jira/browse/OAK-464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13505316#comment-13505316 ]
Jukka Zitting commented on OAK-464: ----------------------------------- bq. I don't think the MicroKernel specification currently requires each MicroKernel implementation to do something as complex as this. I think it's fine if a MK opts for a simpler logic, for example just re-applying the diff as-is if possible and throwing an exception when not. Even in that case it would be useful if oak-core could leverage the same logic through an explicit {{rebase()}} call on a branch instead of having to implement the logic in a potentially different way with the caveats mentioned in issue summary. The relevant MK API could be something like this: {code} /** * Re-applies all branch commits up to the given branch revision to * a new branch based on the given new base revision. Returns the * resulting new branch revision. */ String rebase(String branchRevision, String newBaseRevision); {code} The implementation would be equivalent to something like this: {code} public String rebase(String branchRevision, String newBaseRevision) { String revision = branch(newBaseRevision); for (String jsop : getBranchCommitsUntil(branchRevision)) { revision = commit("/", jsop, revision, null); } return revision; } {code} > RootImpl.rebase() doesn't handle move operations correctly > ---------------------------------------------------------- > > Key: OAK-464 > URL: https://issues.apache.org/jira/browse/OAK-464 > Project: Jackrabbit Oak > Issue Type: Bug > Reporter: Michael Dürig > > Doing {{RootImpl.rebase()}} causes moves to be changed to remove followed by > add. Which causes moves of large sub trees to become very expensive. -- 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