Changing the UI of checkout

Ian Clatworthy ian.clatworthy at canonical.com
Fri Apr 17 16:59:44 BST 2009


Ian Clatworthy wrote:
> John Arbash Meinel wrote:
> 
>> I would agree that a "better" lightweight checkout is a "stacked"
>> checkout, where we've put a little bit of history in the repo.

> Nice. I strongly agree that diff performance needs to not suck and
> that stacking by default is the RTDT for a checkout of a remote
> branch.

> So the minimum UI change approach would suggest:
> 
> 1. we stack by default (instead of caching full history)
> 2. we add --heavyweight (which caches full history)
> 3. we leave --lightweight there (for the local case)

Let me change my mind about this.

On reflection, I think checkouts ought to be lightweight. Period.

I recall debating with Aaron ages ago about lightweight vs
heavyweight semantics. IMO, the bottom line is that they smell
the same but they're really quite different beasts. In particular:

* lightweight checkout = tree & a *reference* to a branch
* heavyweight checkout = tree+branch & a *bind* to a second branch.

If you think a lightweight checkout is a heavyweight checkout
with zero history cached (like I initially expected), you're
missing the key semantic difference explained above. And that's
simply too much magic/complexity for 95% of new users IMO.

And we simply don't *need* heavyweight checkouts when we have
bound branches as well. They're redundant to all intents and
purposes.

BTW, if you like git's one-tree-across-multiple-branches model, that's
only going to work if you use a lightweight checkout. Consider:

  work (lw checkout) switched to
  trunk (branch) bound to
  upstream (branch).

Running 'bzr bind' in work needs to change what trunk is bound to,
not the link between work and trunk. If you accidently made work
a stacked checkout (as I was suggesting ought to be the default),
you're confused when the wrong link is changed.

So, my vote if for:

* checkouts being lightweight and lightweight only
* if you want to use the lockstep development workflow with local history
  and/or make local commits, use a bound branch
* removing --local from commit

We might need to tweak something to make diff against the basis tree
fast, but the answer to that is a better lightweight checkout
implementation (when time permits), not a stacked checkout.

Ian C.



More information about the bazaar mailing list