Upgrade a repository, branch or working tree to a newer format.


bzr upgrade [URL]


Show what would be done, but don’t actually do anything.

-v, --verbose

Display more information.

-q, --quiet

Only display errors and warnings.


Remove the backup.bzr directory if successful.


Show usage message and options.

-h, --help

Show help message.

Branch format:

--format=ARG        Upgrade to a specific format.  See "bzr help formats"
                    for details.
--1.14              A working-tree format that supports content filtering.
--1.14-rich-root    A variant of 1.14 that supports rich-root data (needed
                    for bzr-svn and bzr-git).
--2a                First format for bzr 2.0 series. Uses group-compress
                    storage. Provides rich roots which are a one-way
--default           First format for bzr 2.0 series. Uses group-compress
                    storage. Provides rich roots which are a one-way
--pack-0.92         New in 0.92: Pack-based format with data compatible
                    with dirstate-tags format repositories. Interoperates
                    with bzr repositories before 0.92 but cannot be read
                    by bzr < 0.92.

When the default format has changed after a major new release of Bazaar, you may be informed during certain operations that you should upgrade. Upgrading to a newer format may improve performance or make new features available. It may however limit interoperability with older repositories or with older versions of Bazaar.

If you wish to upgrade to a particular format rather than the current default, that can be specified using the –format option. As a consequence, you can use the upgrade command this way to “downgrade” to an earlier format, though some conversions are a one way process (e.g. changing from the 1.x default to the 2.x default) so downgrading is not always possible.

A backup.bzr.~#~ directory is created at the start of the conversion process (where # is a number). By default, this is left there on completion. If the conversion fails, delete the new .bzr directory and rename this one back in its place. Use the –clean option to ask for the backup.bzr directory to be removed on successful conversion. Alternatively, you can delete it by hand if everything looks good afterwards.

If the location given is a shared repository, dependent branches are also converted provided the repository converts successfully. If the conversion of a branch fails, remaining branches are still tried.

For more information on upgrades, see the Bazaar Upgrade Guide, http://doc.bazaar.canonical.com/latest/en/upgrade-guide/.

See also:

check, formats, reconcile

Previous topic


Next topic


This Page