Add Mercurial support, command test improvements

* Refactor command tests to use a base set of tests
* Add MockSourceRepo for creating a repo for any command