[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: Hyrum K. Wright <hyrum_wright_at_mail.utexas.edu>
Date: Mon, 30 Mar 2009 09:17:40 -0500

Do we support upgrade version-hopping like this? I was under the
impression that to upgrade from 1.X to 1.X+2, you'd better go through
1.X+1.

-Hyrum

On Mar 30, 2009, at 9:14 AM, Kamesh Jayachandran wrote:

> Hi All,
>
> Upgrading pre svn1.2 repositories to svn 1.6 fails(upgrading to 1.5
> succeeds!).
>
> Attached patch fixes it.
>
> If there are no objections I will commit it tomorrow.
>
> With regards
> Kamesh Jayachandran
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1482413Upgrading
> 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,

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1482433
Received on 2009-03-30 16:17:58 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.