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

Re: Ev2 -- Driving Order Restrictions

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Wed, 18 Jul 2012 18:20:47 +0100 (BST)

Greg Stein wrote:
> On Jul 17, 2012 2:06 PM, "Julian Foad" <julianfoad_at_btopenworld.com> wrote:
>>   * - If any path is added (with add_*) or deleted/moved/rotated, then
>> + *   ### JAF: Or copied?
>

> Yes. The add_* is too narrow.
>
>> + *   ### 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?

- Julian

[1] 'move-here' or 'copy-here' meaning a move or copy where 'this' path is the target.
Received on 2012-07-18 19:21: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.