Mercurial support

Adds support for Mercurial repositories.