bzr 2.2b3


This third beta in the 2.2 series brings with it all the goodness of 2.1.2 and 2.0.6 (though it preceeds 2.0.6 slightly). Of particular note for users are compatibility fixes with bzr 1.5 and below servers, a hopeful end to the EINTR errors caused by SIGWINCH interactions, a shiny new bash completion script and bzr will no longer guess at identity details - it was too unreliable in reality. Use bzr whoami on every new install. For developers we have some API changes which may impact plugins as well as a bunch of our regular improvements to internal clarity and test support.

Compatibility Breaks

  • An API break has been made to the lock_write method of Branch and Repository objects; they now return branch.BranchWriteLockResult and repository.RepositoryWriteLockResult objects. This makes changing the API in future easier and permits some cleaner calling code. The lock_read method has also changed from having no defined return value to returning LogicalLockResult objects. (Robert Collins)
  • bzr does not try to guess the username as username@hostname and requires it to be explictly set. This can be set using bzr whoami. (Parth Malwankar, #549310)
  • bzrlib.commands.Command will now raise ValueError during construction if there is no __doc__ set. (Note, this will be reverted in 2.2b4) (Robert Collins)
  • The source tree no longer contains a contrib/zsh/_bzr completion script. The new file contrib/zsh/README suggests alternatives. (Martin von Gagern, #560030)

New Features

  • bzr commit accepts -p (for “patch”) as a shorter name for --show-diff. (Parth Malwankar, #571467)
  • bzr ignore now supports a --default-rules option that displays the default ignore rules used by bzr. The flag --old-default-rules is no longer supported by ignore. (Parth Malwankar, #538703)
  • bzr pack now supports a --clean-obsolete-packs option that can save disk space by deleting obsolete pack files created during the pack operation. (Parth Malwankar, #304320)
  • New command line option --authors to bzr log allows users to select which of the apparent authors and committer should be included in the log. Defaults depend on format. (Martin von Gagern, #513322)
  • Support --directory option for a number of additional commands: added, annotate, bind, cat, cat-revision, clean-tree, deleted, export, ignore, ignored, lookup-revision, ls, modified, nick, re-sign, unbind, unknowns. (Martin von Gagern, #527878)
  • The bash_completion plugin from the bzr-bash-completion project has been merged into the tree. It provides a bash-completion command and replaces the outdated contrib/bash/bzr script with a version using the plugin. (Martin von Gagern, #560030)
  • A new transport based on GIO (the gnome i/o library) provides access to samba shares, webdav using gio+smb and gio+dav. It is also possible to use gio for some already existing transport methods as gio+file, gio+sftp, gio+ftp. (Mattias Eriksson)

Bug Fixes

  • Alias information shown by bzr help is now accurate. This was showing an internal object name for some plugin aliases. (Parth Malwankar, #584650)
  • .bazaar, .bazaar/bazaar.conf and .bzr.log inherit user and group ownership from the containing directory. This allow bzr to work better with sudo. (Martin <>, Parth Malwankar, #376388)
  • bzr clean-tree should not delete nested bzrdirs. Required for proper support of bzr-externals and scmproj plugins. (Alexander Belchenko, bug #572098)
  • bzr ignore will no longer add duplicate patterns to .bzrignore. (Gordon Tyler, #572092)
  • bzr log --exclude-common-ancestry -r X..Y displays the revisions that are part of Y ancestry but not part of X ancestry (aka the graph difference). (Vincent Ladeuil, #320119)
  • bzr lp-propose which was switched to use production Launchpad API servers a few commits ago has been reverted to use edge: there is a problem with using production which isn’t trivially obvious, so we’ve filed a bug to track it, and until thats fixed will be using edge. (Robert Collins, #583667)
  • bzr rm should not refuse to delete directories which contained a file which has been moved elsewhere in the tree after the previous commit. (Marius Kruger, Daniel Watkins, #129880)
  • bzr selftest --parallel=fork wait for its children avoiding zombies. (Vincent Ladeuil, #566670)
  • bzr selftest should not use ui.note() since it’s not unicode safe. (Vincent Ladeuil, #563997)
  • CommitBuilder refuses to create revisions whose trees have no root. (Aaron Bentley)
  • Do not register a SIGWINCH signal handler, instead just poll for the terminal width as needed. This avoids the “Interrupted System Call” problems that occur on POSIX with all currently released versions of Python. (Andrew Bennetts, #583941)
  • Don’t mention –no-strict when we just issue the warning about unclean trees. (Vincent Ladeuil, #401599)
  • Fixed AssertionError when accessing smart servers running Bazaar versions before 1.6. (Andrew Bennetts, #528041)
  • Improved progress bar for fetch (2a format only). Bazaar now shows an estimate of the number of records to be fetched vs actually fetched. (Parth Malwankar, #374740, #538868)
  • Reduce peak memory by one copy of compressed text. (John Arbash Meinel, #566940)
  • RemoteBranch.lock_write raises ReadOnlyError if called during a read lock, rather than causing an AttributeError. (Andrew Bennetts, Данило Шеган, #582781)
  • Selftest was failing with testtools 0.9.3, which caused an AssertionError raised from a cleanUp to be reported as a Failure, not an Error, breaking on of our test hygiene tests. (Robert Collins, Vincent Ladeuil).
  • set_user_option with a dict on remote branches no longer fails with an AttributeError. There is a new Branch.set_config_option_dict RPC to support this efficiently. (Andrew Bennetts, #430382)
  • Show the filenames when a file rename fails so that the error will be more comprehensible. (Martin Pool, #491763)
  • Support Pyrex 0.9.9, required changing how we handle exceptions in Pyrex. (John Arbash Meinel, #582656)
  • Unicode characters in aliases are now handled correctly and do not cause UnicodeEncodeError exception. (Parth Malwankar, #529930)
  • Unicode commit messages that are the same as a file name no longer cause UnicodeEncodeError. ui.text.show_warning now handles unicode messages. (Parth Malwankar, #563646)
  • Using bzr with lp: urls behind an http proxy should work. (Robert Collins, #558343)
  • When passing a file to UTF8DirReader make sure to close the current directory file handle after the chdir fails. Otherwise when passing many filenames into a command line bzr status we would leak descriptors. (John Arbash Meinel, #583486)


  • append_revisions_only will now be interpreted as a boolean and a warning emitted if illegal values are used. Note that for projects that needs to maintain compatibility with previsous bzr versions, only ‘True’ and ‘False’ strings must be used (previous versions of bzr will interpret all strings differing from ‘True’ (case-sensitive) as false. (Brian de Alwis, Vincent Ladeuil)
  • bzr ls now supports short options for existing long options. -k/--kind, -i/--ignored, -u/--unknown and -0/--null. (Parth Malwankar, #181124)
  • Config.get_user_option_as_bool will now warn if a value cannot be interpreted as a boolean. (Vincent Ladeuil)
  • The all-in-one Windows installer will now be built with docstrings stripped from the library zip, reducing the size and slightly improving cold startup time. Bundled plugins are unchanged for the moment, but if adding other new plugins to an all-in-one installation, ensure they are compiled and installed with -O1 or help may not work. (Martin [gz])

API Changes

  • Added bzrlib.merge.PerFileMerger, a more convenient way to write some kinds of merge_file_content hook functions. (Andrew Bennetts)
  • BzrDir, Branch, Repository and WorkingTree now all support user_url, user_transport, control_url and control_transport members pointing respectively to the directory containing the .bzr control directory, and to the directory within .bzr used for the particular component. All of them inherit from ControlComponent which provides default implementations. (Martin Pool)
  • Lock methods on Tree, Branch and Repository are now expected to return an object which can be used to unlock them. This reduces duplicate code when using cleanups. The previous ‘tokens’s returned by Branch.lock_write and Repository.lock_write are now attributes on the result of the lock_write. repository.RepositoryWriteLockResult and branch.BranchWriteLockResult document this. (Robert Collins)
  • Repository.refresh_data may now be called in a write group on pack-based repositories. Older repositories will still raise an error in this case. Subclasses of Repository can still override Repository._refresh_data, but are now responsible for raising bzrlib.repository.IsInWriteGroupError if they do not support refresh_data during a write group. (Andrew Bennetts, #574236)


  • chk_map._bytes_to_text_key is now an optimized function to extract the (file-id, revision-id) key from a CHKInventory entry. This can potentially shave 5-10% time off during a large fetch. Related to bug #562666. (John Arbash Meinel)
  • log._get_info_for_log_files now takes an add_cleanup callable. (Robert Collins)
  • _remember_remote_is_before no longer raises AssertionError when suboptimal network behaviour is noticed; instead it just mutters to the log file (and warns the user if they have set the hpss debug flag). This was causing unnecessary aborts for performance bugs that are minor at worst. (Andrew Bennetts, #528041)
  • Permit bzr to run under python -OO which reduces the size of bytecode files loaded from disk. To ensure docstrings needed for help are never stripped, the prefix __doc__ = should now be used. (Martin <>)
  • No longer require zlib headers to build extensions, and remove the need for seperate copy of zlib library on windows. (John Arbash Meinel, Martin <>, #566923)


  • Added bzrlib.tests.matchers as a place to put matchers, along with our first in-tree matcher. See the module docstring for details. (Robert Collins)

  • bzr selftest --parallel=subprocess now works correctly on win32.

    (Gordon Tyler, #551332)

  • Workaround Crypto.Random check leading to spurious test failures on Lucid, FreeBSD and gentoo. (Vincent Ladeuil, #528436)

  • New class ExecutableFeature for checking the availability of executables on the PATH. Migrated from bash_completion plugin. (Martin von Gagern)

Table Of Contents

Previous topic

bzr 2.2b4

Next topic

bzr 2.1.2

This Page