Re: Move using initial state
From: Philip Martin <philip.martin_at_wandisco.com>
Date: Fri, 06 Sep 2013 16:50:26 +0100
Philip Martin <philip.martin_at_wandisco.com> writes:
> What about alter_dir? I think the rule is that alter_dir on a directory
I've been thinking about alter_dir and I see no reason, in the update
Consider a working copy with three nodes:
A_at_6
that gets updated to
A_at_8
That's two adds, two deletes and an alter and the update editor can
add_dir A/D
Lets see how NODES would work:
relpath rev status
add_dir A/D
relpath rev status
delete A/B
relpath rev status
alter_dir A
relpath rev status
add_dir A/E
relpath rev status
delete A/C
relpath rev status
Every intermediate state has NODES rows that reflect repository nodes.
The delete introduces a not-present node if the parent revision is
The alter removes any not-present children and introduces incomplete for
Any children that are replaced, i.e. add with replaces-rev set, do not
> It's not clear where alter_dir should occur w.r.t the moves in my
So we don't necessarily have to do alter_dir on the parent before moving
relpath rev status repo
move_away A/B/C, id=1
relpath rev status repo
move_away A/B, id=2
relpath rev status repo
move_away A, id=3
relpath rev status repo
alter_dir id=1, children=B
relpath rev status repo
alter_dir id=2, children=C
relpath rev status repo
alter_dir id=3, children=
relpath rev status repo
That looks like the set of NODES tables that we want. At each stage the
This also means that NODES.repos_path and NODE.revision in the NODES
relpath rev status repo
If we move before alter we either get
move A/B A/C
relpath rev status repo
or
relpath rev status repo
The first has an invalid row A/C_at_6 the second has A/C switched. If we
alter_dir C, children=
relpath rev status repo
or
relpath rev status repo
again either invalid or switched. This implies that if we want to
move_away A, id=1
into a single
move A, B
then move and alter need to be combined:
move_dir A, B, children=, props=
-- Philip Martin | Subversion Committer WANdisco // *Non-Stop Data*Received on 2013-09-06 17:51:07 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.