It occurred to me the other day that while it’s very obvious what one of the major improvements that came with the release of 1.0 to those of us actively participating and following bazaar’s development (a new storage format with performance as a priority), so obvious, it might not be for the average user.
This new storage format also brought many long awaited bug fixes, so I think it was not stressed enough how important it is to upgrade any branches you created (or started using) with any version before 1.0.
First of all, make sure you’re running the latest bzr version (head to http://bazaar-vcs.org/Download, Ubuntu users can download the very latest from PPA)
To find out what storage format you are currently using, just go the the branch’s folder and type in:
bzr info -v | grep 'repository'
That should give you an output similar to this:
beuno@beuno-laptop:~/test_branch$ repository: Knit repository format 1
(Warning: if you’re using bzr-svn, you might see different formats, this probably doesn’t apply)
If it’s reporting Knit repository format (or anything different than Packs containing knits…) then you’re still using the old storage format. How to upgrade is documented in the bzr documentation, including preparation and upgrading, but for you lazy fellows, here’s how it goes:
Make sure you backup the whole directory first, the run:
beuno@beuno-laptop:~/test_branch$ bzr upgrade
(if you’re using shared repositories, make sure you specify where the root repository is with bzr upgrade root-repo-dir)
Once that’s done, you should reconcile:
beuno@beuno-laptop:~/test_branch$ bzr reconcile
If the operation doesn’t report any problems, run a quick bzr info to make sure the repository has been updated correctly and you should be able to delete the backup of the old storage format dir renamed to .bzr.backup/ (WARNING: make sure everything is working correctly before you do this).
If you have branches in Launchpad, you have to do the upgrades via SFTP instead of bzr+ssh (and I do recommend having all branches with the same storage format) like so:
beuno@beuno-laptop:~/test_branch$ bzr upgrade sftp://<username>@bazaar.launchpad.net/~username/project/branchname
And then of course:
beuno@beuno-laptop:~/test_branch$ bzr reconcile sftp://<username>@bazaar.launchpad.net/~username/project/branchname
If you run into any problems, feel free to drop by #bzr in freenode.
Leave a Reply