[PATCH 3 of 3] changeset: adjust json output to use new/old (BC)

Yuya Nishihara yuya at tcha.org
Wed Mar 9 09:39:38 EST 2016


On Tue, 08 Mar 2016 13:44:28 -0600, timeless wrote:
> # HG changeset patch
> # User timeless <timeless at mozdev.org>
> # Date 1456455801 0
> #      Fri Feb 26 03:03:21 2016 +0000
> # Node ID a937921be52a4dd619dcec9cff852b4f47afa565
> # Parent  ec4546f50c52baae1db569008c33de7ac06949e3
> changeset: adjust json output to use new/old (BC)
> 
> The previous json structure was not friendly to strongly structured parsing.

Repeat: I can't see why it was not friendly. Can you elaborate?

> --- a/tests/test-log.t
> +++ b/tests/test-log.t
> @@ -524,7 +524,7 @@
>      "tags": ["tip"],
>      "parents": ["2ca5ba7019804f1f597249caddf22a64d34df0ba"],
>      "files": ["dir/b", "e"],
> -    "copies": {"e": "dir/b"}
> +    "copies": [{"new": {"path": "e"}, "old": {"path": "dir/b"}}]
>     }
>    ]

Also, {"path": ..} is inconsistent because:

 - an item of "files" isn't wrapped by {"path": ..}
 - it is an absolute (repository-relative) path


More information about the Mercurial-devel mailing list