This is useful:http://hgbook.red-bean.com/read/customizing-the-output-of-mercurial.html#sec:template:filter