Mercurial > hgsubversion
changeset 798:3bffdf0e5948
Backed out changeset 7bf283d4c7a9 in favor of a better win32 fix
In the future I'll try to get commentary from Windows people *before*
pushing a patch.
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Sun, 17 Apr 2011 20:28:04 -0500 |
parents | 7bf283d4c7a9 |
children | 0b56b1492d23 |
files | setup.py |
diffstat | 1 files changed, 3 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/setup.py +++ b/setup.py @@ -33,9 +33,6 @@ def runcmd(cmd, env): version = '' -HG_COMMAND = 'hg' -if os.name == 'nt': - HG_COMMAND = 'hg.bat' if os.path.isdir('.hg'): # Execute hg out of this directory with a custom environment which @@ -51,7 +48,7 @@ if os.path.isdir('.hg'): # under Windows. Otherwise, the subprocess will fail with # error 0xc0150004. See: http://bugs.python.org/issue3440 env['SystemRoot'] = os.environ['SystemRoot'] - cmd = [HG_COMMAND, 'id', '-i', '-t'] + cmd = ['hg', 'id', '-i', '-t'] l = runcmd(cmd, env).split() while len(l) > 1 and l[-1][0].isalpha(): # remove non-numbered tags l.pop() @@ -60,11 +57,11 @@ if os.path.isdir('.hg'): if l[0].endswith('+'): # propagate the dirty status to the tag version += '+' elif len(l) == 1: # no tag found - cmd = [HG_COMMAND, 'parents', '--template', + cmd = ['hg', 'parents', '--template', '{latesttag}+{latesttagdistance}-'] version = runcmd(cmd, env) + l[0] if not version: - version = runcmd([HG_COMMAND, 'parents', '--template' '{node|short}\n'], + version = runcmd(['hg', 'parents', '--template' '{node|short}\n'], env) if version: version = version.split()[0]