Moving from CVS to Mercurial

Yesterday, Venkman moved from CVS to Hg. For the benefit of others who may want to move other extensions, here is a rough attempt to outline the steps I took.

First, some notes of caution:

  • HG uses a character encoding specific to your machine. For my mac, that turned out to be mac-roman. You usually don’t want that, and need to tell it you want it to use utf8 instead. I could actually not convince it to do this for the author map – it stored the authors in mac-roman anyway. Check your imports carefully.
  • HG’s default ConvertExtension is your friend, as long as you tell it what to do the right way.
  • You probably want to create a test repo (I ended up using several, in trial and error!) at Instructions for doing that may be found here. Keep in mind that once you stick something in a Mercurial repo, it will be there forever. This means anyone pulling from your repo will have to keep downloading all those files. Be careful about what you push to the repo, because once you’ve pushed something there’s no going back (short of asking IT to delete the repo and trying again).

Alright. Down to the actual import. Here is the actual steps I ended up following. When I say “ended up” I mean “after trying N different things which didn’t work”, where N was large enough to keep me busy for a fair number of hours.

  1. Check out the relevant code from CVS. In my case, this meant:
    cvs -d co mozilla/extensions/venkman
  2. Enable the convert and mq extensions. Edit your ~/.hgrc file and include:
    mq =
  3. Decide whether you want all the branches in CVS. If, like me, you’re importing an extension, you probably don’t care about the Firefox/Mozilla release branches. You just want trunk history. In order to do this, we ask the convert extension to split up branches. Edit your ~/.hgrc file and include:
  4. Now you can run convert, more or less like this:
    hg --encoding utf8 convert vnkCVS/mozilla/extensions/venkman venkman-initial
  5. Inspect your handiwork: you will now end up with several directories, one for each branch. You presumably want “default”, which should correspond to trunk. We will convert from hg to hg in a bit, to obtain just that.  Go back to your ~/.hgrc file and remove the [convert] section you added in step 3. This way, the new repo we’ll convert to won’t still have the “default” directory.
  6. Additionally, we still need to map authors. CVS used something like: “”, and in Mercurial, we expect something of the form “John Doe <>”. So we need to define an author map file, in which each line simply maps one set of authors to the next. For example: = John Doe <> . I uploaded the Author map for Venkman CVS to hg import that I used. It probably does not cover everyone who committed to your repo. If there are aliases that you’re not familiar with (Mozilla CVS is pretty old!) then Google and asking on IRC are easy ways of figuring out who’s who. To create a complete author map, I used some ad-hoc sed magic on:

    hg log | grep "user:" > foo.txt
  7. You may want to unify the entries of committers who have committed using different committer IDs. Ohloh can help there.
  8. Run hg convert again:
    hg --encoding utf8 convert --authors myAuthorMap.txt venkman-initial/default/ venkman-final/
  9. Check hg log. If there are loads of tags in which you’re not interested, you can use the hg strip command to strip the last hg revision, which added all the tags.
  10. Verify everything worked. Then add the correct “default-push” line to the .hg/hgrc file for the new repo you created, and push to your user repo. Check that everything is correct by reviewing the hgweb overview of things. If so, change the default-push line to point to the “real” repo, and push all the changesets there. You’re done!

This may not be the easiest or best way to do things, but that’s the way I managed – suggestions/improvements appreciated!

SightCity Frankfurt, ChatZilla release, Privacy, Venkman issues, misc.

It’s been way too long since I posted anything here, for which I apologize. There are a couple of things that deserve mention here at the present time.


I recently got back from visiting SightCity in Frankfurt am Main, Germany. The conference experience was excellent, and I had a great time with Steve, Ben and Marco, all of whom have written more pleasantly and/or extravagantly about our experiences there than I ever could. So this is all you’re getting from me, here. 🙂

ChatZilla Releases

ChatZilla 0.9.82 was released, quickly followed by ChatZilla after a couple of nasty regressions. Almost all of the releases’ features and fixes fall squarely into the “polish” bin (eg. dragging tabs for channels named only “#” now works, and doubleclicking a user in the userlist opens a query tab, some minor accessibility and localizability fixes, etc.), except for one: CEIP, short for Customer Experience Improvement Program. Customer not being very apt, I suppose, but it’s a standard name for what is essentially a data collecting tool.

Data collecting?! Yes, data collecting. I wrote a Privacy Policy about what we do. Please read it first, before flaming me/us. Really, read it – it’s quite short! As you will have read by now, I hope, we ask first if it would be OK to collect anonymous statistics. Without consent, ChatZilla doesn’t save anything you do, nor (consequently) does anything get sent. We never collect anything personal, and both in the policy and in the UI, which is accessible from the Help menu in ChatZilla, we indicate a bunch of things we specifically won’t collect. So what can we collect, then, and how is it useful? Well, examples include the length of sessions (do people run ChatZilla for days at a time without interruption, or only five minutes?) and how tabs are handled. We can already, after just a few days, see that many people seem to be closing lots of network tabs, which may lead us to prioritize bug 249188, for instance.

So I hope that this post helps clarify that we’re not turning evil. If you disagree, and had already turned it on, you’re free to turn it off again, at your leasure. Do let us know what you think we’re doing wrong, though.

Venkman trunk issue

If you’re using Venkman with a Gecko trunk product (eg. Firefox 3 RC1, Thunderbird Shredder 3.0a1, …) you may have found that viewing source code stopped working a while ago. This happened because of a change in the way unprivileged content, like the source view itself (which is plain old HTML) is allowed to access chrome content (like the stylesheet for the source view, unfortunately). Fixing it properly is not trivial. Right now, I have suggested a more or less wallpaper fix, because I am too busy to do something nicer, and it doesn’t seem like anyone else is willing to go and fix it instead. This basically allows unprivileged content to access the chrome content again. A better solution would be to channel the stylesheet through the jsd protocol. If anyone wants to step up to the plate and fix that, that’d be awesome. In the meantime, the wallpaper patch is waiting for review. If you’re in need of a working Venkman, I uploaded an XPI to bug 428848.


I’m nearing the end of my BSc degree. I’m working on my thesis at the moment, and finishing off the two courses that remain. Perhaps I’ll write more about the thesis once I have something I can demo or screenshot in-action. For now, I’d just like to happily announce that I was conditionally accepted into the 1 year MSc Advanced Computing course at Imperial College, London. So, if you know of a good place for a grad student to live in central London (South Kensington), let me know!

ChatZilla 0.9.80 released

ChatZilla 0.9.80 is now available from and the homepage.

Notable new features include:

Notable fixed bugs include:

There is a full list for the curious among you.

ChatZilla, now with extra cool

Thanks to Silver‘s hard work, current ChatZilla trunk now features draggable tabs! Due to a slightly older patch the userlist is now much faster, and there’s some other API backend work going on to make things (even) more stable, fast and usable. Don’t hesitate to grab a nightly build and try things out!  As always, bugzilla is there for your bugfiling needs.

In other news, I will be away until January 2nd, I’m off to Taizé’s European Meeting in Geneva.

Status Update: Mozilla

I haven’t really written anything of late, so let’s fix that. Bullet points in topic-centered posts. Here we go:

  • I will be attending FOSDEM, in Brussels, Belgium, arriving friday (february 23rd), leaving sunday (25th). I will be staying at the NH Stephanie.
  • Thanks the Mozilla Foundation‘s sponsoring, I will also be attending the CSUN Conference, in Los Angeles, CA. I will be staying at one of the conference hotels (room’s booked) from Saturday (march 17th) to Saturday (24th). If you’re in the area and want me to say hi, send mail. (I’ll be arriving late and I’ll probably knackered from flying for 17 hours or so, so don’t count on me being approachable before sunday/monday at least)
  • I have finally released some of my extension stuff which in some cases I’ve been sitting on for something like a year now. I thought I’d better start putting some of it online lest I become another Hurd. For now, these are:
    • Chrome List, which allows you to browse chrome:// urls as if they were a normal file tree. This is also up on the Mozilla Addons site.
    • Show Menubar, which adds a contextmenu item for windows without a menubar to show the menubar anyway. This is handy-dandy if you need to change character sets, print, or if it’s the only Firefox window you still have open. I haven’t submitted this one to the Mozilla Addons site yet because I only wrote it the day before yesterday and AMO (as it’s known to the insiders) will be updated soon.
  • I should probably put my Graphing Calculator extension online as well, but I think there are alternatives for that by now, and it might not be worth putting there anyway (it can also be slow, and I’ve always been too lazy to create a preference panel for anything I write, meaning it lacks GUI for some of its options).
  • I wrote my first XPCOM interface, and wrote Windows and GTK2 implementations for it.
  • I wrote a small ChatZilla tutorial on SSH Tunneling. This is the first tutorial I’ve written, and it still needs pretty screenshots. Other than that I’m happy about it.
  • There’s some ChatZilla things I desperately need to finish, but have been too busy/lazy to. I will try to get to them this week (but I’m not telling you what I mean by ‘them’, so don’t get too hopeful just yet). There’s also, hopefully, another announcement in that respect due ‘soon’, but I’m going to keep my mouth shut on that for now.

I think that’s about it. If anyone/anything feels left out, poke me. I won’t bite.