bzr 2.2b1


This is the first beta of the 2.2 series, leading up to a 2.2.0 release in July or August. Beta releases are suitable for everyday use but may cause some incompatibilities with plugins. Some plugins may need small updates to work with 2.2b1.

2.2b1 includes some changes to make merge conflicts easier to understand and resolve. It also removes some old unnecessary code, and loads somewhat less code at startup. It starts adding a common infrastructure for dealing with colocated named branches, which can be implemented in various ways in either bzr native or foreign formats. On Ubuntu and other platforms with the apport bug-reporting library, there’s an easier path to report problems with bzr. We plan to continue with these themes through the 2.2 series.

Over thirty bugs have been fixed, including in the log command, exporting to tarballs, restarting interrupted system calls, portability of compiled extensions, making backups during upgrade, and locking on ftp.

Compatibility Breaks

  • BTreeGraphIndex can now take an offset to indicate that the data starts somewhere other than then beginning of the file. (John Arbash Meinel)
  • Deleted very old hidden commands versionedfile-list, weave-plan-merge, weave-merge-text. (Martin Pool)
  • Repository.get_inventory_sha1() and Repository.get_revision_xml() have been removed. (Jelmer Vernooij)
  • Repository.get_revision_inventory() has been removed in favor of Repository.get_inventory(). (Jelmer Vernooij)
  • All test servers have been moved out of the bzrlib.transport hierarchy to bzrlib.tests.test_server except for MemoryServer, ChrootServer and PathFilteringServer. bzrlib users may encounter test failures that can be fixed by updating the related imports from to bzrlib.tests.test_server. (Vincent Ladeuil)
  • BranchReferenceFormat.initialize() now takes an optional name argument as its second parameter, for consistency with the initialize() method of other formats. (Jelmer Vernooij)

New Features

  • Added bzr remove-branch command that can remove a local or remote branch. (Jelmer Vernooij, #276295)
  • bzr export now takes an optional argument --per-file-timestamps to set file mtimes to the last timestamp of the last revision in which they were changed rather than the current time. (Jelmer Vernooij)
  • If the Apport crash-reporting tool is available, bzr crashes are now stored into the /var/crash apport spool directory, and the user is invited to report them to the developers from there, either automatically or by running apport-bug. No information is sent without specific permission from the user. (Martin Pool, #515052)
  • Parsing of command lines, for example in diff --using, no longer treats backslash as an escape character on Windows. (Gordon Tyler, #392428)
  • Plugins can be disabled by defining BZR_DISABLE_PLUGINS as a list of plugin names separated by ‘:’ (‘;’ on windows). (Vincent Ladeuil, #411413)
  • Plugins can be loaded from arbitrary locations by defining BZR_PLUGINS_AT as a list of name@path separated by ‘:’ (‘;’ on windows). This takes precedence over BZR_PLUGIN_PATH for the specified plugins. This is targeted at plugin developers for punctual needs and not intended to replace BZR_PLUGIN_PATH. (Vincent Ladeuil, #82693)
  • Tag names can now be determined automatically by automatic_tag_name hooks on Branch if they are not specified on the command line. (Jelmer Vernooij)
  • Tree-shape conflicts can be resolved by providing --take-this and --take-other to the bzr resolve command. Just marking the conflict as resolved is still accessible via the --done default action. (Vincent Ladeuil)
  • Merges can be proposed on Launchpad with the new lp-propose-merge command. (Aaron Bentley, Jonathan Lange)

Bug Fixes

  • Added docstring for Tree.iter_changes (John Arbash Meinel, #304182)

  • Allow additional arguments to RemoteRepository.add_inventory_by_delta(). (Jelmer Vernooij, #532631)

  • Allow exporting a single file using bzr export. (Michal Junák, #511987)

  • Allow syscalls to automatically restart when TextUIFactory‘s SIGWINCH handler is invoked, avoiding EINTR errors during blocking IO, which are often poorly handled by Python’s libraries and parts of bzrlib. (Andrew Bennetts, #496813)

  • Avoid infinite recursion when probing for apport. (Vincent Ladeuil, #516934)

  • Avoid malloc(0) in patiencediff, which is non-portable. (Martin Pool, #331095)

  • Avoid truncating svn URLs. (Martin Pool, Martin von Gagern, #545185)

  • bzr add will not add conflict related files unless explicitly required. (Vincent Ladeuil, #322767, #414589)

  • bzr dump-btree now works on *.cix and *.six files. Those indices do not have reference lists, so dump-btree will simply show None instead. (Andrew Bennetts, #488607)

  • bzr help will no longer trigger the get_missing_command hook when doing a topic lookup. This avoids prompting (like ‘no command plugins/loom, did you mean log?’) when getting help. In future we may trigger the hook deliberately when no help topics match from any help index. (Robert Collins, #396261)

  • bzr log -n0 -r..A.B.C should not crash but just consider the None revspec as representing the first revision of the branch. (Vincent Ladeuil, #519862)

  • bzr remove-tree can now remove multiple working trees. (Jared Hance, Andrew Bennetts, #253137)

  • bzr resolve --take-this and --take-other now correctly renames the kept file on content conflicts where one side deleted the file. (Vincent Ladeuil, #529968)

  • bzr upgrade now creates the backup.bzr directory with the same permissions as .bzr directory on a POSIX OS. (Parth Malwankar, #262450)

  • bzr upgrade now names backup directory as backup.bzr.~N~ instead of backup.bzr. This directory is ignored by bzr commands such as add. (Parth Malwankar, #335033, #300001)

  • Cope with non-utf8 characters inside .bzrignore. (Jason Spashett, #183504)

  • Correctly interpret “451 Rename/move failure: Directory not empty” from ftp servers while trying to take a lock. (Martin Pool, #528722)

  • DirStateRevisionTree.kind() was returning wrong result when ‘kind’ changes occured between the workingtree and one of its parents. (Vincent Ladeuil, #535547)

  • Fix log to better check ancestors even if merged revisions are involved. (Vincent Ladeuil, #476293)

  • Loading a plugin from a given path with BZR_PLUGINS_AT doesn’t depend on os.lisdir() order and is now reliable. (Vincent Ladeuil, #552922).

  • Many IO operations that returned EINTR were retried even if it wasn’t safe to do so via careless use of until_no_eintr. Bazaar now only retries operations that are safe to retry, and in some cases has switched to operations that can be retried (e.g. sock.send rather than sock.sendall). (Andrew Bennetts, Martin <>, #496813)

  • Path conflicts now support –take-this and –take-other even when a deletion is involved. (Vincent Ladeuil, #531967)

  • Network transfer amounts and rates are now displayed in SI units according to the Ubuntu Units Policy <>. (Gordon Tyler, #514399)

  • Support kind markers for socket and fifo filesystem objects. This prevents bzr status --short from crashing when those files are present. (John Arbash Meinel, #303275)

  • bzr mkdir DIR will not create DIR unless DIR’s parent is a versioned

    directory. (Parth Malwankar, #138600)

  • SSH child processes will now ignore SIGQUIT on nix systems so breaking into the debugger won’t kill the session. (Martin <>, #162502)

  • Tolerate patches with leading noise in bzr-handle-patch. (Toshio Kuratomi, Martin Pool, #502076)

  • update -r now supports updating to revisions that are not on mainline (i.e. it supports dotted revisions). (Parth Malwankar, #517800)

  • Use first apparent author not committer in GNU Changelog format. (Martin von Gagern, #513322)

API Changes

  • bzrlib.merge_directive._BaseMergeDirective has been renamed to bzrlib.merge_directive.BaseMergeDirective and is now public. (Jelmer Vernooij)
  • BranchFormat.initialize now takes an optional name of the colocated branch to create. (Jelmer Vernooij)
  • BzrDir.get_branch_transport now takes an optional name of the colocated branch to open. (Jelmer Vernooij)
  • Added bzrlib.osutils.set_signal_handler, a convenience function that can set a signal handler and call signal.siginterrupt(signum, False) for it, if the platform and Python version supports it. (Andrew Bennetts, #496813)
  • New bzrlib.initialize is recommended for programs using bzrlib to run when starting up; it sets up several things that previously needed to be done separately. (Martin Pool, #507710)
  • Exporters now support a per_file_timestamps argument to write out the timestamp of the commit in which a file revision was introduced. (Jelmer Vernooij)
  • New method BzrDir.list_branches() that returns a sequence of branches present in a control directory. (Jelmer Vernooij)
  • New method Repository.get_known_graph_ancestry(). (Jelmer Vernooij, #495502)
  • New transport methods readlink, symlink and hardlink. (Neil Santos)
  • Remove unused CommandFailed exception. (Martin Pool)


  • bzrlib.branchbuilder.BranchBuilder.build_snapshot now accepts a message_callback in the same way that commit does. (Robert Collins)
  • raises bzrlib.errors.BoundBranchOutOfDate rather than bzrlib.errors.BzrCommandError when the bound branch is out of date. (Gary van der Merwe)
  • bzrlib.commands.run_bzr is more extensible: callers can supply the functions to load or disable plugins if they wish to use a different plugin mechanism; the –help, –version and no-command name code paths now use the generic pluggable command lookup infrastructure. (Robert Collins)
  • bzrlib.errors.BoundBranchOutOfDate has a new field extra_help which can be set to add extra help to the error. (Gary van der Merwe)
  • New method Branch.automatic_tag_name that can be used to find the tag name for a particular revision automatically. (Jelmer Vernooij)
  • The methods BzrDir.create_branch(), BzrDir.destroy_branch() and BzrDir.open_branch() now take an optional name argument. (Jelmer Vernooij)


  • bzr now has a .testr.conf file in its source tree configured appropriately for running tests with Testrepository ( (Robert Collins)
  • Documentation about testing with subunit has been tweaked. (Robert Collins)
  • Known failures has been added for resolve –take-other on ParentLoop conflicts. This reflects bug #537956 without fixing it. (Vincent Ladeuil)
  • New bzrlib.tests.test_import_tariff can make assertions about what Python modules are loaded, to guard against startup time or library dependency regressions. (Martin Pool)
  • PQM will now run with subunit output. To analyze a PQM error use tribunal, or cat log | subunit-filter | subunit2pyunit. (Robert Collins)
  • Stop sending apport crash files to .cache in the directory from which bzr selftest was run. (Martin Pool, #422350)
  • Tests no longer fail if “close() called during concurrent operation on the same file object” occurs when closing the log file (which can happen if a thread tries to write to the log file at the wrong moment). An warning will be written to stderr when this happens, and another warning will be written if the log file could not be closed after retrying 100 times. (Andrew Bennetts, #531746)

Table Of Contents

Previous topic

bzr 2.2b2

Next topic

bzr 2.1.1

This Page