[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: Sat, 07 Sep 2013 10:25:26 +0100

Greg Stein <gstein_at_gmail.com> writes:

> On Fri, Sep 6, 2013 at 1:47 PM, Philip Martin
>> Two people at least. I have shown how Ev2 with a split move could
>> handle the case
>>
>> A/B/C to A
>> A/B to A/B
>> A to A/B/C
>>
>> What is your alternative?

How does you suggestion work? Start with

NODES local_relpath revision status repos_path
          A 6 normal A
          A/B 6 normal A/B
          A/B/C 6 normal A/B/C

> move(A/B/C_at_original, A, replace=R)

What does the receiver do? I suppose it could implement the replace and
move the replaced nodes to some temporary table:

NODES local_relpath revision status repos_path
          A 6 normal A/B/C

and

TEMP A 6 normal A
          A/B 6 normal A/B
          A/B/C 6 not-present A/B/C

but note the repos_path for the new A in NODES. We can't simply change
it to:

NODES local_relpath revision status repos_path
          A 6 normal A

as that row would be invalid: wrong properties, no A_at_6 in the
repository. Let's leave it as A/B/C.

> move(A/B_at_original, A/B)

Then it moves the relevant rows out of the temporary table:

NODES local_relpath revision status repos_path
          A 6 normal A/B/C
          A/B 6 normal A/B
          A/B/C not-present A/B/C

and

TEMP A 6 normal A

So now A/B in NODES is switched relative to A. It's not even our
standard switch because A in the working copy is A/B/C in the repository
and the repository node has no child B.

> move(A_at_original, A/B/C)

Move the final row out of the temporary table

NODES local_relpath revision status repos_path
          A 6 normal A/B/C
          A/B 6 normal A/B
          A/B/C 6 normal A

So now we have two of these strange switches.

> Not sure of the intent with children (ie. what is retained under A/B/C).

What children? Every node gets moved.

Now we need the alter calls, these can fix up the switches:

alter_dir(A, children=B)

NODES local_relpath revision status repos_path
          A 8 normal A
          A/B 6 normal A/B
          A/B/C 6 normal A

alter_dir(A/B, children=C)

NODES local_relpath revision status repos_path
          A 8 normal A
          A/B 8 normal A/B
          A/B/C 6 normal A

alter_dir(A/B/C, children=)

NODES local_relpath revision status repos_path
          A 8 normal A
          A/B 8 normal A/B
          A/B/C 8 normal A/B/C

Is that the plan? NODES goes through those intermediate states with
switched nodes?

-- 
Philip Martin | Subversion Committer
WANdisco // *Non-Stop Data*
Received on 2013-09-07 11:26:21 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.