unable to upgrade to 2a

Asked by Parth Malwankar

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. I also tried a bunch of other formats (rich-root-pack, 1.14-rich-root) but that also failed. How can I upgrade this repository to 2a?

[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]%

Question information

Language:
English Edit question
Status:
Solved
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Solved by:
Neil Martinsen-Burrell
Solved:
Last query:
Last reply:
Revision history for this message
Best Neil Martinsen-Burrell (nmb) said :
#1

I can't find any mention of the dirstate-with-subtree format in ``bzr help formats``, ``bzr help current-formats`` or ``bzr help other-formats``, but I can create a branch with that format

$ bzr init --dirstate-with-subtree test
Format <RepositoryFormatKnit3> for file:///Users/nmb/tmp/test/.bzr/ is deprecated - please use 'bzr upgrade' to get better performance
Created a standalone tree (format: dirstate-with-subtree)

and reproduce your error

$ bzr upgrade --2a
Format <RepositoryFormatKnit3> for file:///Users/nmb/tmp/test/.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

It appears that the upgrade code is not recognizing the RepositoryFormatKnit3 format in order to upgrade it.

I was able to pull from a dirstate-with-subtree branch into a 2a format branch, so that is a possible workaround. I suggest

% cd /storage/parth/code/
% bzr init sa-in-2a
% cd sa-in-2a
% bzr pull ../sa
% bzr check
% bzr upgrade # should be a no-op
% cd ..
% mv sa sa-old
% mv sa-in-2a sa

Revision history for this message
Parth Malwankar (parthm) said :
#2

Thanks Neil Martinsen-Burrell, that solved my question.