comparison setup.py @ 526:3c2f3444ffba

setup: remove bogus print statements
author Augie Fackler <durin42@gmail.com>
date Mon, 25 Jan 2010 14:51:22 -0600
parents ac9c9e1a8022
children 97f2079e3778
comparison
equal deleted inserted replaced
525:6b084ea39537 526:3c2f3444ffba
46 # Copy SystemRoot into the custom environment for Python 2.6 46 # Copy SystemRoot into the custom environment for Python 2.6
47 # under Windows. Otherwise, the subprocess will fail with 47 # under Windows. Otherwise, the subprocess will fail with
48 # error 0xc0150004. See: http://bugs.python.org/issue3440 48 # error 0xc0150004. See: http://bugs.python.org/issue3440
49 env['SystemRoot'] = os.environ['SystemRoot'] 49 env['SystemRoot'] = os.environ['SystemRoot']
50 cmd = ['hg', 'id', '-i', '-t'] 50 cmd = ['hg', 'id', '-i', '-t']
51 print runcmd(cmd, env)
52 l = runcmd(cmd, env).split() 51 l = runcmd(cmd, env).split()
53 print l
54 while len(l) > 1 and l[-1][0].isalpha(): # remove non-numbered tags 52 while len(l) > 1 and l[-1][0].isalpha(): # remove non-numbered tags
55 l.pop() 53 l.pop()
56 if len(l) > 1: # tag found 54 if len(l) > 1: # tag found
57 version = l[-1] 55 version = l[-1]
58 if l[0].endswith('+'): # propagate the dirty status to the tag 56 if l[0].endswith('+'): # propagate the dirty status to the tag
62 '{latesttag}+{latesttagdistance}-'] 60 '{latesttag}+{latesttagdistance}-']
63 version = runcmd(cmd, env) + l[0] 61 version = runcmd(cmd, env) + l[0]
64 if not version: 62 if not version:
65 version = runcmd(['hg', 'parents', '--template' '{node|short}\n'], 63 version = runcmd(['hg', 'parents', '--template' '{node|short}\n'],
66 env) 64 env)
67 print 'xxx', version
68 if version: 65 if version:
69 version = version.split()[0] 66 version = version.split()[0]
70 if version.endswith('+'): 67 if version.endswith('+'):
71 version += time.strftime('%Y%m%d') 68 version += time.strftime('%Y%m%d')
72 elif os.path.exists('.hg_archival.txt'): 69 elif os.path.exists('.hg_archival.txt'):