add hg support to getver.sh (patch from #5763)