'bzr switch' and a lightweight checkout of a bound branch

Matthew D. Fuller fullermd at over-yonder.net
Wed Dec 5 00:09:59 GMT 2007


On Mon, Dec 03, 2007 at 06:00:30PM +1000 I heard the voice of
Ian Clatworthy, and lo! it spake thus:
> 
> Can you elaborate on this please?

Well, they're very similar concepts, but there are subtle differences.
When you use a 'bound branch', what you mean is 'keep this branch in
sync with that other one'.  But when you use a checkout, heavy or
light, what you mean is 'give me a working tree to work on this
branch'; in the heavy case, you mean 'and cache everything locally too
so I don't have to hit the network except to commit/update'.

Thus, behaviors that are just what you want with a bound branch aren't
what you want with a checkout.  To pick a few off the top of my head:

- Saved locations (parent, push, etc) are different from the bound-to
  branch.

- Nick is different.

- Various commands like check/reconcile/upgrade/etc act only on the
  local branch, not the remote (of course, since heavy checkout
  usually means across the network, and lacking smart server verbs for
  them, it's probably better that way right now).

- There are formats to get out of sync like you can't with light co's.
  e.g., if I have a checkout of a branch that's in dirstate-tags, and
  the upstream branch moved to pack-0.92, I can't even TELL unless I
  explicitly go and info it.  I'm generally opposed to nagging from
  commands, but it might be nice if info gave a hint, at least with -v
  when it'll contact upstream anyway.


Basically, a checkout should be a checkout; where a [heavy] checkout
acts different from a [light] checkout (except in cases where you
intentionally invoke the different capabilities, like with ci --local
or unbind), it's probably a bug, if you think of it as a checkout.
But if you come from the 'bound branch' perspective, they're the
'correct' behaviors.

So, having the two entities being conflated certainly gains us a lot
because in a technical sense, they're overwhelmingly similar.  But in
an intentional sense, there are differences, and it would be hard to
satisfy both sides.


One thing that's probably just a plain ol' bug is how 'update' won't
bring in new tags, unless there are revisions to get too.  Probably
should file that...



-- 
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 mailing list