Show More
@@ -337,6 +337,8 b' def _try_get_version():' | |||
|
337 | 337 | pieces = sysstr(hg.run(cmd)).split() |
|
338 | 338 | numerictags = [t for t in pieces if t[0:1].isdigit()] |
|
339 | 339 | hgid = sysstr(hg.run(['id', '-i'])).strip() |
|
340 | if hgid.count('+') == 2: | |
|
341 | hgid = hgid.replace("+", ".", 1) | |
|
340 | 342 | if not hgid: |
|
341 | 343 | eprint("/!\\") |
|
342 | 344 | eprint(r"/!\ Unable to determine hg version from local repository") |
@@ -347,7 +349,7 b' def _try_get_version():' | |||
|
347 | 349 | if hgid.endswith('+'): # propagate the dirty status to the tag |
|
348 | 350 | version += '+' |
|
349 | 351 | else: # no tag found on the checked out revision |
|
350 |
ltagcmd = [' |
|
|
352 | ltagcmd = ['log', '--rev', 'wdir()', '--template', '{latesttag}'] | |
|
351 | 353 | ltag = sysstr(hg.run(ltagcmd)) |
|
352 | 354 | if not ltag: |
|
353 | 355 | eprint("/!\\") |
@@ -356,7 +358,13 b' def _try_get_version():' | |||
|
356 | 358 | r"/!\ Failed to retrieve current revision distance to lated tag" |
|
357 | 359 | ) |
|
358 | 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 | 368 | changessince = len(hg.run(changessincecmd).splitlines()) |
|
361 | 369 | version = '%s+hg%s.%s' % (ltag, changessince, hgid) |
|
362 | 370 | if version.endswith('+'): |
General Comments 0
You need to be logged in to leave comments.
Login now