`mercurial version` doesn't always print the version number. `mercurial --version` does. Use the latter.