On Wed, Sep 05, 2007 at 12:59:49PM -0400, C. Michael Pilato wrote:
> + /* Soft upgrade: create the transaction-current file if the
> + repository supports the transaction sequence file but is
> + currently lacking such a file. */
> + if (format >= SVN_FS_FS__MIN_TXN_CURRENT_FORMAT)
> + {
This is, of course, impossible. Format 3 FSFS filesystems always have a
transaction-current file... unless you're perhaps talking about an
older format 3 filesystem that might have existed only in a development
version of 1.5.0? :-)
While I'm -0 on anything that includes supporting code for unreleased
versions of the filesystem, I'm -1 on anything that performs write
operations on a filesystem that we aren't necessarily writing to -- FSFS
filesystems should be readable from read-only media, and the below won't
be (you'd need to ignore EACCESS, for one).
If you really want to soft-upgrade, I'd prefer we just handle ENOENT
(with an appropriate comment) when opening the transaction-current file
(which AFAIR we only do in one place anyway).
> + err = svn_io_file_create(svn_path_join(path, PATH_TXN_CURRENT, pool),
> + "0\n", pool);
> + if (err)
> + {
> + if (APR_STATUS_IS_EEXIST(err->apr_err))
> + svn_error_clear(err);
> + else
> + return err;
> + }
> + }
Regards,
Malcolm
- application/pgp-signature attachment: stored
Received on Wed Sep 5 22:24:28 2007