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

Re: Move using initial state

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Thu, 05 Sep 2013 10:42:45 +0100

Greg Stein <gstein_at_gmail.com> writes:

> On Wed, Sep 4, 2013 at 10:43 AM, Apache subversion Wiki
> <commits_at_subversion.apache.org> wrote:
>>...
>> Given these constraints, not all combinations of moves can be expressed using a “move source to destination” operation, with or without a “rotate” operation, without using temporary paths.
>
> I'm not buying that you need two operations. The "move uses initial
> state" tweak seems fully adequate and gets us the single-op/atomicity
> principle that Ev2 was designed under.

At some point we have to create temporary locations and I suppose it
might be possible for the receiver to generate them as necessary.
However I'm still struggling to understand the ordering of moves and
alter_dirs so I can't determine whether that is practical or sensible.

Given this example:

   svn mv A X
   svn mv X/B/C A
   svn mv X/B A/B
   svn mv X A/B/C
   svn ci

or the equivalent:

   svn mv A/B/C X
   svn mv A/B X/B
   svn mv A X/B/C
   svn mv X A
   cvn ci

we have this set of Ev2 moves in some order:

   move A, A/B/C
   move A/B, A/B
   move A/B/C, A

What is the correct order for these operations? I guess there may be
more than one valid order since I showed two possible temporaries,
perhaps both

   move A, A/B/C
   move A/B, A/B
   move A/B/C, A

and

   move A/B/C, A
   move A/B, A/B
   move A, A/B/C

are valid. Or perhaps the alter_dir ordering rules exclude one?

What about alter_dir? I think the rule is that alter_dir on a directory
should occur before add or delete affects the children of the directory.
There is also a rule:

 * - The ancestor of an added, copied-here, moved-here, or
 * modified node may not be deleted. The ancestor may not be moved
 * (instead: perform the move, *then* the edits).

It's not clear where alter_dir should occur w.r.t the moves in my
example. Does alter_dir count as an edit that should occur after move?
Do we pass initial state paths:

   alter_dir ., children='A'
   alter_dir A, children=''
   alter_dir A/B, children='C'
   alter_dir A/B/C, children='B'

or final_state paths:

   alter_dir ., children='A'
   alter_dir A, children='B'
   alter_dir A/B, children='C'
   alter_dir A/B/C, children=''

-- 
Philip Martin | Subversion Committer
WANdisco // *Non-Stop Data*
Received on 2013-09-05 11:43:26 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.