Mercurial support + miscellaneous modifications.