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

Re: CVS update: subversion/subversion/include svn_ra.h

From: Greg Stein <gstein_at_lyra.org>
Date: 2000-12-20 22:00:23 CET

All great, and it is what I expected. But the ROOT_PATH argument (which you
just added) is not needed when you get the commit editor. The root is
defined by the repository_URL passed to RA->open.

Same for the update editor.


On Wed, Dec 20, 2000 at 02:15:08PM -0600, Ben Collins-Sussman wrote:
> Greg Stein <gstein@lyra.org> writes:
> > These changes don't make sense... the close_edit() is the key factor here.
> > You want to call close_edit() just once per operation. So if you have
> > multiple roots, then you must use editor navigation rather than ROOT_PATH.
> >
> > Consider:
> >
> > $ svn commit some/dir another/dir
> > or
> > $ svn update some/dir another/dir
> >
> > The repository URL corresponding to "." is passed when the session is
> > opened. Then you fetch the appropriate editor (no root path!). Then navigate
> > down to each of "some/dir" and "another/dir" and start the commit/update
> > operation. When both are complete, then you call close_edit().
> >
> > With the model below, you would expect the client to call
> > get_commit_editor() twice -- once with "some/dir" and once with
> > "another/dir", but then you lose the atomicity of the commit operation
> > implied by the single close_edit() call.
> I know what you're worried about, but that's not the expectation, and
> it's my fault for writing too simplistic a doc comment there. :)
> In the case of
> $ svn commit path1 path2 path3
> The client needs to compute the, er...um... "nearest common ancestor
> path" of all three paths. It first hands this parent dir to RA, and
> gets back a commit_editor. Then it calls replace_root(). Then it
> magically calls the local_mod_crawler three times as appropriate, each
> invocation still driving the same commit editor. Finally, it calls
> close_edit() at the very end.
> If at any point the commit editor returned an error, then the whole
> task bails. So we still get atomicity for committing N paths from the
> command line.
> The trick: I just haven't done all this yet. I have all the details
> spelled out in a long comment at the very bottom of adm_crawler.c if
> you want to look. :)
> So, in summary: trust the client. It knows where to start a commit
> from, and it knows to call replace_root() and close_edit() only once.
> For milestone 2, we're just not going to allow multiple paths on the
> command-line.

Greg Stein, http://www.lyra.org/
Received on Sat Oct 21 14:36:17 2006

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