Ping... any Ev2 gurus?
Especially my question about delete, at the end of this email...
I (Julian Foad) wrote:
> Greg Stein wrote:
>>> * - If any path is added (with add_*) or deleted/moved/rotated, then
[...]
>>> + * ### JAF: Rewrite as: "If any path is added or removed or replaced
>>> + * (with add_*, delete, copy, move, rotate), then ..."?
>>
>> Yes.
>>
>>> * an svn_editor_alter_directory() call must be made for its parent
>>> * directory with the target/eventual set of children.
>>> + * ### JAF: Even if initial & eventual sets of children are identical?
>>
>> No. If they are identical, then you are replacing one or more nodes.
>
> OK. In that case, 'replace' and 'rotate' are superfluous in
> this rule as they don't change the existence of a node at a given path. The
> rule should be:
>
> If any path is added or removed (with add_*, delete, copy
> or move), such that the target/eventual set of children
> of its parent directory differs from the initial set, then
> an svn_editor_alter_directory() call must be made for its
> parent directory with the target/eventual set of children.
>
> Or we could shorten that to:
>
> If the target/eventual set of children of a directory
> differs from its initial set of children, then an
> svn_editor_alter_directory() call must be made for the
> directory, specifying the target/eventual set of children.
>
>>> *
>>> * - svn_editor_add_directory() -- Another svn_editor_add_*() call must
>>> + * ### JAF: Or copy-here or move-here call?
>>
>> Or rotate, yes.
>
> Rotate can't create a node at a given path where there wasn't a node
> before, so there needs to be an add or copy-here or move-here[1].
>
>>> * follow for each child mentioned in the @a children argument of any
>>> * svn_editor_add_directory() call.
>>> + * ### JAF: Also for each new child of any alter_directory() call?
>>
>> Yes.
>>
>>> *
>>> * - For each node created with add_*, if its parent was created using
>>> + * ### JAF: node created with add_* or copy or move-here?
>>
>> No. Copy/move arrives with children already.
>>
>>> * svn_editor_add_directory(), then the new child node MUST have been
>>> * mentioned in the @a children parameter of the parent's creation.
>>> * This allows the parent directory to properly mark the child as
>>> * "incomplete" until the child's add_* call arrives.
>
> Are you saying, if the child is created by
> 'copy' or 'move' then the WC won't need to mark it
> 'incomplete' so the
> editor doesn't need to pre-notify it in a 'children' argument? This
> seems to be a bit too specific to the current needs of WC-NG.
>
> But wait-a-sec. We can simply delete this rule, because it is already redundant
> with the first rule which already says that if a new child is to be added in any
> way then the new list of children must have been provided in a
> 'children' argument, period.
>
>
>>> + * ### JAF: Also for each new child of any alter_directory() call?
>>
>> Yes.
>
>
> OK.
>
> A question about delete. If a path is deleted and not replaced, then the new
> list of children for the parent directory must have been provided (first rule).
> But conversely, if a path is removed from a directory by alter_directory's
> 'children' parameter, then must there necessarily be a delete or
> move-away for that child?
This 'delete' question is, essentially, starting from the following tree of three nodes:
D
D/D1
D/D2
which of the following are valid ways to delete 'D1'?
(1)
delete('D/D1')
complete()
(2)
alter_dir('D', children={D2})
complete()
(3)
alter_dir('D', children={D2})
delete('D/D1')
complete()
(4)
delete('D/D1')
alter_dir('D', children={D2})
complete()
Sequence (1) is forbidden by the first rule; (2) and (3) and (4) are not forbidden by the Driving Order Restrictions as currently stated in svn_editor.h as far as I can see.
Sending a delete() operation for each deleted child as well as an alter_directory() is of course redundant, so in the interest of efficiency, and thinking just of the deletion of many files, I assume we would consider making the delete() call optional or forbidden; but I don't know what's already been decided or if there are other factors in play.
- Julian
Received on 2012-07-24 20:36:46 CEST