How to update a tree-less bound branch?

Neil Martinsen-Burrell nmb at wartburg.edu
Tue Apr 6 19:20:50 BST 2010


On 2010-04-06 11:17 , Stefan Monnier wrote:
>    % bzr update
>    bzr: ERROR: No WorkingTree exists for "file://<blablabla>/.bzr/checkout/".
>    % 
> 
> So I end up using "bzr pull" rather than "bzr update".  But last
> I heard, the fact that "bzr pull" does the right thing in a bound
> branch was considered as a lucky accident (more or less), so what is the
> recommended way to do it?

This is a wart arising from the conflation of bound branches and
lightweight checkouts.  ``bzr update`` is for bringing a working tree up
to date with its associated branch.  In a lightweight checkout, this is
the desired behavior.  In a bound branch, this is often a no-op as the
working tree is almost always up to date with the latest revision in the
local branch.  Or, as in your situation, it is an error because there is
no working tree at all.

For bound branches, ``bzr pull`` is the right way to update the local
branch from the branch to which it is bound.  (To set up the bound
branch as the default pull location you can do ``bzr pull --remember
:bound``.)

> Or is the above ERROR really just a bug?

That depends.  If you think that Bazaar should guess that ``bzr up`` in
a treeless bound branch really should mean "do a pull from the branch to
which this branch is bound", then yes it's a bug.

-Neil




More information about the bazaar mailing list