comparison mercurial/commands.py @ 33091:73dfc72704b6

identify: provide changectx to templater
author Yuya Nishihara <yuya@tcha.org>
date Mon, 26 Jun 2017 09:37:16 +0900
parents 9e0d222f5687
children d170f59f6f55
comparison
equal deleted inserted replaced
33090:04b3743c1d7c 33091:73dfc72704b6
2793 fn = fm.nested('parents') 2793 fn = fm.nested('parents')
2794 for p in parents: 2794 for p in parents:
2795 fn.startitem() 2795 fn.startitem()
2796 fn.data(rev=p.rev()) 2796 fn.data(rev=p.rev())
2797 fn.data(node=p.hex()) 2797 fn.data(node=p.hex())
2798 fn.context(ctx=p)
2798 fn.end() 2799 fn.end()
2799 else: 2800 else:
2800 hexoutput = hexfunc(ctx.node()) 2801 hexoutput = hexfunc(ctx.node())
2801 if default or id: 2802 if default or id:
2802 output = [hexoutput] 2803 output = [hexoutput]
2832 2833
2833 fm.data(node=ctx.hex()) 2834 fm.data(node=ctx.hex())
2834 fm.data(branch=ctx.branch()) 2835 fm.data(branch=ctx.branch())
2835 fm.data(tags=fm.formatlist(taglist, name='tag', sep=':')) 2836 fm.data(tags=fm.formatlist(taglist, name='tag', sep=':'))
2836 fm.data(bookmarks=fm.formatlist(ctx.bookmarks(), name='bookmark')) 2837 fm.data(bookmarks=fm.formatlist(ctx.bookmarks(), name='bookmark'))
2838 fm.context(ctx=ctx)
2837 2839
2838 fm.plain("%s\n" % ' '.join(output)) 2840 fm.plain("%s\n" % ' '.join(output))
2839 fm.end() 2841 fm.end()
2840 2842
2841 @command('import|patch', 2843 @command('import|patch',