Tuesday, May 15, 2012

A Mercurial Userscript

I've got a minor complaint against the Mercurial web interface, and that is that when you are browsing around using the tip version, links will point to the nodeid tip points to rather than keeping the URLs with the relative tip version.  I think the way it should work is that you stay on the tip, unless you are click into a revision log (so that you can click specific revisions).  This is especially nice for sharing a link to the latest with someone, you would want to keep that link relative.
For the most part, I don't really care what Mercurial does, but since I do use their web interface because it's the SCM of choice for the OpenJDK project, I thought I'd whip up a userscript to remedy the situation.  Check out the script here, then test its effects by browsing the latest JDK sources:

Let me know if you have any problems or suggestions for improvement.