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

Re: Ev2 using move-away and move-here

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Wed, 14 Aug 2013 13:05:23 +0100

Julian Foad <julianfoad_at_btopenworld.com> writes:

> Example 3: Swapping two directory levels
>
> | |
> +--A --\ /--> +--A
> | X |
> +--B --/ \--> +--B
>
> 1. alter-dir A (children={}) ### Needed?
>
> 2. mv-away A/B (id=”original A/B”)
>
> 3. alter-dir / (children={A})
>
> 4. mv-away A (id=”original A”)
>
> 5. mv-here A (id=”original A/B”)
>
> 6. alter-dir A (children={B}) ### Second alter-dir on same path, if (1)
> was needed.
>
> 7. mv-here A/B (id=”original A”)

That's inconsistent: for A alter-dir is before mv-away while for A/B
alter-dir is after mv-away. A more consistent set of steps would be:

    1. alter-dir A/B (children={A})

    2. alter-dir A (children={})

    3. mv-away A/B (id="original A/B")

    4. mv-away A (id="original A")

    5. mv-here A (id="original A/B")

    6. mv-here A/B (id="original A")

Not sure whether 1 and 2 have any particular order. In the working copy
receiver the alter-dir for A/B causes A to be added as incomplete in
A/B; it becomes complete at step 6. I'm not sure whether the alter-dir
for A that deletes a child causes anything to be marked.

> There are two potential problems here:
>
> * We make an edit within subtree A (the “move-away A/B”) before moving A
>
> * The “alter-dir A” is performed twice

In this case there is no need to perform alter-dir on A twice.

As you pointed out when a copy replaces a mv-away it is still necessary
to alter-dir two different nodes at the same path:

    1. alter-dir A (children={...})
    2. mv-away A (id=...)
    3. copy A (src=...)
    4. alter-dir A (children={...})

[...]

-- 
Philip Martin | Subversion Committer
WANdisco // *Non-Stop Data*
Received on 2013-08-14 14:06:00 CEST

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