##// END OF EJS Templates
setup: make the version computation process more resistant...
marmoute -
r51250:8d390a13 stable
parent child Browse files
Show More
@@ -337,8 +337,12 b" if os.path.isdir('.hg'):"
337 else: # no tag found
337 else: # no tag found
338 ltagcmd = ['parents', '--template', '{latesttag}']
338 ltagcmd = ['parents', '--template', '{latesttag}']
339 ltag = sysstr(hg.run(ltagcmd))
339 ltag = sysstr(hg.run(ltagcmd))
340 if not ltag:
341 ltag = 'null'
340 changessincecmd = ['log', '-T', 'x\n', '-r', "only(.,'%s')" % ltag]
342 changessincecmd = ['log', '-T', 'x\n', '-r', "only(.,'%s')" % ltag]
341 changessince = len(hg.run(changessincecmd).splitlines())
343 changessince = len(hg.run(changessincecmd).splitlines())
344 if ltag == 'null':
345 ltag = '0.0'
342 version = '%s+hg%s.%s' % (ltag, changessince, hgid)
346 version = '%s+hg%s.%s' % (ltag, changessince, hgid)
343 if version.endswith('+'):
347 if version.endswith('+'):
344 version = version[:-1] + 'local' + time.strftime('%Y%m%d')
348 version = version[:-1] + 'local' + time.strftime('%Y%m%d')
General Comments 0
You need to be logged in to leave comments. Login now