scm: mercurial: refactor mercurial unit test.
* lib unit test switches if repository exists. * move cat test from app to lib. * no need to run "hg update" in unit test (#3421).
Authored by: tmaruyama 2011-01-04
Parent: [r4628]
Child: [r4630]