Generalize SCM support
Add preliminary Mercurial support