Show More
@@ -357,15 +357,20 b' def showlatesttagdistance(repo, ctx, tem' | |||
|
357 | 357 | def showchangessincelatesttag(repo, ctx, templ, cache, **args): |
|
358 | 358 | """:changessincelatesttag: Integer. All ancestors not in the latest tag.""" |
|
359 | 359 | latesttag = getlatesttags(repo, ctx, cache)[2][0] |
|
360 | ||
|
361 | return _showchangessincetag(repo, ctx, tag=latesttag, **args) | |
|
362 | ||
|
363 | def _showchangessincetag(repo, ctx, **args): | |
|
360 | 364 | offset = 0 |
|
361 | 365 | revs = [ctx.rev()] |
|
366 | tag = args['tag'] | |
|
362 | 367 | |
|
363 | 368 | # The only() revset doesn't currently support wdir() |
|
364 | 369 | if ctx.rev() is None: |
|
365 | 370 | offset = 1 |
|
366 | 371 | revs = [p.rev() for p in ctx.parents()] |
|
367 | 372 | |
|
368 |
return len(repo.revs('only(%ld, %s)', revs, |
|
|
373 | return len(repo.revs('only(%ld, %s)', revs, tag)) + offset | |
|
369 | 374 | |
|
370 | 375 | def showmanifest(**args): |
|
371 | 376 | repo, ctx, templ = args['repo'], args['ctx'], args['templ'] |
General Comments 0
You need to be logged in to leave comments.
Login now