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

Re: [PATCH]Upgrading pre svn1.2 repositories to svn 1.6 fails(upgrading to 1.5 succeeds though!)

From: Stefan Sperling <stsp_at_elego.de>
Date: Mon, 30 Mar 2009 15:30:21 +0100

On Mon, Mar 30, 2009 at 07:44:54PM +0530, Kamesh Jayachandran wrote:
> Hi All,
>
> Upgrading pre svn1.2 repositories to svn 1.6 fails(upgrading to 1.5
> succeeds!).

Sounds familiar, we have a similar problem in the working copy
for 1.6.0 :)

Looks like this regression was introduced in r33287 (1.5.x was
branched in r29081).

> Attached patch fixes it.
>
> If there are no objections I will commit it tomorrow.

+1, please commit and nominate for backport to 1.6.x.

Stefan

> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1482413
> Upgrading repositories created with pre svn1.2 fails.
>
> * subversion/libsvn_fs_base/fs.c
> (base_upgrade): Pre 1.2 svn repositories do not have $REPO/db/format file
> so do not fail on such a case.

> Index: subversion/libsvn_fs_base/fs.c
> ===================================================================
> --- subversion/libsvn_fs_base/fs.c (revision 36847)
> +++ subversion/libsvn_fs_base/fs.c (working copy)
> @@ -819,12 +819,18 @@
> {
> const char *version_file_path;
> int old_format_number;
> + svn_error_t *err;
>
> version_file_path = svn_path_join(path, FORMAT_FILE, pool);
>
> /* Read the old number so we've got it on hand later on. */
> - SVN_ERR(svn_io_read_version_file(&old_format_number, version_file_path,
> - pool));
> + err = svn_io_read_version_file(&old_format_number, version_file_path, pool);
> + if (APR_STATUS_IS_ENOENT(err->apr_err))
> + {
> + /* Repositories created with svn 1.0 and 1.1 do not have db/format. */
> + old_format_number = 0;
> + svn_error_clear(err);
> + }
>
> /* Bump the format file's stored version number. */
> SVN_ERR(svn_io_write_version_file(version_file_path,
Received on 2009-03-30 16:30:42 CEST

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.