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

multiple replace_root() calls per edit

From: Karl Fogel <kfogel_at_galois.collab.net>
Date: 2001-01-02 20:34:51 CET

Greg, we had an exchange earlier about calling replace_root() multiple
times per edit. You said it sounded like a reasonable thing to do,
but I said there should only be one call per edit.

Now the more I think about it, the righter you seem. I mean,
replace_root() returns a directory baton, which can later be passed to
close_directory(). And there can be multiple close_directory() calls
per edit, as we all know...

Furthermore, my working definition of "root" in replace_root() has
been

   "A directory in and below which there are edits, but whose parent
    remains unaffected by those edits."

There's no contradiction between that and having multiple calls. And
the last piece of evidence is that all the code, as it's currently
written, should -- uh, "should" -- just work even if replace_root() is
called more than once. In other words, the most natural way to write
things didn't preclude the possibility, so we shouldn't ban it
artifically either.

Currently, the documentation for svn_delta_edit_fns_t in svn_delta.h
strongly hints, but does not outright state, that there should only be
one call per edit. Assuming JimB agrees with the above reasoning,
I'll adjust the docs. We'll wait for poor Jim to get back though,
just in case he spots a doozy. :-)

-K
Received on Sat Oct 21 14:36:19 2006

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.