bzr pull vs. bzr update

Karl Fogel karl.fogel at canonical.com
Wed Dec 16 20:35:50 GMT 2009


John Arbash Meinel <john at arbash-meinel.com> writes:
> If you are working in a checkout, 'update' is the recommended command.
> For your specific use cases "bzr update" is equivalent to "bzr pull
> $MASTER". The divergence between them is mostly around what happens if
> you have local commits, etc.
>
> There are other reasons as well. For example "cd checkout; bzr pull
> $NOT_MASTER". Will turn your master branch into $NOT_MASTER, as well as
> your local checkout. Which has valid use cases, but infrequent. At least
> IMO, using 'bzr update' is a different mental request than 'bzr pull'.

Well, we are working in a checkout here (because 'bzr bind' would have
been done earlier).  But we are just recommending 'bzr pull' with no
arguments, not 'bzr pull <MASTER>'.

I didn't have any compelling reason to specify 'pull' instead of
'update'; it's just that 'pull' is what I'm in the habit of using
myself.

'bzr help update' indicates that it will not error if there are local
changes -- instead, it may generate conflicts.  On the other hand, the
help for 'bzr pull' is silent on that subject, but my memory is that it
will error if there are local mods.  Although in an experiment just now,
where I did a pull when there were no changes to pull down, it did *not*
error in the presence of local changes.

So I don't know.  If my belief about pull's behavior is wrong anyway,
then maybe that page should just recommend update?

-K



More information about the bazaar mailing list