Fix hg version parsing to cope with devel builds.
Review Request #3559 — Created Nov. 25, 2012 and discarded
Fix hg version parsing to cope with devel builds. Devel builds of hg include the revision number in a way that breaks parse_version(). This change adds some code to strip that out.
Ran unit tests.