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

Editorr v2 svn_editor_alter_directory needs list of children

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Thu, 12 Apr 2012 16:19:40 +0100

I think alter_directory needs a list of children as well as the new
properties. Consider an update from

   relpath revision props
   A 3 p=v
   A/X 3


   relpath revision props
   A 4 p=vvv
   A/X 4
   A/Y 4

The v2 editor drive will call alter_directory to change the properties
on A and add_directory to add the child A/Y.

The alter_directory call cannot change the properties of A without
changing the revision, but it cannot simply change the revision of A if
A/Y has not yet been added. The best solution seems to be that
alter_directory should have a list of the children, just like
add_directory, then it can add any missing children as incomplete,
change the properties and update the revision.

An alternative might be marking A incomplete, like a v1 drive. I don't
like that, I would prefer it if v2 could reserve incomplete for nodes
that are just names and have no content.

Another alternative might be imposing a drive order restriction, only
allow alter_directory after all children have been added. I don't think
that is right either, v2 tries to avoid depth order restrictions.

If we consider a node's "content" to consist of text+props for files and
children+props for directories then we see that the current alter_file
already supplies all the content for file nodes while the current
alter_directory only supplies part of the content for directory nodes.
Adding children to alter_directory removes that difference.

uberSVN: Apache Subversion Made Easy
Received on 2012-04-12 17:20:19 CEST

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