We are still not allowed to have dashes inside version. Fix for mercurial.

Add unittest for versionformat YYYYMMDD