creating checkouts, bound branches and standalone branches from an existing branch

Denys Duchier duchier at ps.uni-sb.de
Sat Feb 11 22:42:41 GMT 2006


Robert Collins <robertc at robertcollins.net> writes:

> I can get some code in front of me to hack and commit on in three way:
>  * Create a checkout
>  * Create a bound branch
>  * create a standalone branch
>
> The first one [...] clearly has to be 'bzr checkout URL [PATH]'.
>
> The third one [...] 'bzr branch URL PATH'
>
> But what about the bound branch case? Should that be 'get' ? or 'bzr
> branch --bind' ?

How about inverting the question and trying it from joe random's perspective, a
user who has no particular interest in VCS nor in the underlying concepts that
are important to us (as designers and implementers).

It seems to me that, from a user's perspective, the most important thing is to
obtain a copy of some project so that they can use it and modify it.

[in the following, I am deliberately using the command "get" rather than
"branch" or "checkout" to avoid confusion with existing/proposed concepts and/or
commands.]

I would propose that:

	bzr get URL PATH

produce a working tree (checkout) that is lightly bound to the branch at URL.
This is exactly the centralized model.  It is unsurprising.

For more advanced users, a secondary issue is how their copy is related to the
original.  For example, we could have:

	bzr get --mirror URL PATH
        bzr get --copy   URL PATH

where --mirror would produce a bound branch, while --copy would produce a
standalone branch.  I just made up these options and probably better ones could
be proposed.

The point is that the primary effect of "bzr get" is to obtain a working tree of
the project at URL.  The option determines in particular what happens when the
user commits.  This could also be done as follows:

	bzr get --commit=remote       URL PATH
        bzr get --commit=local,remote URL PATH
        bzr get --commit=local        URL PATH

Cheers,

--Denys






More information about the bazaar mailing list