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

Re: Bug in svn_wc__entries_write?

From: Karl Fogel <kfogel_at_newton.ch.collab.net>
Date: 2002-09-23 18:42:13 CEST

Ben Collins-Sussman <sussman@collab.net> writes:
> Philip Martin <philip@codematters.co.uk> writes:
>
> > /* Close & sync. ### BUG? Why do we sync if the write failed? */
> > err2 = svn_wc__close_adm_file (outfile, svn_wc_adm_access_path (adm_access),
> > SVN_WC__ADM_ENTRIES, 1, pool);
> >
> >
> > I do not understand why we would want to sync the entries file if the
> > write fails, doing so would seem to produce an incomplete, or corrupt,
> > entries file. Is this a bug, or am I missing something?
>
> Sure looks like a bug to me. We should call close_adm_file() without
> syncing, and if the operation succeeds, use that other wc function to
> do the sync manually.

I think what Philip is saying is that if the previous write (not
quoted above) failed, then we shouldn't rename the tmp entries file to
the real entries file -- i.e., what close_adm_file() with the sync
flag does. So the issue isn't the return value of close_adm_file(),
but that of the apr_file_write_full() call immediately before.

I'll patch it up now; Philip deserves a rest :-).

-K

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Sep 23 19:06:49 2002

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.