##// END OF EJS Templates
setup: use changes since latest tag instead of just distance...
Siddharth Agarwal -
r23647:eb55e092 default
parent child Browse files
Show More
@@ -196,9 +196,13 if os.path.isdir('.hg'):
196 196 if hgid.endswith('+'): # propagate the dirty status to the tag
197 197 version += '+'
198 198 else: # no tag found
199 cmd = [sys.executable, 'hg', 'parents', '--template',
200 '{latesttag}+{latesttagdistance}-']
201 version = runhg(cmd, env) + hgid
199 ltagcmd = [sys.executable, 'hg', 'parents', '--template',
200 '{latesttag}']
201 ltag = runhg(ltagcmd, env)
202 changessincecmd = [sys.executable, 'hg', 'log', '-T', 'x\n', '-r',
203 "only(.,'%s')" % ltag]
204 changessince = len(runhg(changessincecmd, env).splitlines())
205 version = '%s+%s-%s' % (ltag, changessince, hgid)
202 206 if version.endswith('+'):
203 207 version += time.strftime('%Y%m%d')
204 208 elif os.path.exists('.hg_archival.txt'):
General Comments 0
You need to be logged in to leave comments. Login now