Show More
@@ -648,18 +648,20 def _showchangessincetag(context, mappin | |||
|
648 | 648 | # teach templater latesttags.changes is switched to (context, mapping) API |
|
649 | 649 | _showchangessincetag._requires = {'repo', 'ctx'} |
|
650 | 650 | |
|
651 | @templatekeyword('manifest') | |
|
652 |
def showmanifest( |
|
|
653 | repo, ctx, templ = args[r'repo'], args[r'ctx'], args[r'templ'] | |
|
651 | @templatekeyword('manifest', requires={'repo', 'ctx', 'templ'}) | |
|
652 | def showmanifest(context, mapping): | |
|
653 | repo = context.resource(mapping, 'repo') | |
|
654 | ctx = context.resource(mapping, 'ctx') | |
|
655 | templ = context.resource(mapping, 'templ') | |
|
654 | 656 | mnode = ctx.manifestnode() |
|
655 | 657 | if mnode is None: |
|
656 | 658 | # just avoid crash, we might want to use the 'ff...' hash in future |
|
657 | 659 | return |
|
658 | 660 | mrev = repo.manifestlog._revlog.rev(mnode) |
|
659 | 661 | mhex = hex(mnode) |
|
660 |
|
|
|
661 |
|
|
|
662 | f = templ('manifest', **args) | |
|
662 | mapping = mapping.copy() | |
|
663 | mapping.update({'rev': mrev, 'node': mhex}) | |
|
664 | f = templ('manifest', **pycompat.strkwargs(mapping)) | |
|
663 | 665 | # TODO: perhaps 'ctx' should be dropped from mapping because manifest |
|
664 | 666 | # rev and node are completely different from changeset's. |
|
665 | 667 | return _mappable(f, None, f, lambda x: {'rev': mrev, 'node': mhex}) |
General Comments 0
You need to be logged in to leave comments.
Login now