Re: Handling copies and moves with tree diffs

2012-11-30 Thread Michael Dürig
Hi, I just committed a proof of concept implementation of below algorithm to my GitHub repository at https://github.com/mduerig/json-diff. For maximal clarity this is a standalone implementation outside the Oak framework. Michael On 27.11.12 13:16, Michael Dürig wrote: Hi, As mentioned

Re: Handling copies and moves with tree diffs

2012-11-27 Thread Michael Dürig
Hi, On 27.11.12 10:56, Jukka Zitting wrote: Hi, As discussed at length earlier, in oak-core we only keep track of tree states instead of change logs, i.e. the sequences of changes that lead from one state to another. This works pretty well in general and avoids a lot of extra complexity, but

Re: Handling copies and moves with tree diffs

2012-11-27 Thread Thomas Mueller
Hi, 1) For each tree node we keep track of its original location. However, I think recording the path is not sufficient. We need to record the parent node. I guess you don't mean remembering the original path of the parent? keeping track of the original location of the parent (let's say /test)

Re: Handling copies and moves with tree diffs

2012-11-27 Thread Michael Dürig
Hi, to track this more easily I committed the pseudo code to svn: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/doc/jsop-diff.md?view=markup A small correction to my initial post is here:

Re: Handling copies and moves with tree diffs

2012-11-27 Thread Jukka Zitting
Hi, On Tue, Nov 27, 2012 at 12:56 PM, Jukka Zitting jukka.zitt...@gmail.com wrote: I did some work along these lines already earlier with the CopyAndMoveAwareJsopDiff class you can find inside KernelRootBuilder, but couldn't make it work properly. Based on discussions with Michael last week I

Re: Handling copies and moves with tree diffs

2012-11-27 Thread Michael Dürig
Hi Jukka, Thanks for sharing this. In a nutshell, what you are proposing to do is * to keep no more than one move/copy operation pending and purge changes to the Microkernel as soon as another such operation arrives, * in the generalised version, to only keep unconflicting move/copy

Re: Handling copies and moves with tree diffs

2012-11-27 Thread Michael Dürig
On 27.11.12 12:39, Thomas Mueller wrote: Currently we work around this problem by mapping each higher-level copy and move operation to separate branch commits that contain just that operation, which isn't too ideal. Could you tell me what problems you see with this workaround? As far as I