Archive for the ‘Code’ Category

Faster branch pushing

Thursday, October 16th, 2008

You can now push your branches to Launchpad much more quickly. That’s because Launchpad now supports stacked branches: Bazaar branches that have only a little bit of their history.

By pushing up a stacked branch to Launchpad, you push up only that little bit, rather than the full history of your project. For the code that we Launchpad developers work on - i.e. Launchpad itself - it now takes less than two minutes to push up a branch. It used to take an hour and a half.

Upgrade to Bazaar 1.7 or better

To start using stacked branches, you need to upgrade everything to Bazaar format 1.6. Upgrade your trunk, all of your branches, your local shared repositories — everything. To do this you’ll need Bazaar 1.7 or better. You can get this from the Bazaar website or from the Bazaar PPA.

Set your development focus

You’ll also need to set a development focus for your project. The development focus is the mainline branch, often called “trunk” or “devel”. You want to set it to a branch that people want to branch from a lot. If your project doesn’t have a development focus yet, there’ll be a prominent link to set it on the Code tab for that project.

Push your branch just like before and whooosh!

OK. You’ve got a dev focus and all your branches are in the new Bazaar format. All you need to do now to make a stacked branch is:

bzr push lp:~foo/bar/baz

That is, you just push the way you always do and then watch the speed.

What happens is that Launchpad hints to Bazaar that new branches should be stacked on the development focus. Bazaar follows that hint and stacks the new branch appropriately. It then only sends up the revisions that are in the new branch but not in trunk.

This is why you want to set your development focus to a branch that’s going to be branched from and merged to a lot: the time it takes to push up a new branch is proportional to how different that branch is from your development focus.

A lot of work has gone into this feature (particular thanks to Michael Hudson and basically all of the Bazaar core devs), I hope you enjoy it!

Karma for code reviews

Wednesday, September 17th, 2008

The guys in the Launchpad-Bazaar integration team added code review to Launchpad earlier this year.

Now, when you take part in a code review it’ll count towards your Launchpad karma!

If you’re new to code review, take a look at my previous post.

Karma for commits!

Wednesday, August 20th, 2008

While in some parts they take their pay in Warcraft gold, round here we’re karma fiends!

To feed the habit, Tim in Launchpad’s Code Hosting team has provided another way of earning karma: making commits to any Bazaar branch that’s registered to a project in Launchpad.

We’re backdating the karma for commits but, as with all karma the older the action is the less it’ll count towards your karma score; really old actions don’t count at all. Also, +junk branches don’t count towards karma at all.