mercurial/templates/json/map
author Gregory Szorc <gregory.szorc@gmail.com>
Tue, 31 Mar 2015 22:35:12 -0700
changeset 24563 830280536946
parent 24547 495f3e665b27
child 24564 5ec4bda3097a
permissions -rw-r--r--
json: implement {changeset} template Output only contains basic changeset information for the moment. The format is compatible with `hg log -Tjson`.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
24544
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     1
mimetype = 'application/json'
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     2
filerevision = '"not yet implemented"'
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     3
search = '"not yet implemented"'
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     4
shortlog = '"not yet implemented"'
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     5
changelog = '"not yet implemented"'
24563
830280536946 json: implement {changeset} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24547
diff changeset
     6
changeset = '\{
830280536946 json: implement {changeset} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24547
diff changeset
     7
  "node": {node|json},
830280536946 json: implement {changeset} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24547
diff changeset
     8
  "date": {date|json},
830280536946 json: implement {changeset} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24547
diff changeset
     9
  "desc": {desc|json},
830280536946 json: implement {changeset} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24547
diff changeset
    10
  "branch": {if(branch, branch%changesetbranch, "default"|json)},
830280536946 json: implement {changeset} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24547
diff changeset
    11
  "bookmarks": [{join(changesetbookmark, ", ")}],
830280536946 json: implement {changeset} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24547
diff changeset
    12
  "tags": [{join(changesettag, ", ")}],
830280536946 json: implement {changeset} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24547
diff changeset
    13
  "user": {author|json},
830280536946 json: implement {changeset} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24547
diff changeset
    14
  "parents": [{join(parent%changesetparent, ", ")}]
830280536946 json: implement {changeset} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24547
diff changeset
    15
  }'
830280536946 json: implement {changeset} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24547
diff changeset
    16
changesetbranch = '{name|json}'
830280536946 json: implement {changeset} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24547
diff changeset
    17
changesetbookmark = '{bookmark|json}'
830280536946 json: implement {changeset} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24547
diff changeset
    18
changesettag = '{tag|json}'
830280536946 json: implement {changeset} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24547
diff changeset
    19
changesetparent = '{node|json}'
24544
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    20
manifest = '"not yet implemented"'
24545
9e0c67e84896 json: implement {tags} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24544
diff changeset
    21
tags = '\{
9e0c67e84896 json: implement {tags} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24544
diff changeset
    22
  "node": {node|json},
9e0c67e84896 json: implement {tags} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24544
diff changeset
    23
  "tags": [{join(entriesnotip%tagentry, ", ")}]
9e0c67e84896 json: implement {tags} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24544
diff changeset
    24
  }'
9e0c67e84896 json: implement {tags} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24544
diff changeset
    25
tagentry = '\{
9e0c67e84896 json: implement {tags} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24544
diff changeset
    26
  "tag": {tag|json},
9e0c67e84896 json: implement {tags} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24544
diff changeset
    27
  "node": {node|json},
9e0c67e84896 json: implement {tags} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24544
diff changeset
    28
  "date": {date|json}
9e0c67e84896 json: implement {tags} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24544
diff changeset
    29
  }'
24546
adfd808c123f json: implement {bookmarks} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24545
diff changeset
    30
bookmarks = '\{
adfd808c123f json: implement {bookmarks} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24545
diff changeset
    31
  "node": {node|json},
adfd808c123f json: implement {bookmarks} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24545
diff changeset
    32
  "bookmarks": [{join(entries%bookmarkentry, ", ")}]
adfd808c123f json: implement {bookmarks} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24545
diff changeset
    33
  }'
adfd808c123f json: implement {bookmarks} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24545
diff changeset
    34
bookmarkentry = '\{
adfd808c123f json: implement {bookmarks} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24545
diff changeset
    35
  "bookmark": {bookmark|json},
adfd808c123f json: implement {bookmarks} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24545
diff changeset
    36
  "node": {node|json},
adfd808c123f json: implement {bookmarks} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24545
diff changeset
    37
  "date": {date|json}
adfd808c123f json: implement {bookmarks} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24545
diff changeset
    38
  }'
24547
495f3e665b27 json: implement {branches} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24546
diff changeset
    39
branches = '\{
495f3e665b27 json: implement {branches} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24546
diff changeset
    40
  "branches": [{join(entries%branchentry, ", ")}]
495f3e665b27 json: implement {branches} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24546
diff changeset
    41
  }'
495f3e665b27 json: implement {branches} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24546
diff changeset
    42
branchentry = '\{
495f3e665b27 json: implement {branches} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24546
diff changeset
    43
  "branch": {branch|json},
495f3e665b27 json: implement {branches} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24546
diff changeset
    44
  "node": {node|json},
495f3e665b27 json: implement {branches} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24546
diff changeset
    45
  "date": {date|json},
495f3e665b27 json: implement {branches} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24546
diff changeset
    46
  "status": {status|json}
495f3e665b27 json: implement {branches} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24546
diff changeset
    47
  }'
24544
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    48
summary = '"not yet implemented"'
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    49
filediff = '"not yet implemented"'
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    50
filecomparison = '"not yet implemented"'
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    51
fileannotate = '"not yet implemented"'
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    52
filelog = '"not yet implemented"'
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    53
graph = '"not yet implemented"'
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    54
helptopics = '"not yet implemented"'
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    55
help = '"not yet implemented"'
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    56
filenodelink = ''
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    57
filenolink = ''