[PATCH] hg --version
Vincent Danjean
vdanjean.ml at free.fr
Sun Jun 19 09:56:46 UTC 2005
On Sat, Jun 18, 2005 at 05:35:59PM +0200, Thomas Arendsen Hein wrote:
> Hi!
>
> Attached is a patch to support 'hg --version', the version number
> will be showen in 'hg help', too. Option -q hides the included
> copyright text and will, and in help the version number, too.
[...]
> +++ b/setup.py Sat Jun 18 15:32:41 2005
> +try:
> + mercurial.version.remember_version()
> + setup(name='mercurial',
[...]
> +++ b/mercurial/version.py Sat Jun 18 15:32:41 2005
[...]
> +def remember_version():
> + """Store version information."""
> + f = os.popen("hg identify 2>/dev/null") # use real hg installation
It seems this needs a working 'hg'. Without a already built 'hg' in our
path, we will get an 'version unknown'...
Using "./hg identify 2>/dev/null" does not work as the mpatch
extention is not available.
Moreover, we allways get an 'version unknown' is we build from a
tarball got from "python setup.py sdist"
And the 'version number' starts with the SHA1. It is not
'monotonic' and cannot be used at all by distributions (dpkg, rpm, ...
would not know is a package is older or newer than an other)
It thinks that more reflexion is needed before adding this in the main
repository.
Vincent
More information about the Mercurial
mailing list