add mercurial
merged grahams fix for mercurial