##// END OF EJS Templates
templatekw: copy {author} to {user} and document {author} as an alias...
Yuya Nishihara -
r38983:39028732 default
parent child Browse files
Show More
@@ -168,9 +168,8 b' templatekeyword = registrar.templatekeyw'
168
168
169 @templatekeyword('author', requires={'ctx'})
169 @templatekeyword('author', requires={'ctx'})
170 def showauthor(context, mapping):
170 def showauthor(context, mapping):
171 """String. The unmodified author of the changeset."""
171 """Alias for ``{user}``"""
172 ctx = context.resource(mapping, 'ctx')
172 return showuser(context, mapping)
173 return ctx.user()
174
173
175 @templatekeyword('bisect', requires={'repo', 'ctx'})
174 @templatekeyword('bisect', requires={'repo', 'ctx'})
176 def showbisect(context, mapping):
175 def showbisect(context, mapping):
@@ -757,6 +756,12 b' def showtermwidth(context, mapping):'
757 ui = context.resource(mapping, 'ui')
756 ui = context.resource(mapping, 'ui')
758 return ui.termwidth()
757 return ui.termwidth()
759
758
759 @templatekeyword('user', requires={'ctx'})
760 def showuser(context, mapping):
761 """String. The unmodified author of the changeset."""
762 ctx = context.resource(mapping, 'ctx')
763 return ctx.user()
764
760 @templatekeyword('instabilities', requires={'ctx'})
765 @templatekeyword('instabilities', requires={'ctx'})
761 def showinstabilities(context, mapping):
766 def showinstabilities(context, mapping):
762 """List of strings. Evolution instabilities affecting the changeset.
767 """List of strings. Evolution instabilities affecting the changeset.
@@ -91,7 +91,7 b' Keys work:'
91 $ for key in author branch branches date desc file_adds file_dels file_mods \
91 $ for key in author branch branches date desc file_adds file_dels file_mods \
92 > file_copies file_copies_switch files \
92 > file_copies file_copies_switch files \
93 > manifest node parents rev tags diffstat extras \
93 > manifest node parents rev tags diffstat extras \
94 > p1rev p2rev p1node p2node; do
94 > p1rev p2rev p1node p2node user; do
95 > for mode in '' --verbose --debug; do
95 > for mode in '' --verbose --debug; do
96 > hg log $mode --template "$key$mode: {$key}\n"
96 > hg log $mode --template "$key$mode: {$key}\n"
97 > done
97 > done
@@ -702,6 +702,33 b' Keys work:'
702 p2node--debug: 0000000000000000000000000000000000000000
702 p2node--debug: 0000000000000000000000000000000000000000
703 p2node--debug: 0000000000000000000000000000000000000000
703 p2node--debug: 0000000000000000000000000000000000000000
704 p2node--debug: 0000000000000000000000000000000000000000
704 p2node--debug: 0000000000000000000000000000000000000000
705 user: test
706 user: User Name <user@hostname>
707 user: person
708 user: person
709 user: person
710 user: person
711 user: other@place
712 user: A. N. Other <other@place>
713 user: User Name <user@hostname>
714 user--verbose: test
715 user--verbose: User Name <user@hostname>
716 user--verbose: person
717 user--verbose: person
718 user--verbose: person
719 user--verbose: person
720 user--verbose: other@place
721 user--verbose: A. N. Other <other@place>
722 user--verbose: User Name <user@hostname>
723 user--debug: test
724 user--debug: User Name <user@hostname>
725 user--debug: person
726 user--debug: person
727 user--debug: person
728 user--debug: person
729 user--debug: other@place
730 user--debug: A. N. Other <other@place>
731 user--debug: User Name <user@hostname>
705
732
706 Add a dummy commit to make up for the instability of the above:
733 Add a dummy commit to make up for the instability of the above:
707
734
General Comments 0
You need to be logged in to leave comments. Login now