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

Re: svn commit: r38394 - in trunk/subversion: include libsvn_delta

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Sun, 12 Jul 2009 01:04:48 +0100

Neels J Hofmeyr wrote:
> Julian Foad wrote:
> > On Thu, 2009-07-09 at 15:53 -0700, Neels Janosch Hofmeyr wrote:
> >> Enable an atomic replace in editor v2.
> >>
> >> * subversion/include/svn_editor.h
> >> (svn_editor_add_directory_t, svn_editor_add_directory,
> >> svn_editor_add_file_t, svn_editor_add_file,
> >> svn_editor_add_symlink_t, svn_editor_add_symlink,
> >> svn_editor_add_absent_t, svn_editor_add_absent):
> >> Add parameter REPLACES_REV.
> >
> > Where is this parameter documented?

> It felt kind of silly to only document that parameter in the midst of void.
> And I am too lazy right now to document all of them.

But it's not silly. I can't review the change without knowing what it
means. I'm sure it seems totally obvious to you, but I have questions
about it.

> However, I added a rough description in notes/editor-v2.txt in r38396.

add_directory(path, children, props, replaces_rev)
  -- name all children. receiver can put on "pending" list
  -- MUST be followed (at some point) by add_*() calls for each child
  -- if replaces_rev isn't SVN_INVALID_REVNUM, this is an atomic
     Use a revnum because it implies all other info like node kind etc.

That doesn't actually say what the parameter means. Is it something like

If replaces_rev is not SVN_INVALID_REVNUM:
(a) This 'add' atomically replaces the node (of kind 'file' or
'directory') that would have existed (if this call and any associated
'delete' call were ignored) at 'path' in the target revision of this
editor drive.
(b) The replaced node-rev must have unbroken history back to revision
'replaces_rev', with no modifications of any kind.
(c) A separate 'delete' of the node that previously existed should not
be issued by the driver, but must be accepted by the receiver (before or
after this call) for backward compatibility.


- Julian

Received on 2009-07-12 02:05:32 CEST

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