[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Ev2 as a move-aware editor

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Wed, 26 Jun 2013 09:30:42 +0100

Greg Stein <gstein_at_gmail.com> writes:

> You're affecting six nodes, so I think you should be able to pack this
> down into touching 6 nodes once each. I believe this will work:
> move(A/B, X/Y/Z/B)
> rotate(A, X/Y/Z)
> move(X/Y, A/B/C/Y)
> rotate(X, A/B/C)

Yes, I think that works.

> Insert appropriate alter() calls. Each operation can be performed as
> it arrives, as the later calls depend upon those moves/rotates.

   move(A/B, X/Y/Z/B)
   rotate(A, X/Y/Z)
   alter(A/B/C) was A/B/C
   move(X/Y, A/B/C/Y)
   alter(.) elided ?
   alter(A/B) was A/B
   rotate(X, A/B/C)

In this instance when the alters affect moved nodes the nodes have been
moved back to their original position.

I wonder if we can do the same with Daniel's 9 node example? It has an
odd number of elements so either one node occurs in two operations or
one node doesn't need an operation at all.

We need a client algorithm that converts an arbitrary sequence of moves
into this minimal sequence of moves and rotates. We also need a server
algorithm that combines an arbitrary sequence of moves and rotates into
a minimal sequence so that the server can combine multiple revisions.
The two algorithms are essentially the same.

Philip Martin | Subversion Committer
WANdisco | Non-Stop Data
Received on 2013-06-26 10:31:33 CEST

This is an archived mail posted to the Subversion Dev mailing list.