[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: Kamesh Jayachandran <kamesh_at_collab.net>
Date: Mon, 30 Mar 2009 19:56:49 +0530

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hyrum K. Wright wrote:
> 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.
>

What if somebody is *not* interested in 1.X and continue using old 1.X-1
and suddenly needs 1.X+1 badly, so why not he upgrade directly?

In any case atleast we should detect leap upgrades and take meaningful
upgrade path or atleast suggest something useful instead of vague error.

With regards
Kamesh Jayachandran
> -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,
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJ0Nap3WHvyO0YTCwRAnERAJsHmQ5GIcKb81vfOClC2cPI2eZSigCfTrwD
vu+FCGrhw0wg4PPyRuSIBJ4=
=DxHW
-----END PGP SIGNATURE-----

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