Add backedoutby to json hgtemplate (
Bug 1258698) r?gps
MozReview-Commit-ID: HeIGWB92SaO
--- a/hgext/hgmo/tests/test-json-changeset.t
+++ b/hgext/hgmo/tests/test-json-changeset.t
@@ -25,16 +25,17 @@
Last changeset
$ http http://localhost:$HGPORT/json-rev/tip --header content-type --body-file body
200
content-type: application/json
$ python -m json.tool < body
{
+ "backedoutby": "",
"bookmarks": [],
"branch": "default",
"date": [
0.0,
0
],
"desc": "NO BUG",
"node": "c761ad6d27c96f72f7e4637789e967c3f9730255",
--- a/hgserver/tests/test-push-basic.t
+++ b/hgserver/tests/test-push-basic.t
@@ -69,16 +69,17 @@ It got replicated to mirrors
$ http --no-headers ${HGWEB_0_URL}mozilla-central/json-rev/77538e1ce4be
200
{
"node": "77538e1ce4bec5f7aac58a7ceca2da0e38e90a72",
"date": [0.0, 0],
"desc": "initial",
+ "backedoutby": "",
"branch": "default",
"bookmarks": [],
"tags": ["tip"],
"user": "Test User \u003csomeone@example.com\u003e",
"parents": [],
"phase": "public",
"pushid": 1,
"pushdate": [*, 0], (glob)
@@ -87,16 +88,17 @@ It got replicated to mirrors
$ http --no-headers ${HGWEB_1_URL}mozilla-central/json-rev/77538e1ce4be
200
{
"node": "77538e1ce4bec5f7aac58a7ceca2da0e38e90a72",
"date": [0.0, 0],
"desc": "initial",
+ "backedoutby": "",
"branch": "default",
"bookmarks": [],
"tags": ["tip"],
"user": "Test User \u003csomeone@example.com\u003e",
"parents": [],
"phase": "public",
"pushid": 1,
"pushdate": [*, 0], (glob)
--- a/hgtemplates/json/map
+++ b/hgtemplates/json/map
@@ -41,16 +41,17 @@ changelistentry = '\{
"tags": [{join(tags%changelistentryname, ", ")}],
"user": {author|json}
}'
changelistentryname = '{name|json}'
changeset = '\{
"node": {node|json},
"date": {date|json},
"desc": {desc|json},
+ "backedoutby": {if(backedoutbynode, backedoutbynode|json, ""|json)},
"branch": {if(branch, branch%changesetbranch, "default"|json)},
"bookmarks": [{join(changesetbookmark, ", ")}],
"tags": [{join(changesettag, ", ")}],
"user": {author|json},
"parents": [{join(parent%changesetparent, ", ")}],
"phase": {phase|json},
"pushid": {pushid|json},
"pushdate": {pushdate|json},