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

Re: is svn_wc__loggy_append acceptable?

From: David Glasser <glasser_at_davidglasser.net>
Date: 2007-10-26 20:47:23 CEST

On 10/26/07, Blair Zajac <blair@orcaware.com> wrote:
> David Glasser wrote:
> > loggy commands are supposed to be either idempotent (ie, ok to rerun)
> > or evident if it's already been done. svn_wc__loggy_append is none of
> > those. There's no way to know if you've already appended one file to
> > another. (Additionally, the append operation itself isn't atomic, so
> > if you cancel while the file is only part-appended, you'd get a
> > half-written file.)
> >
> > The good news is it's only used for the relatively unimportant task of
> > writing a human-legible *.prej file. Should we try to remove it and
> > use something else there? Or mark it with a big "do not use for
> > anything where you care about data consistency" comment? Removing it
> > would be pretty simple; instead of doing:
> >
> > * loggily append reject_tmp to reject_real
> >
> > we would just do
> >
> > * copy reject_real to a new reject_current_tmp file
> > * append reject_tmp to reject_current_tmp
> > * loggily rename reject_current_tmp to reject_real
>
> Why not have svn_wc__loggy_append() just do that instead? So keep the utility
> method, just have it do more work. Unless that's what you're already suggesting?

Well, the only way you would be able to tell if it has actually been
done is to make it into a sort of "move" command which removes the
source. And then you run into the problem that you'd have to make
installing the correct reject_real and removing the source file
atomic...

--dave

-- 
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 Fri Oct 26 20:47:37 2007

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.