Mercurial > hg
annotate mercurial/templates/json/changelist.tmpl @ 24588:0bf54479a9eb
json: implement {shortlog} and {changelog} templates
These are the same dispatch function under the hood. The only difference
is the default number of entries to render and the template to use. So
it makes sense to use a shared template.
Format for {changelistentry} is similar to {changeset}. However, there
are differences to argument names and their values preventing us from
(easily) using the same template. (Perhaps there is room to consolidate
the templates as a follow-up.)
We're currently not recording some data in {changelistentry} that exists
in {changeset}. This includes the branch name. This should be added in
a follow-up. For now, something is better than nothing.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Tue, 31 Mar 2015 22:53:48 -0700 |
parents | |
children |
rev | line source |
---|---|
24588
0bf54479a9eb
json: implement {shortlog} and {changelog} templates
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1 \{ |
0bf54479a9eb
json: implement {shortlog} and {changelog} templates
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
2 "node": {node|json}, |
0bf54479a9eb
json: implement {shortlog} and {changelog} templates
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
3 "changeset_count": {changesets|json}, |
0bf54479a9eb
json: implement {shortlog} and {changelog} templates
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
4 "changesets": [{join(entries%changelistentry, ", ")}] |
0bf54479a9eb
json: implement {shortlog} and {changelog} templates
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
5 } |