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

[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:44:54 +0530

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=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:14:08 CEST

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