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

Re: svn commit: r36857 - trunk/subversion/libsvn_fs_base

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Mon, 30 Mar 2009 22:20:55 +0300 (Jerusalem Daylight Time)

C. Michael Pilato wrote on Mon, 30 Mar 2009 at 10:21 -0700:
> Author: cmpilato
> Date: Mon Mar 30 10:21:05 2009
> New Revision: 36857
>
> Log:
> Followup to r36851, correcting the error handling logic.
>
> * subversion/libsvn_fs_base/fs.c
> (base_upgrade): Don't reference err->apr_err if err is NULL.
>
> Modified:
> trunk/subversion/libsvn_fs_base/fs.c
>
> Modified: trunk/subversion/libsvn_fs_base/fs.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_fs_base/fs.c?pathrev=36857&r1=36856&r2=36857
> ==============================================================================
> --- trunk/subversion/libsvn_fs_base/fs.c Mon Mar 30 10:07:07 2009 (r36856)
> +++ trunk/subversion/libsvn_fs_base/fs.c Mon Mar 30 10:21:05 2009 (r36857)
> @@ -825,12 +825,14 @@ base_upgrade(svn_fs_t *fs, const char *p
>
> /* Read the old number so we've got it on hand later on. */
> err = svn_io_read_version_file(&old_format_number, version_file_path, pool);
> - if (APR_STATUS_IS_ENOENT(err->apr_err))
> + if (err && APR_STATUS_IS_ENOENT(err->apr_err))
> {
> - /* Repositories created with svn 1.0 and 1.1 do not have db/format. */
> + /* Pre-1.2 filesystems do not have a 'format' file. */
> old_format_number = 0;
> svn_error_clear(err);
> + err = SVN_NO_ERROR;
> }
> + SVN_ERR(err);
>

Same fix is needed in fs_fs.c:

[[[
Index: subversion/libsvn_fs_fs/fs_fs.c
===================================================================
--- subversion/libsvn_fs_fs/fs_fs.c (revision 36859)
+++ subversion/libsvn_fs_fs/fs_fs.c (working copy)
@@ -918,6 +918,7 @@ read_format(int *pformat, int *max_files_per_dir,
 
       return SVN_NO_ERROR;
     }
+ SVN_ERR(err);
 
   len = sizeof(buf);
   err = svn_io_read_length_line(file, buf, &len, pool);
]]]

I'd commit it myself, but I'm seeing unrelated failures in 'make check'.
(Perhaps I should skip 'make check' for this one? It *is* trivial...)

> /* Bump the format file's stored version number. */
> SVN_ERR(svn_io_write_version_file(version_file_path,
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=495&dsMessageId=1484028
>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1485153
Received on 2009-03-30 21:21:21 CEST

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