External Compatibility Breaks
*****************************
* Two command synonyms for ``bzr branch`` have been deprecated, to avoid
confusion and to allow the names to later be reused. The removed names
are: ``get`` and ``clone``. (Martin Pool, #506265)
New Features
************
* ``bzr commit`` now supports a ``--lossy`` argument that can be used
to discard any data that can not be natively represented when committing
to a foreign VCS. (Jelmer Vernooij, #587721)
Improvements
************
* ``bzr merge`` in large trees is now significantly faster. On a 70k entry
tree, the time went from ~3min down to 30s.
(John Arbash Meinel, #759091)
* Resolve ``lp:FOO`` urls locally rather than doing an XMLRPC request if
the user has done ``bzr launchpad-login``. The bzr+ssh URLs were already
being handed off to the remote server anyway (xmlrpc has been mapping
``lp:bzr`` to ``bzr+ssh://bazaar.launchpad.net/+branch/bzr``, rather
than ``bzr+ssh://bazaar.launchpad.net/~bzr-pqm/bzr/bzr.dev`` for a few
months now.) By doing it ourselves, we can cut out substantial startup
time. From Netherlands to London it was taking 368ms to do the XMLRPC
call as much as 2s from Sydney. You can test the local logic by using
``-Dlaunchpad``. (John Arbash Meinel, #397739)
* When building a new WorkingTree (such as during ``bzr co`` or
``bzr branch``) we now properly store the stat and hash of files that
are old enough. This saves a fair amount of time on the first
``bzr status`` (on a 500MB tree, it saves about 30+s).
(John Arbash Meinel, #740932)
Bug Fixes
*********
* Arguments that can't be decoded to unicode in the current posix locale give
a clearer error message without a traceback. (Martin [gz], #745712)
* ``bzrlib.log._DEFAULT_REQUEST_PARAMS`` is no longer accidentally
mutated by ``bzrlib.log._apply_log_request_defaults``. In practice
these default values aren't relied on very often so this probably
wasn't causing any trouble. (Andrew Bennetts)
* ``bzr log`` now works on revisions which are not in the current branch.
(Matt Giuca, #241998)
* Lazy hooks are now reset between test runs. (Jelmer Vernooij, #745566)
* ``bzrlib.merge.Merge`` now calls ``iter_changes`` without
``include_unversioned=True``. This makes it significantly faster in many
cases, because it only looks at modified files, rather than building
information about all files. This can cause failures in other
TreeTransform code, because it had been expecting to know the names of
things which had not changed (such as parent directories). All cases we
know about so far have been fixed, but there may be fallout for edge
cases that we are missing. (John Arbash Meinel, #759091)
* Standalone bzr.exe installation on Windows: user can put additional python
libraries into ``site-packages`` subdirectory of the installation directory,
this might be required for "installing" extra dependencies for some plugins.
(Alexander Belchenko, #743256)
* ``TreeTransform.create_file/new_file`` can now take an optional ``sha1``
parameter. If supplied, when the transform is applied, it will then call
``self._tree._observed_sha1`` for those files. This lets us update the
hash-cache for content that we create, preventing us from re-reading the
content in the next ``bzr status``. (John Arbash Meinel, #740932)
Documentation
*************
* Added a section about using a shared SSH account on a server for bzr+ssh
access. (Russell Smith)
* The documentation now recommends using SSH rather than SFTP in the
tutorials and the examples, because that will generally be much faster
and better in cases where it can be used. SFTP is still available and
mentioned as an alternative. (Martin Pool, #636712)
API Changes
***********
* Commands now have an `invoked_as` attribute, showing the name under
which they were called before alias expansion.
(Martin Pool)
* ``Hooks.create_hook`` is now deprecated in favour of ``Hooks.add_hook``.
(Jelmer Vernooij)
* If you call `bzrlib.initialize` but forget to enter the resulting object
as a context manager, bzrlib will now be initialized anyhow.
(Previously simple programs calling bzrlib might find the library was
mysteriously silent.)
(Martin Pool)
* Inventory-specific functionality has been split out of ``Tree`` into
a new ``InventoryTree`` class. Tree instances no longer
necessarily provide an ``inventory`` attribute. (Jelmer Vernooij)
* Inventory-specific functionality has been split out of ``RevisionTree``
into a new ``InventoryRevisionTree`` class. RevisionTree instances no
longer necessarily provide an ``inventory`` attribute. (Jelmer Vernooij)
* New method ``Hooks.uninstall_named_hook``. (Jelmer Vernooij, #301472)
* ``revision_graph_can_have_wrong_parents`` is now an attribute
on ``RepositoryFormat`` rather than a method on ``Repository``.
(Jelmer Vernooij)
* ``Testament`` now takes a ``tree`` rather than an
``inventory``. (Jelmer Vernooij, #762608)
* ``TestCase.failUnlessExists`` and ``failIfExists`` are deprecated in
favour of ``assertPathExists`` and ``assertPathDoesNotExist``
respectively.
(Martin Pool)
* The ``revno`` parameter of ``log.LogRevision`` may now be None,
representing a revision which is not in the current branch.
(Matt Giuca, #241998)
* The various knit pack repository format classes have been moved
from ``bzrlib.repofmt.pack_repo`` to
``bzrlib.repofmt.knitpack_repo``. (Jelmer Vernooij)
* ``RevisionTree`` now has a new method ``get_file_revision``.
(Jelmer Vernooij)
* ``WorkingTree`` no longer provides an ``inventory``. Instead,
all inventory-related functionality is now on the subclass
``InventoryWorkingTree`` that all native Bazaar working tree
implementations derive from. (Jelmer Vernooij)
Internals
*********
* Added ``osutils.lstat`` and ``osutils.fstat``. These are just the ``os``
functions on Linux, but they are wrapped on Windows so that fstat
matches lstat results across all python versions.
(John Arbash Meinel)
* ``WorkingTree._observed_sha1`` also updates the 'size' column. It
happened to be updated as a side-effect of commit, but if we start using
the function elsewhere we might as well do it directly.
(John Arbash Meinel)
Testing
*******
* Stop using `failIf`, `failUnless`, `failIfEqual`, etc, that give
`PendingDeprecationWarnings` on Python2.7.
(Martin Pool, #760435)