some mercurial helpers