Bazaar (BZR)

[—ATOC—]
[—TAG:h2—]

Who are you?

Tell Bazaar who you are, so that it can blame buggy commits on you!

[source]bzr whoami "Brian Sideobthan<brian@valvers.com>"[/source]

Checking out code

[source]bzr co lp:valversgcode[/source]
[source]bzr co lp:valversgcode ./vg-co[/source]

Don’t forget Bazaar uses path separator’s indescriminently so it’s easier to always use the linux forward-slash path sep.

Branching Code

[source]bzr branch lp:valversgcode[/source]
[source]bzr branch lp:valversgcode ./vg-co[/source]

Merging Code

From in the target branch:

[source]bzr merge ../new-feature[/source]

Committing Code

Using a text editor to add a commit comment (all commits must have a

[source]bzr commit[/source]

Or specify a quick comment on the command line instead:

[source]bzr commit -m "Added a few features"[/source]

If you fixed a launchpad bug, you can include that in the commit comment and it’ll get picked up, but the bug tracker software needs you to specifiy it on the command line:

[source]bzr commit -m "Fixed bug 123456" –fixes lp:123456[/source]

Checkout a particular revision

Checkout a particular revision by either specifying the revision number:

[source]bzr branch -r nnn lp:valversgcode[/source]

Ignoring Files

Not all files need to be versioned, and we know about them. Sometimes they’re configuration files, or files that end up in the build directory on each machine that checks the code out and builds it.

To ignore all the files that are currently unknown to Bazaar simply use the following command in the root of the project:

[source]bzr unknowns > .bzrignore[/source]

.bzrignore should be version controlled, so simply

[source]bzr add .bzrignore[/source]

Get Current Branch Revision

[source]bzr revno[/source]

Don’t forget to see some more information on using Bazaar effectively…

Leave a Reply