Archive for the ‘12 days of Launchpad’ Category

Day twelve – Loggerhead

Wednesday, January 7th, 2009

Welcome to the last of our Twelve days of Launchpad series. For our final spin, we’ll take a look at an open source project that not only forms an important part of Launchpad but that you can also install locally or on your own server: Loggerhead!

Loggerhead gives you a web interface to Bazaar branches, allowing you to:

  • browse a branch’s directory structure
  • view files
  • see diffs for each revision
  • search files in the branch
  • get the output of bzr annotate — crediting each line of code to its author.

You can use Loggerhead to view any branch in Launchpad by clicking the Source code tab on the branch’s overview page. Let’s see it in action on Drizzle’s trunk.

Drizzle's trunk in Loggerhead

Have a click around and you’ll see that Loggerhead gives you an easy way to navigate a Bazaar branch and explore its history.

Running Loggerhead locally

That’s only part of the Loggerhead story, though, because you can install it on your own machines. You get everything you see on Loggerhead through Launchpad, as well as the ability to browse through all branches on your machine — rather than one branch at a time — plus the option of a beefed-up search.

Right now, Loggerhead is packaged for Debian and also for Ubuntu (in universe for Jaunty and the ~bzr PPA for other Ubuntu versions).

Once you’ve installed the package — see our guide if you’re new to installing from PPAs — open a terminal, visit a directory where you have some Bazaar branches and enter:

$ serve-branches

Then, visit http://localhost:8080. That’s it: you can now browse around and use Loggerhead as a friendly interface to your Bazaar branches.

Get involved

If you have questions about Loggerhead — or you want to contribute — you can find the project on Launchpad and talk to the Loggerhead team using the Bazaar mailing list.

Day eleven – try things out on staging

Sunday, January 4th, 2009

Often, if you’re trying out a new feature — or you want to show someone how to do something — it’s likely you want to use real data but without having a lasting effect.

Launchpad’s staging environment allows you to do just that. Staging’s database is refreshed once each day by making a complete copy of the main Launchpad database. That means you can try things out but you don’t have to worry about spoiling real data or adding lots of useless test data. Within 24 hours, any changes you make on staging are wiped out by a fresh copy of the main Launchpad database. Just make sure you don’t do anything on staging that you want to keep đŸ™‚

One thing to note is that staging runs the very latest code from the Launchpad developers so you may notice bugs from time to time. Of course, if you do spot a bug, please report it.

Day ten – karma

Saturday, January 3rd, 2009

Karma is a shorthand way of showing how active someone is in Launchpad. If you have a Launchpad account then you also have a karma score.

Karma is simple: roughly speaking, the higher someone’s karma score, the more active they are in Launchpad. There are a couple of things to note, though:

  • karma decays: something you did six months ago earns you less karma than something you did today
  • not all actions are equal: some work earns you more karma than other work.

There’s more about karma in our help guide.

Day nine – copying PPA packages

Friday, January 2nd, 2009

You can copy packages from other PPAs into any PPA that you can upload to. You also have the option of copying packages between distro-series (i.e different distribution releases).

For example: take a look at the Ubuntu Mobile team’s PPA copy packages page.

Here you can:

  • select one or more sources to copy
  • select the destination PPA — you must have upload permission for that archive
  • specifiy the destination series
  • choose whether or not to also copy the related binary package.

As soon as you request the copy, the source will be listed in your PPA with details of its origin. However, it can take up to twenty minutes for the files to actually appear in your archive.

If you copy only the source, the corresponding build records are created in the destination PPA immediately.

Day eight – Launchpad Bugs by email

Thursday, January 1st, 2009

Happy new year and welcome to the eighth day of Launchpad! Today we’re looking at one of the ways you can use Launchpad without having to fire up a web browser: Launchpad Bugs’ email interface.

Unless you’re totally new to Launchpad Bugs, you’ve already seen one side of the bug tracker’s email interface each time you get a notification about a bug. Before you can start filing bugs and manipulating existing reports by email, you’ll need to register your GPG key with Launchpad. Every email you send to the bug tracker must be from an address registered in Launchpad account and signed using a key that Launchpad knows about.

Okay, so let’s get going. First off, let’s report a new bug by sending an email like this:


To: new@bugs.launchpad.net
Subject: Foobar does X when it should do Y
Body:

Every time I try to do X in Foobar I find it actually does Y.

affects foobar

It’s pretty obvious what’s going on here: the subject in your new bug report’s summary and the body is the body of your bug report. Ah, but what’s that at end of the body?

affects foobar

Launchpad gives you several commands that you can use in the body of the email. They’ll only work, though, if you put a space at the start of the line and you can only use one command per line. In this case, affects foobar tells Launchpad that the bug you’re reporting is to do with the project foobar. If you’re reporting a bug about a distro package — let’s imagine the foobar project has a package in Ubuntu — you’d use the distro name, followed by a forward slash and then the package name:

affects ubuntu/foobar

So, what about existing bug reports? If you’re dealing with one bug at a time, you can either reply to the bug mail Launchpad sends you or send a new mail to bug-number@bugs.launchpad.net. Let’s say that your bug report was assigned number 1234 and you want to add a comment:


To: 1234@bugs.launchpad.net
Subject: Here's a screen shot file
Body:

I've attached a screen shot, if that helps.

The subject is the comment’s summary and the body is the comment itself. The comment says that you’ve attached a screen shot: yep, simply attach a file to your email and Launchpad will attach it to the comment.

There’s much more you can do with the email interface. In fact, pretty much anything you can to do a bug report using Launchpad’s web interface you can also do by email. Changing a bug’s status? Simple, add the line:

status fixreleased

What about assigning a bug to someone?

assignee matthew.revell

Mark a bug as a duplicate of bug 42:

duplicate 42

Target it to a milestone:

milestone 1.2

There’s more: check out our help guide for full details.

Day seven – personal branches

Wednesday, December 31st, 2008

Ever needed to share a Bazaar branch that’s not part of a wider project? Or perhaps you want to share some code that’s not yet ready to be associated with a project.

Launchpad gives you personal — or +junk — branches that work pretty much like normal hosted branches, except:

  • they’re not associated with a particular project
  • only individuals — not teams — can register them
  • you can’t propose a +junk branch for merging
  • you don’t earn karma from +junk branches.

Here’s how to push a personal branch up to Launchpad:

bzr push lp:~your-launchpad-id/+junk/branch-name

Obviously you put your Launchpad ID and chosen branch name in the suitable places.

Once the branch is up, it appears in your own branch listing just like any other.

More on personal branches.

Day six – code review

Tuesday, December 30th, 2008

Something you’ll hear we Launchpadders talk about quite often is that the combination of Launchpad and Bazaar makes it really easy for newcomers to contribute code to your project. Anyone can create their own branch of your trunk, hack away and then upload their new branch to appear right alongside all the other branches associated with your project.

Launchpad provides a straightforward code review system to help you manage code contributions to your project, whether they’re from core developers or drive-by contributors.

Here’s how it works:

  1. Someone proposes that a branch should be merged into your trunk — or any other branch.
  2. Launchpad notifies subscribers to both branches and it also shows up on those branches’ overview pages.
  3. Anyone can then vote and comment on the proposed merge, either using Launchpad’s web interface or by email.
  4. Once the review is complete, the target branch owner marks the proposal as accepted or rejected.

Take a look at a code review for the Entertainer project and our guide in the help wiki.

Day five – the bug commenters header

Monday, December 29th, 2008

There are a few ways that you might find yourself receiving email updates about a bug that’s tracked in Launchpad. Usually, it’s because you reported the bug, commented on it, subscribed directly to the bug report or you subscribed to all bugs associated with a particular project or distro.

Alongside the information in the body of the email, Launchpad adds headers that give you extra details. Those headers are particularly useful if you want to filter certain emails.

Recently, Gavin added a new header to Launchpad bug mails:

X-Launchpad-Bug-Commenters

It lists each person who has left a comment on the bug, including the original poster, with each name separated by spaces.

Day four – mentoring

Sunday, December 28th, 2008

Want to make it easy for newcomers to learn the ropes of your project?

Launchpad’s mentoring helps you connect experienced project contributors with people looking to get involved.

Visit any bug or blueprint that’s registered for your project and follow the Offer mentoring links towards the bottom of the page. You can then select the Launchpad team through which you want to tell people about your offer of mentoring; usually that’d be the development team for the project.

Once you’ve made your offer, your name — with a link to your Launchpad profile page — will show up in the mentors list. Take a look at bug 120050 as an example. Anyone wanting to learn more can then easily contact you through your profile page.

Day three – marking bugs as fixed from within Bazaar

Saturday, December 27th, 2008

Bug-branch links are a quick and easy way to show that a branch of code contains a fix for a certain bug.

Perhaps the coolest aspect of bug-branch links is that you can mark a bug as Fix Committed right at the moment you make the commit in Bazaar. It’s simple:

$ bzr commit -m "This fixes the problem" --fixes lp:1234

That part after the commit message — “--fixes lp:1234” — tells Bazaar that your commit fixes bug 1234 in Launchpad.

The next time you push the branch to Launchpad, it’ll update the bug report’s status to Fix Committed.