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