##// END OF EJS Templates
setup: support building from an ongoing merge...
marmoute -
r51063:593f5e40 stable
parent child Browse files
Show More
@@ -337,6 +337,8 b' def _try_get_version():'
337 pieces = sysstr(hg.run(cmd)).split()
337 pieces = sysstr(hg.run(cmd)).split()
338 numerictags = [t for t in pieces if t[0:1].isdigit()]
338 numerictags = [t for t in pieces if t[0:1].isdigit()]
339 hgid = sysstr(hg.run(['id', '-i'])).strip()
339 hgid = sysstr(hg.run(['id', '-i'])).strip()
340 if hgid.count('+') == 2:
341 hgid = hgid.replace("+", ".", 1)
340 if not hgid:
342 if not hgid:
341 eprint("/!\\")
343 eprint("/!\\")
342 eprint(r"/!\ Unable to determine hg version from local repository")
344 eprint(r"/!\ Unable to determine hg version from local repository")
@@ -347,7 +349,7 b' def _try_get_version():'
347 if hgid.endswith('+'): # propagate the dirty status to the tag
349 if hgid.endswith('+'): # propagate the dirty status to the tag
348 version += '+'
350 version += '+'
349 else: # no tag found on the checked out revision
351 else: # no tag found on the checked out revision
350 ltagcmd = ['parents', '--template', '{latesttag}']
352 ltagcmd = ['log', '--rev', 'wdir()', '--template', '{latesttag}']
351 ltag = sysstr(hg.run(ltagcmd))
353 ltag = sysstr(hg.run(ltagcmd))
352 if not ltag:
354 if not ltag:
353 eprint("/!\\")
355 eprint("/!\\")
@@ -356,7 +358,13 b' def _try_get_version():'
356 r"/!\ Failed to retrieve current revision distance to lated tag"
358 r"/!\ Failed to retrieve current revision distance to lated tag"
357 )
359 )
358 return ''
360 return ''
359 changessincecmd = ['log', '-T', 'x\n', '-r', "only(.,'%s')" % ltag]
361 changessincecmd = [
362 'log',
363 '-T',
364 'x\n',
365 '-r',
366 "only(parents(),'%s')" % ltag,
367 ]
360 changessince = len(hg.run(changessincecmd).splitlines())
368 changessince = len(hg.run(changessincecmd).splitlines())
361 version = '%s+hg%s.%s' % (ltag, changessince, hgid)
369 version = '%s+hg%s.%s' % (ltag, changessince, hgid)
362 if version.endswith('+'):
370 if version.endswith('+'):
General Comments 0
You need to be logged in to leave comments. Login now