bzr branch

One of the things we’ve been working on for Launchpad is good integration with Bazaar. Launchpad provides a way to register or host Bazaar branches, and nominate a Bazaar branch as representing a particular product series.

For each registered branch, there is a branch information page. This leads to a bit of confusion since Bazaar uses URLs to identify branches, so people try running bzr branch on a branch information page. We also get people trying to branch the product or product series pages.

There were two ways we could address this problem: (1) do more to encourage people not to do this, or (2) make bzr branch do what the user meant it to do. The second option is the more user friendly, so that’s what we chose. This just left the problem of how to implement it efficiently.

The obvious way to get this to work is with a simple HTTP redirect for files under the .bzr/ directory. Unfortunately this would result in Bazaar hitting the Launchpad webapp for every file in the branch which is not desirable (each request results in a number of database accesses, which would add unnecessary load to the system). There is a Bazaar bug about improving this so that it would use the new location after the first redirect. This bug was the main reason for not implementing the feature previously.

While playing around with things a bit, I realised that Bazaar already had the features needed to implement the redirects and they have been there since 0.8.

In Bazaar 0.8, the concept of a lightweight checkout was introduced. This is just a working tree plus a reference to a branch stored elsewhere. You can perform most operations on the branch from the checkout directory that you can do from the real branch directory. So what happens if you publish the “branch reference” part of a lightweight checkout on the web? It turns out that they work fine, so that’s what I used for

So with the change in place, the following commands will all give you a copy of the Bazaar webserve plugin:

bzr branch
bzr branch
bzr branch
bzr branch

Furthermore, they will all record the URL as the parent branch, so future bzr pull commands will go directly to the branch.

OBEX in Nautilus

  • Post author:
  • Post category:Uncategorized

When I got my new laptop, one of the features it had that my previous one didn’t was Bluetooth support. There are a few Bluetooth related utilities for Gnome that let you send and receive SMS messages and a few other things, but a big missing feature is the ability to transfer files to and from the phone easily.

Ideally, I’d be able to browse the phone’s file system using Nautilus. Luckily, the Maemo guys have already done the hard work of writing a gnome-vfs module that speaks the OBEX FTP protocol. I had a go at compiling it on my laptop (running Ubuntu Edgy), and you can see the result below:

Browsing files and viewing images stored on my phone

There are a few rough edges:

  • While I can get a list of discovered devices at the location obex:///, it displays the raw bluetooth addresses rather than device names. Furthermore, the files displayed here are symlinks to the appropriate obex://[$ADDRESS]/ URLs, which aren’t that useful given that gnome-vfs does not support symlinks pointing to other schemes or authorities. This could be fixed by generating .desktop files instead, which would make it possible to provide nice icons too.
  • Can’t rename files. This might be a limitation of the OBEX FTP protocol though: the man page for the command line obexftp client says moves only work with Siemens phones.
  • Doesn’t seem to handle devices disappearing very well — when I tried turning off Bluetooth on my phone and told Nautilus to reload the window, Nautilus hung and stopped redrawing til I turned Bluetooth on again.

I don’t have any ready made binaries for others to try at this point. Below are some notes for anyone else who wants to try building it:

  • You’ll need the osso-gwconnect, osso-gwobex and osso-gnomevfs-extra modules. I grabbed them from Maemo Subversion.
  • When trying to build a debian package for osso-gwconnect, I removed the libosso-dev and mce-dev build dependencies, and made an equivalent change to the configure arguments in debian/rules. The configure script also asks for BlueZ 3.2, while Edgy only has 3.1. The package built fine when I decreased the minimum version requirement.
  • You’ll need to build osso-gwconnect and osso-gwobex before osso-gnomevfs-extra. There are a few build problems with this last module:
    1. The script asks for automake 1.8.x specifically, but works fine with the current 1.9.x releases.
    2. I had to change a dbus_connection_disconnect() call to dbus_connection_close() in obex-module/src/om-dbus.c.
    3. You only need to build the obex-utils and obex-module directories. There are other bits in this module that you probably don’t want, and some bits like the replacement GTK filesystem backend didn’t build for me.

With a little bit of work, this would fit into the main Gnome desktop quite well. When talking to Bastien a while back, he said that the extra dbus daemons shouldn’t really be necessary, so it might be worth trying to bypass them.

Lenovo Battery Recall

So it seems that Lenovo has decided to join in on this battery recall fad. It turns out that the main battery in my X60s is one of the explosive Sony variety (the extended life battery isn’t though). I rang them up to organise the replacement, which will be arriving in 5 weeks.

Even though he hasn’t asked for it yet, I sent the details to Richard Hughes. It looks like the battery model numbers are exposed through HAL, so gnome-power-manager should be able to detect the bad batteries.

If you have an affected Thinkpad, check your batteries.

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.

Politics imitates The Simpsons?

John Howard: You know what really aggravazes me? It’s them immigants. They wants all the benefits of living in Springfield Australia, but they ain’t even bother to learn themselves the language.
Kim Beazley: Hey, those are exactly my sentimonies.
From episode 3F20

I wonder if this is just setting the stage for the next federal election?