fix up the hg support.