diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py --- a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -1072,7 +1072,7 @@ class jsonchangeset(changeset_printer): ", ".join('"%s": "%s"' % (j(k), j(v)) for k, v in ctx.extra().items())) - files = ctx.status(ctx.p1()) + files = ctx.p1().status(ctx) self.ui.write(',\n "modified": [%s]' % ", ".join('"%s"' % j(f) for f in files[0])) self.ui.write(',\n "added": [%s]' % diff --git a/tests/test-command-template.t b/tests/test-command-template.t --- a/tests/test-command-template.t +++ b/tests/test-command-template.t @@ -696,8 +696,8 @@ Test JSON style: "manifest": "94961b75a2da554b4df6fb599e5bfc7d48de0c64", "extra": {"branch": "default"}, "modified": [], - "added": ["second"], - "removed": ["fourth", "third"] + "added": ["fourth", "third"], + "removed": ["second"] }, { "rev": 7, @@ -713,8 +713,8 @@ Test JSON style: "manifest": "f2dbc354b94e5ec0b4f10680ee0cee816101d0bf", "extra": {"branch": "default"}, "modified": [], - "added": [], - "removed": ["second"] + "added": ["second"], + "removed": [] }, { "rev": 6, @@ -747,8 +747,8 @@ Test JSON style: "manifest": "4dc3def4f9b4c6e8de820f6ee74737f91e96a216", "extra": {"branch": "default"}, "modified": [], - "added": [], - "removed": ["d"] + "added": ["d"], + "removed": [] }, { "rev": 4, @@ -798,8 +798,8 @@ Test JSON style: "manifest": "6e0e82995c35d0d57a52aca8da4e56139e06b4b1", "extra": {"branch": "default"}, "modified": [], - "added": [], - "removed": ["c"] + "added": ["c"], + "removed": [] }, { "rev": 1, @@ -815,8 +815,8 @@ Test JSON style: "manifest": "4e8d705b1e53e3f9375e0e60dc7b525d8211fe55", "extra": {"branch": "default"}, "modified": [], - "added": [], - "removed": ["b"] + "added": ["b"], + "removed": [] }, { "rev": 0, @@ -832,8 +832,8 @@ Test JSON style: "manifest": "a0c8bcbbb45c63b90b70ad007bf38961f64f2af0", "extra": {"branch": "default"}, "modified": [], - "added": [], - "removed": ["a"] + "added": ["a"], + "removed": [] } ]