Impossible Triangle Sculpture

Saw this interesting sculpture while cycling through East Perth:

Of course, it can only be appreciated when standing in a particular location (Here is what it looks like from another angle). I wonder how many people pass it and don’t realise what it is or how you are meant to look at it?

Update: the sculpture can be seen on Google Maps in the centre of the round about. You can clearly see the arms of the triangle going off in different directions.

Microsummaries in Firefox 2

One of the new features in Firefox 2 is Microsummaries, which essentially allows dynamic bookmark titles. This is useful when bookmarking volatile pages, since the title can reflect the current state of the document rather than the state when the bookmark was created.

The system works by registering XSLT transformations that generate a simple text string from the page content. The registrations are either done via a <link> element, or matched via regular expressions. The system is designed to target users (who can register their own microsummary generators), website owners (who can suggest a generator through a <link> tag) and 3rd parties (who can provide generators for other sites to users).

For Launchpad, I’d fall into the second category. It would be nice to provide microsummary generators for bug pages, so you’d get an indication of the status of the bug, plus an up to date bug title. Now while all this information is available in the page content, we can provide it in a much more efficient manner (if we know the user is only interested in generating a microsummary, why send them the 100 comments on the bug every time the bookmark title is to be updated?).

Being able to specify a transformation for the bookmarked URL that would be used instead for generating the summary would be one way of solving this. This would reduce the bandwidth requirements and processing time on our end. Another way would be for Firefox to include something in its request that would allow a site to know that the page was being retrieved for microsummary generation so it could ommit information.

Overall it looks like a useful feature, but I do wonder if it will suffer from the “RSS effect” and cause lots of needless traffic to web sites until people work out how to achieve the same effects in a less resource intensive fashion.

–create-prefix not needed with bazaar.launchpad.net

When outlining the use of team branches on Launchpad previously, I used the --create-prefix option when pushing the branch to sftp://bazaar.launchpad.net. This was to make sure the initial push would succeed, even if the /~username/product directory the branch would be created in didn’t exist.

To simplify things for users, we made a change to the SFTP server in the latest release, so that --create-prefix is no longer necessary. This does not affect the allowed branch directories though: the structure is used to associate the branches with products, and decide who can write to the branches.

Another change included in the rollout is the ability to rename branches and reassign them to different owners through the web interface. So for instance, you can give ownership of a personal branch to a team your project grows to multiple developers. This should be used sparingly, since it will change the published branch URLs which can confuse people using your branch.

Ubuntu Bugzilla Migration Comment Cleanup

Earlier in the year, we migrated the bugs from bugzilla.ubuntu.com over to Launchpad. This process involved changes to the bug numbers, since the Launchpad is used for more than just Ubuntu and already had a number of bugs reported in the system.

People often refer to other bugs in comments, which both Bugzilla and Launchpad conveniently turn into links. The changed bug numbers meant that the bug references in the comments ended up pointing to the wrong bugs. The bug import was done one bug at a time, so if bug A referred to bug B but bug B hadn’t been imported by the time we were importing bug A, then we wouldn’t know what bug number it should be referring to.

The solution we used was to just insert a link to the bug watch URL (e.g. https://launchpad.net/malone/bugtrackers/ubuntu-bugzilla/$BUGID), which allowed people to find the referenced bug, but was a bit ugly.

Today we ran a fixup script to remove these bug watch URLs from comments and rewrite the old Bugzilla bug numbers to the current Launchpad bug numbers. This cleans up the old imported bugs a bit so they fit in better with the bugs entered directly into Launchpad.

Gnome-gpg 0.5.0 Released

Over the weekend, I released gnome-gpg 0.5.0. The main features in this release is support for running without gnome-keyring-daemon (of course, you can’t save the passphrase in this mode), and to use the same keyring item name for the passphrase as Seahorse. The release can be downloaded here:

http://download.gnome.org/sources/gnome-gpg/0.5/

I also switched over from Arch to Bazaar. The conversion was fairly painless using bzr baz-import-branch, and means that I have both my revisions and Colins revisions in a single tree. The branch can be pulled from:

bzr branch http://www.gnome.org/~jamesh/bzr/gnome-gpg/devel gnome-gpg

All of the converted revisions authored by me have been signed with my PGP key. As signatures can’t get moved over in the conversion process, none of Colin’s revisions are signed. Note that the signatures in Bazaar are for particular tree states rather than changes between two tree states, so it doesn’t affect the trust of the current revisions.

While I was at it, I also converted the other branches I had in my www.gnome.org Arch archive over to bzr. The only other branch that people might find useful is the http-resource code, which I’ve updated to compile with the latest libsoup.

Kenny

Went to see Kenny at the cinema yesterday. A very funny movie and worth watching if you get a chance. Given that it is a small budget Australian film though, it will probably be hard to find overseas (similar to The Castle).

I also got round to watching my Double the Fist volume 2 DVD which arrived while I was in Europe. The “Nobodies to Nobodies” documentary included as an extra gives a behind the scenes view of how the team was treated during and after making the series. It is good to see that they have finally got a chance to make series 2.

Shared Branches using Bazaar and Launchpad

Earlier, David Allouche
described how to
host Bazaar branches on Launchpad
. At the end, he alluded to the
ability to create branches that can be committed to by anyone on a
team. I’ll describe how this works here.

Launchpad Teams

Launchpad allows people to organise themseleves into teams. Most
of the things people can do in Launchpad can also be done by teams,
including owning branches.

You can create a new team at the following page:

https://launchpad.net/people/+newteam

There are three different membership policies you can choose
from:

  • Open: anyone can join. Choosing this sort of team
    effectively gives everyone write access to branches owned by the
    team.
  • Moderated: new memberships must be approved by one of the
    administrators (this is the default policy). This makes it easy for
    people to request commit access to the branch while still requiring
    approval from a team administrator..
  • Restricted: new members can only be added by the team
    administrators. This is appropriate if new members shouldn’t be able
    to propose themselves normally.

Once the team has been created, members of the team can create the
branches.

Uploading a Team Owned Branch

Now that you are a member of a team, you can upload branches to
that team’s directory on bazaar.launchpad.net. This is done
in the same way as uploading personal branches described in David’s
article
:

cd branchdir
bzr push --create-prefix sftp://bazaar.launchpad.net/~teamname/product/branchname

When the command completes, the team owned branch will have been
created. Now you can treat this branch like a personal branch, but
once someone else pushes a commit to the branch, “bzr push
will tell you that the branch has diverged, and not let you push your
changes until you merge them to your branch.

An alternative model is to use checkouts, which provide a workflow
closer to CVS and Subversion without losing Bazaar’s ability to work
while disconnected.

Bazaar Checkouts

A Bazaar checkout is a local working copy bound to a remote branch
such that changes are committed to the remote location. The remote
branch data is also cached locally to speed up local operations and
allow you to work while disconnected from the network. A checkout of
the previously created team branch can be created with the following
command:

bzr checkout sftp://bazaar.launchpad.net/~teamname/product/branchname team-branch
cd team-branch

Alternatively if you still have the local branch used to create
the team branch, it can be converted to a checkout with the “bzr
bind
” command:

cd branchdir
bzr bind sftp://bazaar.launchpad.net/~teamname/product/branchname

You can then make commits to the checkout as you would with any
other branch, provided the checkout is up to date with the remote
branch. If another team member has committed to the branch in the
mean time though, you will be prompted to update your checkout to the
head of the latest version of the remote branch.

If this happens, the checkout can be updated by issuing the
bzr update” command. You can then retry the commit, after
fixing any conflicts that are reported.

Disconnected Operation with Checkouts

If you are disconnected from the network, it will be impossible to
publish your changes to the remote branch so running the “bzr
commit
” command on the checkout will fail.

To handle this situation, Bazaar lets you make local commits in
your checkout. This is performed with the “bzr commit
--local
” command. You can treat these commits just like regular
commits and get diffs between them, etc.

When you are connected to the network again, run “bzr
update
“. This will pull in any changes made to the remote branch
and turn your local commits into a pending merge. After fixing any
conflicts (if there are any), running “bzr commit” will
publish the changes to the remote branch for the world to see.

Feature Branches

If you are developing a feature that is not yet appropriate to
check into the mainline team branch, the checkout workflow may not be
convenient. In this case, it may make sense to create a personal
branch to do the work and then merge the changes later on.

You can create a new branch using the “bzr branch
command. Since the checkout made previously contains full history
data we can branch from it directly, which saves saves downloading the
branch again:

bzr branch checkoutdir mybranch

If you want to make this branch available to others, it can be
published to bazaar.launchpad.net as described in David’s
original article.

Merging your branch into the checkout is the same as merging into
any other Bazaar branch:

bzr update
bzr merge mybranch
# resolve any conflicts that may be reported
bzr commit

Once the commit completes, the changes will be available on the
team branch.

Conclusion

Without much trouble, you can create a shared mainline branch with Bazaar and Launchpad and use it in a way familiar to Subversion users. With one extra command you can extend the familiar model to allow commits while disconnected, providing the power of distributed revision control when you need it.

Back from London

I got back from London on Sunday from the Launchpad infrastructure sprint. Because of the terrorism scare, Heathrow was chaos (more so than usual). The bus service from the tube station to Terminal 4 ended up in a traffic jam. There were a lot of people milling around outside the terminal who were not being allowed in because they’d arrived too early (it was around 9am, and some of them had afternoon flights).

It took a while to find the end of the checkin queue because another queue (passport control) had extended in front of it. I got to the end of this other queue and was told that I needed to go to the other end of the terminal section to queue up. After an hour or so, I got to the head of the queue and was able to check in my luggage, saying good bye to my laptop, phone and other stuff I’d normally be carrying on board. I’d padded my bag with a few pillows and got the checkin lady to put “fragile” stickers over the bag, which was about as good as I could hope for.

Passengers queuing for checkin

Passengers queuing for checkin
My hand luggage

My clear plastic bag of hand luggage

Now it was time to queue for passport control. This queue had now extended out the door of the terminal and round the corner. The queue moved fairly slowly and it became apparent why once I got through: the security screening line started on the other side of the door and there wasn’t much room for new people to queue.

By the time I got to the security screening, it was almost midday. The screening involved X-raying of my clear plastic bag of hand luggage, belt and shoes. After walking through the metal detector, I got a pat down. At this point, they were confiscating dangerous contraband that people were trying to smuggle onto the plane such as glasses cases.

This left only about five minutes before the flight’s boarding was scheduled to close. Before boarding, they were checking people’s hand luggage to make sure passengers had receipts for any magazines or books from the airport bookshop, confiscating the items if the receipt couldn’t be found.

The actual flight ended up leaving about one and a half hours late after waiting for everyone to arrive (they ended up unpacking about 5 people’s luggage). I was resigned to the fact that I’d have to wait around Singapore airport for the next flight, since there was only one hour between landing and my connecting flight. Thankfully, Qantas delayed the flight to Perth though, so it was straight from one gate to another.

Things were pretty uneventful on getting back to Australia. There were no nasty surprises on opening my luggage — I assume the baggage handlers had been instructed to take special care of everyone’s luggage due to the UK restrictions.

Royal Victoria Dock, a few days before my flight. The towers at Canary Warf is visible on the horizon.

Baggage Handlers

One of the other guys here joked that the baggage handlers at the airports are more likely to be careful with your luggage now.

Since there is a higher threat level, the chance of a bag exploding if a handler mistreats it should be higher. Therefore it is in their best interests to be careful.