understanding some of the basics
Neil Martinsen-Burrell
nmb at wartburg.edu
Sun Oct 17 00:46:23 BST 2010
On 2010-10-15 20:38 , John Gabriele wrote:
> On Fri, Oct 15, 2010 at 8:37 PM, Neil Martinsen-Burrell
> <nmb at wartburg.edu> wrote:
>> On 2010-10-15 15:25 , John Gabriele wrote:
>>
>>> * Is it typical to have more than one branch in a given working tree
>>> -- such that one can switch at-will between branches, or merge one
>>> branch into another -- all within the same working tree (and
>>> repository)?
>>
>> This is not currently the typical way to use Bazaar. The common setup is to
>> have one branch per directory tree.
>
> Ah, ok. Can you tell me how this typical usage works out in practice?
> That is, I've got my top-level project directory `~/the-proj` == my
> working tree containing its repository (in `~/the-proj/.bzr`). I've
> initialized the repo, added files, made changes, committed them,
> everything works ... I tag my current revision "works-ok". Now I want
> to try and add my experimental feature. How exactly do I branch it (I
> suppose I want a new branch tagged "adding-crazy-feature")? What are
> the specific shell commands needed to accomplish this?
~/the-proj is a top-level directory that usually contains branches
within it, one of which is often named "trunk":
$ bzr init-repo ~/the-proj
$ cd ~/the-proj
$ bzr init trunk
$ cd trunk
# hack, hack, hack: edit, bzr commit, repeat
$ bzr tag "works-ok" # marks the current revision of trunk
$ bzr branch . ../crazy-feature
$ cd ../crazy-feature
# hack, hack, hack: edit, bzr commit, repeat
$ cd ../trunk
$ bzr merge ../crazy-feature
# test the result of the merge
$ bzr commit -m "merged crazy feature"
My suggestion is that you try this in a temporary directory and files
with pretend content to see how it works.
-Neil
More information about the bazaar
mailing list