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

Re: svn commit: r1333739 - /subversion/trunk/subversion/libsvn_delta/editor.c

From: Greg Stein <gstein_at_gmail.com>
Date: Fri, 4 May 2012 13:36:49 -0400

On May 4, 2012 6:49 AM, "Philip Martin" <philip.martin_at_wandisco.com> wrote:
> Greg Stein <gstein_at_gmail.com> writes:
> > One fallout that I need to document: alter_*() should be called on
> > child nodes at the destination of a copy/delete. It is now "illegal"
> > to modify a child, then move its parent elsewhere. The proper order
> > is: move parent, then edit the child. (strictly speaking, it doesn't
> > check the full ancestry... just the immediate parent, but whatever...
> > this is still debug code to help us rather than full hard-core
> > verification)
> Does this restriction also apply to adding/deleting/moving/rotating all
> children before calling alter_directory on the parent?

Only structural changes are denied (if they weren't already through prior
edits on the parent). alter_directory is still allowed after the child op,
presuming you haven't called it already.

Also note that if the parent was created with add_directory, then
alter_directory is denied (you should have created it with the correct

And yes: you can call alter_directory on the parent before these various
child ops.

The goal is to avoid (say) altering a child, then deleting it by deleting
the parent.

> In an earlier thread I was asking how alter_directory could apply
> properties without knowing the new children:
> http://svn.haxx.se/dev/archive-2012-04/0206.shtml
> When updating the working copy we cannot change the directory properties
> without changing the revision and we cannot change the revision without
> either already having all the children at the new revision or marking
> the directory incomplete.

Oh! I missed that thread. I was off in Kentucky...

You're right. I'll make the necessary changes. I'll respond on that thread
for future readers, too.

Received on 2012-05-04 19:37:22 CEST

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