Comment 1 for bug 480561

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 480561] [NEW] unable to upgrade from 'dirstate-with-subtree' to 2a

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

Parth Malwankar wrote:
> Public bug reported:
>
> Hello,
>
> I have an old bzr repository in "dirstate-with-subtrees" format.
> Recently after moving to bzr 2.0.1 (ubuntu 9.10) I tried upgrading it to
> 2a but was unable to do so. Even though bzr indicates I should run 'bzr
> upgrade' it fails. I also tried a bunch of other formats (rich-root-
> pack, 1.14-rich-root) but that also failed.

Specifically, you are using a format that has the "supports subtrees"
flag set. Looking at the repository, it doesn't seem like you are
actually making use of that fact, though.

If you just want to get converted, you can apply this patch, do the
upgrade, and then revert the patch.
(I know launchpad will mess up the indentation, but the patch is pretty
trivial.)

=== modified file 'bzrlib/repofmt/groupcompress_repo.py'
- --- bzrlib/repofmt/groupcompress_repo.py 2009-10-23 17:27:45 +0000
+++ bzrlib/repofmt/groupcompress_repo.py 2009-11-12 21:00:24 +0000
@@ -1275,6 +1275,7 @@
     """

     _serializer = chk_serializer.chk_bencode_serializer
+ supports_tree_reference = True

     def _get_matching_bzrdir(self):
         return bzrdir.format_registry.make_bzrdir('2a')

At the moment, there is no upgrade path from '--dirstate-with-subtrees'
because it was mainly an experimental feature (it certainly was never a
default format.) We had hoped that 'subtree' support would be sufficient
to enable it in --2a formats, but we did not get there.

Note that if you do this, *you* have to be careful to check that you
aren't actually using tree references. (Most likely you aren't, since
they don't really work yet.)

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkr8eCIACgkQJdeBCYSNAAMELgCcCElTi8n+xK42YfuP8kPr1occ
L9gAoNVM2wn2jPFVSIrcLsUe1Np5Gafi
=GYJS
-----END PGP SIGNATURE-----