Renault Modus Side Light Replacement

Now the Renault Modus isn’t a bad little car really, but it has at least one appalling design flaw: changing any of the front bulbs generally involves removing the whole front of the car!

Anyway, I recently had to change one of the sidelights, and read online that it’s possible to do this by removing  part of the front grille. I couldn’t find any pictures, so I decided to take some photos as I did the job in the hope it might help someone else in the same position!

To start with, here’s a picture of the side light from the front. The bulb (circled below) is a 501 (W5W) which is 12V and 5W.

Modus Sidelight Photo

When you lift the bonnet, there’s a rubber seal along the front edge. This is clipped into place at both ends with a plastic clip, and can be gently popped out as shown below, to reveal a plastic tab (centre of photo below):

Modus Sidelight Step 1

If you lift (and jiggle) this tab, you can pull out a long plastic shaft as shown below. Once removed, this releases the front grille.

Modus Sidelight Step 2

Having completely removed this, the grille can be popped out of the front panel as shown below with the plastic locking shaft. This needs care, to avoid breaking the tabs. Before removal I also popped out the four round plastic clips to free the top edge of the front panel so that I could see the rear of the grill, and this gives a bit more flexibility, but probably isn’t essential. To remove the grille, I pulled the lower edge of the grill forward and up (pivoting around the upper clips).

Modus Sidelight Step 3a

After you have removed the panel (hopefully without breaking any of the retaining tabs…) you will be left with a hole like this:

Modus Sidelight Step 3b

If you look inside here, you can see a rotary cover for the side light. Unscrew this and it will reveal a black plastic cylinder. This simply pulls out and you will find the bulb pushed in the end.

Modus Sidelight Step 4

Pull the bulb out of the holder and replace. Remember to refit the cover and test all the bulbs before reassembly.

This is quite a quick job and is much, much simpler than replacing the headlights, but that’s a story for another day!

Es(pi)resso: Raspberry Pi Espresso Machine

I’ve finally got around to writing up some details of my Raspberry Pi controlled Espresso machine, and put the source code on Google Code here: http://code.google.com/p/espiresso/

EDIT: since the demise of Google Code, development has since moved here: https://github.com/jam3sward/espiresso

It’s still a work in progress, but it makes my coffee every single morning 🙂 This is the very definition of a safety critical system – imagine if it failed to work one morning (it doesn’t bear thinking about…)

Relocating an SVN Repo to Google Code

I wanted to move an existing Subversion repository to Google Code, preserving all the history. This is possible, but (as with most things) turned out to be  more complicated than expected.

To start with, you need to dump the existing repository. If you can’t log into the server directly, it’s possible to do this for a remote server using the svnrdump command:

svnrdump dump https://svnserver.com/trunk > remote.dump

This will probably contain the full history of several projects, so the next step is to filter out the specific project you need. Unfortunately, svndumpfilter won’t read the dump output from svnrdump (it doesn’t seem to like the file version).

One workaround is to temporarily create a local repository, load the dump file to that repository, and then dump it back out again. The new dump file is then accepted by svndumpfilter. Not very convenient, but it works:

svnadmin create temp
svnadmin load temp < remote.dump
svnadmin dump temp > local.dump

Then (theoretically) you can filter out the specific project path from the dump file using svndumpfilter. Again, this caused me some problems because it leaves lots of empty commits (i.e. log messages related to other projects, with no file changes).

svndumpfilter --drop-empty-revs --renumber-revs include /your/path/ < input.dump > output.dump

There is apparently a newer version of svndumpfilter which accepts a new option –drop-all-empty-revs. However, updating SVN didn’t get me this version, and I couldn’t be bothered to build it from source.

The solution was to use the much more capable svndumpsanitizer. Unlike svndumpfilter, this actually seems to work, and is a single C file with no exotic dependencies, so very simple to build.

svndumpsanitizer --infile input.dump --drop-empty --outfile output.dump --include /your/path

I did find one bug with svndumpsanitizer: it doesn’t work if your dump file contains a partial set of revisions. For example: I had a dump file which started from revision 88, and this caused it to index out of bounds of an array and output nonsensical revision numbers like 1638472. I only discovered this by adding an assertion in svndumpsanitizer to check array bounds. After that, I fed it a complete dump file containing all revisions, and it worked fine.

In my case, I also wanted to replace the username in the commit messages. This can be done using svndumptool as follows:

svndumptool.py transform-revprop svn:author OldAuthor NewAuthor input.dump output.dump

Then you need to create a local repository and load the dump file.

svnadmin create repo
svnadmin load repo < final.dump

If this doesn’t work, you might need to manually create some of the higher level folders (e.g. trunk) before loading the dump.

svn mkdir file:///full/path/to/repo/trunk

At this point you need to create your Google Code repo. Then you can use Administer… Source… Reset this project’s repository. to ensure it’s empty.

Finally, you can initialise the remote repo and sync the local repo to the remote Google Code repo.

svnsync init https://project.googlecode.com/svn/ file:///full/path/to/repo/ --username username@googlemail.com

svnsync sync https://project.googlecode.com/svn/ file:///full/path/to/repo/ --username username@googlemail.com

If all goes to plan, you should now have a copy of your project on Google Code, with full history available. If not, you can reset the repo on Google, filter the dump files again, and retry.

This took  quite a bit of trial and error and searching to find, so I hope it helps save you (and me) some pain in future.