We've Switched to Bzr!

Max Kanat-Alexander mkanat at bugzilla.org
Tue Feb 2 01:09:23 UTC 2010

	Hey folks! So, we've officially now switched away from CVS and on to
Bazaar (bzr). For people who just want to check out and do diffs, CVS
still works and will be kept in sync with bzr. However, all commits will
be done to bzr.

	Here's a good introduction to bzr for users familiar with CVS:


	You can browse the server here:


	Checking Out

	To do a read-only checkout of the trunk, you can do:

	bzr co bzr://bzr.mozilla.org/bugzilla/trunk

	Or if for some reason you can't access port 4155 on that machine, you
can do:

	bzr co http://bzr.mozilla.org/bugzilla/trunk

	(Note that right now, the bzr:// server actually isn't working--it
should be up by Tuesday or Wednesday.)

	If you're going to want to check in to the repository using your
checkout, you should do:

	bzr co bzr+ssh://user@domain.com@bzr.mozilla.org/bugzilla/trunk

	Where "user at domain.com" is your username in the Mozilla LDAP. (It's the
same as the email address of your CVS account.)


	All of the releases are tagged, similarly to how they were in CVS.
However, the tags are named like "bugzilla-3.3.1" for the 3.3.1 release,
and so on. You can see the whole list of tags in a branch like this:

	bzr tags bzr://bzr.mozilla.org/bugzilla/trunk

	You can check out a tag like:

	bzr co -r tag:bugzilla-3.3.1 bzr://bzr.mozilla.org/bugzilla/trunk


	In order to commit you must have bzr 1.17 or later. 2.0 or later is
ideal, as it will be faster.

	I believe that anybody who could commit to Bugzilla CVS should be able
to commit to Bugzilla Bzr, but if you can't for some reason, let me know
and I will work it out with Mozilla IT.

	In order to commit, you must use "bzr whoami" at least once on your
machine before the first time you commit. Please include both your full
name and your email address in whoami--this is important for how commit
info is displayed in the web view of the repository, and I'd like to
keep that as consistent as possible. A sample whoami command would look

	bzr whoami 'Max Kanat-Alexander <mkanat at bugzilla.org>'

	The email address that you set in "whoami" must match your Mozilla LDAP

	To commit, you should do something like this in your checkout:

	bzr commit --author='Some Other User <somebody at else.com>' --fixes

	You only need to specify the --author argument if you are not the
author of the patch you are checking in. PLEASE specify both the full
name and email address of the author, and PLEASE remember to specify
--author when you're checking in somebody else's patch. Loggerhead (the
web view of the repository) actually shows that user as the author of
the patch, and it's nice to keep it consistent.

	--fixes allows bzr to store information about which bug is being fixed.
In order to use it, you have to edit $HOME/.bazaar/bazaar.conf and add
this line at the end of the file:

	bugzilla_mozilla_url = https://bugzilla.mozilla.org

	It's very important to specify --fixes, because that's what allows
loggerhead (the web view of the repository) to show a link to a bug.
Hopefully eventually this data will be used in more places in loggerhead
and in other tools that bzr uses.

	Since we have --author, and because the author is prominently displayed
both by "bzr log" and by Loggerhead, it's not necessary to include
"Patch By" in the checkin comment anymore. I've been writing checkin
comments like this, now:

Bug 543459: Speed up the new duplicates.cgi
r=LpSolit, a=LpSolit

	Commits CANNOT be changed after they are committed to the repository,
in bzr, so please make sure that you are correctly specifying --author,
--fixes, and the checkin comment.

	After you commit, you should basically do the same thing we did with
CVS, which is to paste the "bzr commit" output into a comment. You don't
need to specify what branch you're committing against, though, because
the bzr output actually contains that information. You can see an
example comment here:


	If you have any questions about committing, feel free to ask me before
you commit--it's important to get it right, because we can't change
what's in the repository once it's there.

	CVS and Bzr

	One of the nice things about the new server is that there's no lag
between the "read-only" bzr, and the "committable" bzr. The instant you
commit, your commits can be checked-out using bzr://, and they will
immediately appear in loggerhead.

	CVS, though, will be about 15 to 20 minutes behind bzr.

	For now, all our build and release tools will continue to use CVS,
though they will probably be slowly migrated over to using bzr.

	The Old bzr.bugzilla.org

	I have fully disabled the old bzr.bugzilla.org. If you were using
checkouts from the old bzr.bugzilla.org, in order to merge or update
from bzr.mozilla.org, you will have to upgrade your local bzr checkout
to a "rich root". If you're using a modern version of bzr, the best
thing to do is to change to the directory of your bzr checkout and do:

	bzr upgrade --2a

	However, that only works as of bzr 1.16. If you're using an earlier
version, you should probably just do:

	bzr upgrade --1.9-rich-root

	Which works as of bzr 1.9. If by some chance you're using a version
older than 1.9, you'll have to do:

	bzr upgrade --rich-root

	I imagine this will most affect people who were doing QA. The QA
repository has moved to:


	How We Did It

	Anybody who's interested in how we did the migration and how the
bzr-to-cvs script is working should check out the bug that tracked the
whole experience of setting up the bzr server, and contains all all the
scripts you'd need to duplicate our setup:


	The bzr-to-cvs script is in our bzr repository. Note that nobody else
in the Bugzilla Project should be running this for Bugzilla. I have it
set up and running, and it is syncing data for us. I am providing the
link purely for people who are interested in creating a similar setup
for their project:



	Most (or all) of this information will be on the Wiki at some point,
but I wanted to get it out there in this email for now.

Competent, Friendly Bugzilla and Perl Services. Everything Else, too.

More information about the developers mailing list