mercurial/templates/json/map
author Gregory Szorc <gregory.szorc@gmail.com>
Tue, 31 Mar 2015 22:29:12 -0700
changeset 24564 5ec4bda3097a
parent 24563 830280536946
child 24588 0bf54479a9eb
permissions -rw-r--r--
hgweb: add phase to {changeset} template It's pretty surprising phase wasn't part of this template call already. We now expose {phase} to the {changeset} template and we expose this data to JSON. This brings JSON output in line with the output from `hg log -Tjson`. The lone exception is hweb doesn't print the numeric rev. As has been stated previously, I don't believe hgweb should be exposing these unstable identifiers. (We can add them later if we really want them.) There is still work to bring hgweb in parity with --verbose and --debug output from the CLI.

mimetype = 'application/json'
filerevision = '"not yet implemented"'
search = '"not yet implemented"'
shortlog = '"not yet implemented"'
changelog = '"not yet implemented"'
changeset = '\{
  "node": {node|json},
  "date": {date|json},
  "desc": {desc|json},
  "branch": {if(branch, branch%changesetbranch, "default"|json)},
  "bookmarks": [{join(changesetbookmark, ", ")}],
  "tags": [{join(changesettag, ", ")}],
  "user": {author|json},
  "parents": [{join(parent%changesetparent, ", ")}],
  "phase": {phase|json}
  }'
changesetbranch = '{name|json}'
changesetbookmark = '{bookmark|json}'
changesettag = '{tag|json}'
changesetparent = '{node|json}'
manifest = '"not yet implemented"'
tags = '\{
  "node": {node|json},
  "tags": [{join(entriesnotip%tagentry, ", ")}]
  }'
tagentry = '\{
  "tag": {tag|json},
  "node": {node|json},
  "date": {date|json}
  }'
bookmarks = '\{
  "node": {node|json},
  "bookmarks": [{join(entries%bookmarkentry, ", ")}]
  }'
bookmarkentry = '\{
  "bookmark": {bookmark|json},
  "node": {node|json},
  "date": {date|json}
  }'
branches = '\{
  "branches": [{join(entries%branchentry, ", ")}]
  }'
branchentry = '\{
  "branch": {branch|json},
  "node": {node|json},
  "date": {date|json},
  "status": {status|json}
  }'
summary = '"not yet implemented"'
filediff = '"not yet implemented"'
filecomparison = '"not yet implemented"'
fileannotate = '"not yet implemented"'
filelog = '"not yet implemented"'
graph = '"not yet implemented"'
helptopics = '"not yet implemented"'
help = '"not yet implemented"'
filenodelink = ''
filenolink = ''