You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Kamesh Jayachandran <ka...@collab.net> on 2009/03/30 14:14:54 UTC

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

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

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

Posted by Kamesh Jayachandran <ka...@collab.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thanks Stefan and Hyrum.

Committed in r36851 and nominated for 1.6.x backport.

With regards
Kamesh Jayachandran

Stefan Sperling wrote:
> On Mon, Mar 30, 2009 at 09:28:33AM -0500, Hyrum K. Wright wrote:
>> On Mar 30, 2009, at 9:26 AM, Kamesh Jayachandran wrote:
>>
>>> -----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.
>> Sure.  I'm not saying we shouldn't support it, I'm just that I didn't  
>> know we currently do support that upgrade path.  (And if somebody  
>> really did want to jump several repository formats ahead, they are  
>> probably better off doing a dump/load.)
> 
> It's a regression either way because it worked with 1.5.x.
> 
> I'd say we should fix the bug, whether or not we support such
> an upgrade. It's an easy fix.
> 
> Stefan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJ0Nx83WHvyO0YTCwRAmpIAJ48Zd1T2gfUqbX2ZiBmInmbvAdXFQCgnE5E
URfro70e9cvZXaQqg5E7roA=
=w6Ay
-----END PGP SIGNATURE-----

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1482638

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

Posted by Stefan Sperling <st...@elego.de>.
On Mon, Mar 30, 2009 at 09:28:33AM -0500, Hyrum K. Wright wrote:
> On Mar 30, 2009, at 9:26 AM, Kamesh Jayachandran wrote:
> 
> > -----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.
> 
> Sure.  I'm not saying we shouldn't support it, I'm just that I didn't  
> know we currently do support that upgrade path.  (And if somebody  
> really did want to jump several repository formats ahead, they are  
> probably better off doing a dump/load.)

It's a regression either way because it worked with 1.5.x.

I'd say we should fix the bug, whether or not we support such
an upgrade. It's an easy fix.

Stefan

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

Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
On Mar 30, 2009, at 9:26 AM, Kamesh Jayachandran wrote:

> -----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.

Sure.  I'm not saying we shouldn't support it, I'm just that I didn't  
know we currently do support that upgrade path.  (And if somebody  
really did want to jump several repository formats ahead, they are  
probably better off doing a dump/load.)

-Hyrum

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1482512

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

Posted by Kamesh Jayachandran <ka...@collab.net>.
-----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

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

Posted by "C. Michael Pilato" <cm...@collab.net>.
My intention when introducing the 'svnadmin upgrade' subcommand and
supporting APIs was to allow this type of upgrade.  I don't know that I ever
explicitly stated as much, and I'm pretty sure we've not discussed it as a
community.  But that's what I was aiming for, for what it's worth.

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.
> 
> -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!).

-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1482782

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

Posted by Peter Samuelson <pe...@p12n.org>.
[Hyrum K. Wright]
> 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.

Given the famously slow Debian release cycle ... it'd be nice if I
could rely on smooth upgrades at least from N to N+2.  (This thread is
really about N to N+5, I don't think Debian needs _that_.)  Our most
recent release involved upgrading Subversion 1.4.2 -> 1.5.1, but before
that I think our release cycle skipped over 1.3.x entirely, and before
that I think we skipped over 1.0.x.  And I expect the next release will
skip over 1.6.x, unless either Subversion has an uncharacteristically
slow cycle or Debian has an uncharacteristically fast one.
-- 
Peter Samuelson | org-tld!p12n!peter | http://p12n.org/

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

Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
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

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

Posted by Stefan Sperling <st...@elego.de>.
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,