bzr pull vs. bzr update
Matthew D. Fuller
fullermd at over-yonder.net
Sat Dec 19 05:44:14 GMT 2009
On Thu, Dec 17, 2009 at 06:03:11PM +0100 I heard the voice of
Juanma Barranquero, and lo! it spake thus:
> "bzr help checkouts" makes that expectation pretty clear. It just
> fails to explain that pull also makes sense sometimes (a heavyweight
> checkout is a branch, after all), and how they differ.
It's entirely sensible to pull from a checkout, _if what pull does is
what you intend to do_. In fact, you probably almost ALWAYS pull from
a checkout (though often an implicitly-made checkout colocated with a
branch, rather than an explicitly-made one elsewhere).
However, pull does _NOT_ by intent update a checkout, heavy or
otherwise, to match its farside branch. pull updates the _farside
branch_ to match whatever parent location you're handing it. If that
parent location is itself (which is what we're talking about here;
parent==bound), that operation is meaningless, since it's
tautologically always already up to date with itself. It's purely as
a _SIDE EFFECT_ of that that the local hidden sorta-branch inside a
heavy checkout also gets changed to match that farside.
If you want to update a checkout to catch up changes in the branch,
you want 'update'. That 'pull', with an appropriate parent location,
in a heavy checkout, also seems to do the same thing is sheer
coincidence and a terribly ugly break of the model.
So, yes, if you want to update the _BRANCH_, you absolutely want to
use 'pull' in a checkout [of that branch]. If you want to update the
_CHECKOUT_, you want to use 'update', and do your best to forget that
if certain stars are aligned right, 'pull' seems to do the same thing.
Matthew Fuller (MF4839) | fullermd at over-yonder.net
Systems/Network Administrator | http://www.over-yonder.net/~fullermd/
On the Internet, nobody can hear you scream.
More information about the bazaar