Upgrading a Bazaar DRCS repository format
on Tuesday 6th May, 2008 Gabe speculated thusly…Bazaar has come on a long way over the last six months with the latest release being somewhere around the 1.4 mark. Today, with the upgrade to Hardy which brought with it version 1.3 I started noticing incompatibilities between my local version (1.3) and the server version (0.9). Further investigation revealed some major changes across those revisions, including a completely revised storage format for branches or repositories. So, once you get Bazaar up to the latest version, you need to go about upgrading the storage formats of you branches like so:
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 (an example of an obsolete format):
repository: Knit repository format 1
If it’s anything other 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 the gist of it is:
Make sure you backup the whole directory first, then run:
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:
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 which is named .bzr.backup/. Only do that after you’re sure everything is OK!
Posted in Bazaar, Revision Control