Support JSON view of commits in RevisionServlet
Example output:
$ curl 'http://localhost:8080/gitiles/+/1040ab8d5861e2804f725a936ca9b6f3be6f6239?format=JSON'
)]}'
{
"commit": "1040ab8d5861e2804f725a936ca9b6f3be6f6239",
"parents": [
"0ad024fb5aa3e4994ede801428b4e30ba06a837d"
],
"author": {
"name": "Dave Borowitz",
"email": "dborowitz@google.com",
"time": "Sun Mar 16 13:49:37 2014 -0700"
},
"committer": {
"name": "Dave Borowitz",
"email": "dborowitz@google.com",
"time": "Sun Mar 16 13:49:37 2014 -0700"
},
"message": "Use CommitData to produce CommitJsonData\n\nChange-Id: I7261b0c40e97119c32627c4ea89038bbe174925f\n",
"tree_diff": [
{
"type": "modify",
"old_id": "87f3456c40f24662d28411fda9b2cf05b82bf007",
"old_mode": 33188,
"old_path": "gitiles-servlet/src/main/java/com/google/gitiles/CommitJsonData.java",
"new_id": "07fbd1e0eb753aa41dee53c758ced595f18f67bf",
"new_mode": 33188,
"new_path": "gitiles-servlet/src/main/java/com/google/gitiles/CommitJsonData.java"
},
{
"type": "modify",
"old_id": "aa6bd34861cf2f49abd357edff0b2f3ff354aa91",
"old_mode": 33188,
"old_path": "gitiles-servlet/src/main/java/com/google/gitiles/LogServlet.java",
"new_id": "e6ae4c2062bfe3dfb6f059f282e90af64bbd10d3",
"new_mode": 33188,
"new_path": "gitiles-servlet/src/main/java/com/google/gitiles/LogServlet.java"
}
]
}
Change-Id: I29b76ce331bd6876476e3ddd56f2f484450b7e87
3 files changed