add support for hg.