unable to upgrade from 'dirstate-with-subtree' to 2a

Bug #480561 reported by Parth Malwankar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Low
Unassigned

Bug Description

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.

[sa]% bzr info
Format <RepositoryFormatKnit3> for file:///storage/parth/code/sa/.bzr/ is deprecated - please use 'bzr upgrade' to get better performance
Standalone tree (format: dirstate-with-subtree)
Location:
  branch root: .

Related branches:
  push branch:
[sa]% bzr upgrade
Format <RepositoryFormatKnit3> for file:///storage/parth/code/sa/.bzr/ is deprecated - please use 'bzr upgrade' to get better performance
bzr: ERROR: Cannot convert from format <RepositoryFormatKnit3> to format <RepositoryFormat2a>. Does not support nested trees
[sa]% bzr upgrade --2a
Format <RepositoryFormatKnit3> for file:///storage/parth/code/sa/.bzr/ is deprecated - please use 'bzr upgrade' to get better performance
bzr: ERROR: Cannot convert from format <RepositoryFormatKnit3> to format <RepositoryFormat2a>. Does not support nested trees
[sa]% bzr upgrade --rich-root-pack
Format <RepositoryFormatKnit3> for file:///storage/parth/code/sa/.bzr/ is deprecated - please use 'bzr upgrade' to get better performance
bzr: ERROR: Cannot convert from format <RepositoryFormatKnit3> to format <RepositoryFormatKnitPack4>. Does not support nested trees
[sa]% bzr upgrade --1.14-rich-root
Format <RepositoryFormatKnit3> for file:///storage/parth/code/sa/.bzr/ is deprecated - please use 'bzr upgrade' to get better performance
bzr: ERROR: Cannot convert from format <RepositoryFormatKnit3> to format <RepositoryFormatKnitPack6RichRoot>. Does not support nested trees
[sa]%

The repository is also available at https://launchpad.net/~parthm/+junk/sa

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

Changed in bzr:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Parth Malwankar (parthm) wrote :

Thanks John. The patch worked fine.

[sa-fix]% /home/parthm/src/bzr-edge/treefix/bzr upgrade lp:~parthm/+junk/sa
Unable to load plugin 'svn'. It requested API version (2, 0, 0) of module <module 'bzrlib' from '/storage/parth/src/bzr-edge/treefix/bzrlib/__init__.pyc'> but the minimum exported version is (2, 1, 0), and the maximum is (2, 1, 0)
Unable to load plugin 'git'. It requested API version (1, 18, 0) of module <module 'bzrlib' from '/storage/parth/src/bzr-edge/treefix/bzrlib/__init__.pyc'> but the minimum exported version is (2, 1, 0), and the maximum is (2, 1, 0)
Unable to load plugin 'loggerhead'. It requested API version (1, 17, 0) of module <module 'bzrlib' from '/storage/parth/src/bzr-edge/treefix/bzrlib/__init__.pyc'> but the minimum exported version is (2, 1, 0), and the maximum is (2, 1, 0)
Format <RepositoryFormatKnit3> for bzr+ssh://bazaar.launchpad.net/~parthm/%2Bjunk/sa/.bzr/ is deprecated - please use 'bzr upgrade' to get better performance
starting upgrade of bzr+ssh://bazaar.launchpad.net/~parthm/%2Bjunk/sa/
making backup of bzr+ssh://bazaar.launchpad.net/~parthm/%2Bjunk/sa/.bzr
  to bzr+ssh://bazaar.launchpad.net/~parthm/%2Bjunk/sa/backup.bzr
starting repository conversion
repository converted
finished
bzr: warning: some compiled extensions could not be loaded; see <https://answers.launchpad.net/bzr/+faq/703>
[sa-fix]%

Jelmer Vernooij (jelmer)
tags: added: upgrade
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.