Mercurial > public > mercurial-scm > hg
diff mercurial/version.py @ 427:36e644d28edf
Make it possible to specify a version number in setup.py.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Make it possible to specify a version number in setup.py.
manifest hash: 905feb305205801eb3833e5a84161fb57b83c86e
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFCtc/QW7P1GVgWeRoRAlCaAJ9G2GRf0wIEVEbYNoV4PjV4b024bQCfcUFf
WVYQlTXqninDXyKas2yQYdo=
=ofg/
-----END PGP SIGNATURE-----
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Sun, 19 Jun 2005 21:04:32 +0100 |
parents | 719663b7f235 |
children | 688d03d6997a |
line wrap: on
line diff
--- a/mercurial/version.py Sun Jun 19 20:16:10 2005 +0100 +++ b/mercurial/version.py Sun Jun 19 21:04:32 2005 +0100 @@ -33,10 +33,10 @@ f.write("version = %r\n" % version) f.close() -def remember_version(): +def remember_version(version=None): """Store version information.""" global remembered_version - if os.access(".hg", os.F_OK): + if not version and os.path.isdir(".hg"): f = os.popen("hg identify 2>/dev/null") # use real hg installation ident = f.read()[:-1] if not f.close() and ident: @@ -55,8 +55,9 @@ break if modified: version += time.strftime('+%Y%m%d') - remembered_version = True - write_version(version) + if version: + remembered_version = True + write_version(version) def forget_version(): """Remove version information."""