a slightly refactored version of http://article.gmane.org/gmane.comp.version-control.mercurial.devel/42230 I've left the last patch of the previous series out this time. Matt suggested I send those later on when it becomes relevant.