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

Re: copy-on-update (was Re: svn commit: r26471)

From: David Glasser <glasser_at_davidglasser.net>
Date: 2007-09-06 19:23:56 CEST

On 9/5/07, Ben Collins-Sussman <sussman@red-bean.com> wrote:
> On 9/5/07, Malcolm Rowe <malcolm-svn-dev@farside.org.uk> wrote:
> > On Wed, Sep 05, 2007 at 01:49:05PM -0700, sussman@tigris.org wrote:
> > > Merge copy-on-updates branch to trunk.
> > >
> >
> > Nice. Does it work? (the only reason I ask is that you only added a
> > single XFail test, so I'm not sure what the status of the branch is
> > currently).
> No, the feature doesn't actually exist yet. All that branch work was
> simply to change our internal architecture so that the behavior we
> want *can* be written.
> The new behaviors are:
> * the server now supplies copyfrom arguments to add_file() during an
> update, if applicable.

Not quite caught up post-Burning-Man with dev@ mail, but: did you rev
the update APIs yet to provide a boolean to turn this behavior on, or
do we still need to do that? (Because old wc editor is stupid and
totally ignores the copyfrom args, it is vital that a new server not
try to send them to old clients.)

> * if the server passes copyfrom args to add_file(), it also might
> follow up with apply_textdelta() against the copied file.
> * the update_editor responds to the copyfrom args by doing an
> svn_ra_get_file() off to the side to install the file, so that it's
> ready for any subsequent textdeltas.
> * the update_editor is now ready to "grow some smarts" -- execute
> some algorithms to figure out whether it already has the file in the
> wc. The svn_ra_get_file() call should (in theory) be the last-ditch
> fallback behavior.
> Note that I'm going for the 80% solution here -- solve the most common
> cases of user pain. We're not handling directories, only files. What
> I'd really like help with is now is designing some algorithms to
> locate files in the WC.
> Another snafu: how do we know if an WC file is the file we want? For
> example, if the server sends copyfrom args of "foo.c@7", and the
> client notices that it has foo.c@8, how does it know if that's the
> same thing? It makes me wish we had an RA call to do node-id
> filesystem comparisons.

Can't svn_ra_stat do that (and check the created_rev field)? Although
I feel like I've said this on IRC several times and maybe there was
some reason I was wrong :)


David Glasser | glasser_at_davidglasser.net | http://www.davidglasser.net/
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Sep 6 19:20:56 2007

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