Re: Ev2 as a move-aware editor

2013-07-01 Thread Daniel Shahaf
Julian Foad wrote on Thu, Jun 27, 2013 at 18:42:18 +0100: > For the record, to make it easier to understand our current position in > retrospect, I'll try to summarize our findings about the 'rotate' operation > so far. > > We started with a requirement: > >   * Represent with 'true moves' any

Re: Ev2 as a move-aware editor

2013-07-01 Thread Daniel Shahaf
Branko Čibej wrote on Thu, Jun 27, 2013 at 20:13:20 +0200: > On 27.06.2013 19:33, Daniel Shahaf wrote: > > Philip Martin wrote on Thu, Jun 27, 2013 at 17:47:54 +0100: > >> Daniel Shahaf writes: > >> > >>> My own answer to "how to change Ev2 to enable representing > >>> rotate(A,A/B/C)": > >>> > >

Re: Ev2 as a move-aware editor

2013-06-27 Thread Branko Čibej
On 27.06.2013 20:29, Branko Čibej wrote: > We are talking here about optimizing the number of operations required > to reproduce a tree state. Some sequences of operations are irreducible > -- so it doesn't help to invent such sequences and then try to define > "rotate" such that it represents the

Re: Ev2 as a move-aware editor

2013-06-27 Thread Branko Čibej
On 27.06.2013 19:42, Julian Foad wrote: > What > if (B) has a child named "B" already? Two possible options are the > rotation is not allowed or the child gets deleted and replaced. These > options both impose an additional ordering constraint: if we want to > keep that node and move it to so

Re: Ev2 as a move-aware editor

2013-06-27 Thread Branko Čibej
On 27.06.2013 19:42, Julian Foad wrote: > For the record, to make it easier to understand our current position in > retrospect, I'll try to summarize our findings about the 'rotate' operation > so far. > > We started with a requirement: > > * Represent with 'true moves' any combination of move

Re: Ev2 as a move-aware editor

2013-06-27 Thread Branko Čibej
On 27.06.2013 19:33, Daniel Shahaf wrote: > Philip Martin wrote on Thu, Jun 27, 2013 at 17:47:54 +0100: >> Daniel Shahaf writes: >> >>> My own answer to "how to change Ev2 to enable representing rotate(A,A/B/C)": >>> >>> I think the above means we have to modify move() to use SRC arguments >>> rel

Re: Ev2 as a move-aware editor

2013-06-27 Thread Julian Foad
For the record, to make it easier to understand our current position in retrospect, I'll try to summarize our findings about the 'rotate' operation so far. We started with a requirement:   * Represent with 'true moves' any combination of moves that can already be represented using the copy-an

Re: Ev2 as a move-aware editor

2013-06-27 Thread Daniel Shahaf
Philip Martin wrote on Thu, Jun 27, 2013 at 17:47:54 +0100: > Daniel Shahaf writes: > > > My own answer to "how to change Ev2 to enable representing rotate(A,A/B/C)": > > > > I think the above means we have to modify move() to use SRC arguments > > relative to the start state of the edited tree,

Re: Ev2 as a move-aware editor

2013-06-27 Thread Philip Martin
Daniel Shahaf writes: > My own answer to "how to change Ev2 to enable representing rotate(A,A/B/C)": > > I think the above means we have to modify move() to use SRC arguments > relative to the start state of the edited tree, rather than to its > current state. > If we do that, we could represen

Re: Ev2 as a move-aware editor

2013-06-27 Thread Daniel Shahaf
Daniel Shahaf wrote on Thu, Jun 27, 2013 at 13:06:19 +0300: > I think the above means we have to modify move() to use SRC arguments > relative to the start state of the edited tree, rather than to its > current state. If we do that, we could represent your commit as: > mv(A/B/C, A); mv(A/B, A/B);

Re: Ev2 as a move-aware editor

2013-06-27 Thread Daniel Shahaf
Philip Martin wrote on Thu, Jun 27, 2013 at 10:16:22 +0100: > Philip Martin writes: > > > Philip Martin writes: > > > >> I can't see any way to do the 9-node change without using temporaries. > > > > I think we can reduce the 9 nodes to 6 and still see the problem: > > Even 3 nodes is a problem

Re: Ev2 as a move-aware editor

2013-06-27 Thread Philip Martin
Philip Martin writes: > Philip Martin writes: > >> I can't see any way to do the 9-node change without using temporaries. > > I think we can reduce the 9 nodes to 6 and still see the problem: Even 3 nodes is a problem. Start with A, A/B and A/B/C and swap A and A/B/C. There are two ways user c

Re: nested_moves tests (r1496885) Re: Ev2 as a move-aware editor

2013-06-26 Thread Daniel Shahaf
Daniel Shahaf wrote on Wed, Jun 26, 2013 at 15:18:52 +0300: > That patch isn't ready for commit; I am only at the point of > constructing a State object that will make the test pass, but I haven't > yet compared that State object to the actual moves the test does to > determine whether the 'svn sta

Re: Ev2 as a move-aware editor

2013-06-26 Thread Philip Martin
Philip Martin writes: > I can't see any way to do the 9-node change without using temporaries. I think we can reduce the 9 nodes to 6 and still see the problem: svnadmin create repo svnmucc -mm -U file://`pwd`/repo \ mkdir A mkdir A/B mkdir A/B/C \ mkdir X mkdir X/Y mkdir X/Y/Z svnmuc

Re: Ev2 as a move-aware editor

2013-06-26 Thread Daniel Shahaf
Branko Čibej wrote on Wed, Jun 26, 2013 at 13:33:00 +0200: > On 26.06.2013 11:46, Daniel Shahaf wrote: > > Greg Stein wrote on Wed, Jun 26, 2013 at 05:30:10 -0400: > >> On Wed, Jun 26, 2013 at 5:25 AM, Daniel Shahaf wrote: > >>> Philip Martin wrote on Wed, Jun 26, 2013 at 09:30:42 +0100: > Gr

nested_moves tests (r1496885) Re: Ev2 as a move-aware editor

2013-06-26 Thread Daniel Shahaf
I've gone ahead and added Python tests for the below scenarios: Philip's scenario in move_tests.py and mine in svnmucc_tests.py. I have an odd problem with Philip's scenario (move_tests.py nested_replaces): if I set expected_status['A/B'] to an Item(status='A '), I get an error stating the actual

Re: Ev2 as a move-aware editor

2013-06-26 Thread Philip Martin
Daniel Shahaf writes: > First sketch: > > move(/A/B, /X/Y/Z/B) > move(/M/N, /A/B/C/N) > move(/X/Y, /M/N/O/Y) > rotate(/A, /M/N/O, /X, /A/B/C, /M, /X/Y/Z) > > The final rotate() call looks tricky: it moves something to /M and > something to /M/N/O, so the former move must be handle

Re: Ev2 as a move-aware editor

2013-06-26 Thread Branko Čibej
On 26.06.2013 11:46, Daniel Shahaf wrote: > Greg Stein wrote on Wed, Jun 26, 2013 at 05:30:10 -0400: >> On Wed, Jun 26, 2013 at 5:25 AM, Daniel Shahaf wrote: >>> Philip Martin wrote on Wed, Jun 26, 2013 at 09:30:42 +0100: Greg Stein writes: > You're affecting six nodes, so I think y

Re: Ev2 as a move-aware editor

2013-06-26 Thread Daniel Shahaf
Greg Stein wrote on Wed, Jun 26, 2013 at 05:30:10 -0400: > On Wed, Jun 26, 2013 at 5:25 AM, Daniel Shahaf wrote: > > Philip Martin wrote on Wed, Jun 26, 2013 at 09:30:42 +0100: > >> Greg Stein writes: > >> > >> > You're affecting six nodes, so I think you should be able to pack this > >> > down i

Re: Ev2 as a move-aware editor

2013-06-26 Thread Philip Martin
Daniel Shahaf writes: > Philip Martin wrote on Wed, Jun 26, 2013 at 09:30:42 +0100: >> Greg Stein 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(

Re: Ev2 as a move-aware editor

2013-06-26 Thread Daniel Shahaf
Daniel Shahaf wrote on Tue, Jun 25, 2013 at 21:53:07 +: > On Tue, Jun 25, 2013 at 12:42:55PM +0100, Philip Martin wrote: > >R /A (from /X/Y/Z:1) > >A /A/B (from /A/B:1) > >R /A/B/C (from /X:1) > >D /A/B/C/Y > >R /X (from /A/B/C:1) > >A /X/Y (from /X/Y:1) > >R /X/Y/Z

Re: Ev2 as a move-aware editor

2013-06-26 Thread Greg Stein
On Wed, Jun 26, 2013 at 5:25 AM, Daniel Shahaf wrote: > Philip Martin wrote on Wed, Jun 26, 2013 at 09:30:42 +0100: >> Greg Stein 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: >> > >> > m

Re: Ev2 as a move-aware editor

2013-06-26 Thread Daniel Shahaf
Philip Martin wrote on Wed, Jun 26, 2013 at 09:30:42 +0100: > Greg Stein 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)

Re: Ev2 as a move-aware editor

2013-06-26 Thread Philip Martin
Greg Stein 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() c

Re: Ev2 as a move-aware editor

2013-06-25 Thread Daniel Shahaf
On Tue, Jun 25, 2013 at 12:42:55PM +0100, Philip Martin wrote: >R /A (from /X/Y/Z:1) >A /A/B (from /A/B:1) >R /A/B/C (from /X:1) >D /A/B/C/Y >R /X (from /A/B/C:1) >A /X/Y (from /X/Y:1) >R /X/Y/Z (from /A:1) >D /X/Y/Z/B > What if we had three trees? % svnmucc -mm -

Re: Ev2 as a move-aware editor

2013-06-25 Thread Greg Stein
On Tue, Jun 25, 2013 at 4:17 PM, Philip Martin wrote: > Branko Čibej writes: > >> On 25.06.2013 13:42, Philip Martin wrote: >>> What about rotates that overlap. Consider a repository: >>> >>> svnadmin create repo >>> svn mkdir -mm --parents file://`pwd`/repo/A/B/C ^/X/Y/Z >>> >>> Rotate

Re: Ev2 as a move-aware editor

2013-06-25 Thread Julian Foad
Philip Martin wrote: > Philip Martin writes: > >>     alter(.) >>     alter(A/B) >>     alter(X/Y) >>     rotate(A, X/Y/Z) >>     rotate(X, A/B/C) >>     alter(A)          (pre-rotate X/Y/Z) >>     alter(X/Y/Z)      (pre-rotate A) >>     move(X/Y/Z/B, A/B) >>     alter(X)          (pre-rotate

Re: Ev2 as a move-aware editor

2013-06-25 Thread Philip Martin
Philip Martin writes: >alter(.) >alter(A/B) >alter(X/Y) >rotate(A, X/Y/Z) >rotate(X, A/B/C) >alter(A) (pre-rotate X/Y/Z) >alter(X/Y/Z) (pre-rotate A) >move(X/Y/Z/B, A/B) >alter(X) (pre-rotate A/B/X) Oops!

Re: Ev2 as a move-aware editor

2013-06-25 Thread Philip Martin
Branko Čibej writes: > On 25.06.2013 13:42, Philip Martin wrote: >> What about rotates that overlap. Consider a repository: >> >> svnadmin create repo >> svn mkdir -mm --parents file://`pwd`/repo/A/B/C ^/X/Y/Z >> >> Rotate /A and /X/Y/Z and /X and /A/B/C: >> >>svn mv wc/A wc/A2 >>

Re: Ev2 as a move-aware editor

2013-06-25 Thread Branko Čibej
On 25.06.2013 13:42, Philip Martin wrote: > What about rotates that overlap. Consider a repository: > > svnadmin create repo > svn mkdir -mm --parents file://`pwd`/repo/A/B/C ^/X/Y/Z > > Rotate /A and /X/Y/Z and /X and /A/B/C: > >svn mv wc/A wc/A2 >svn mv wc/X wc/X2 >svn mv wc/

Re: Ev2 as a move-aware editor

2013-06-25 Thread Philip Martin
Branko Čibej writes: > On 24.06.2013 17:52, Branko Čibej wrote: >> You're breaking the once rule here. >> >> And the case you're describing can never occur. You cannot have a >> working copy that describes what you're doing. Tree mutations can only >> be parallelized across distinct subtrees, whi

Re: Ev2 as a move-aware editor

2013-06-24 Thread Branko Čibej
On 24.06.2013 17:52, Branko Čibej wrote: > You're breaking the once rule here. > > And the case you're describing can never occur. You cannot have a > working copy that describes what you're doing. Tree mutations can only > be parallelized across distinct subtrees, which isn't the case in your > ex

Re: Ev2 as a move-aware editor

2013-06-24 Thread Branko Čibej
On 24.06.2013 17:22, Julian Foad wrote: > For move tracking we need a move-aware editor. svn_editor_t ("Ev2") is > designed to support moves. However, I'm not clear how its move support is > meant to work, on a fairly basic level: > > * What are the ordering rules for moves? > > * Are the m

Ev2 as a move-aware editor

2013-06-24 Thread Julian Foad
For move tracking we need a move-aware editor.  svn_editor_t ("Ev2") is designed to support moves.  However, I'm not clear how its move support is meant to work, on a fairly basic level:   * What are the ordering rules for moves?   * Are the move operations to be interprested in series or in pa