Feature/mercurial support

Fixes #240