diff mercurial/filesetlang.py @ 43101:1d12ae5096d1

formatter: map -Tjson(...) and -Tcbor(...) to templater Even though custom JSON output could be generated by using --config template.json="{dict(...)|json}" ..., doing that is tedious because of the trailing comma handling. This patch introduces special syntax for JSON/CBOR formats. -Tjson(...) is translated to template as if function-style template definition were supported: [templates] json(...) = "{dict(...)|json}" json(...):docheader = "[\n " json(...):docfooter = "\n]\n" json(...):separator = ",\n "
author Yuya Nishihara <yuya@tcha.org>
date Sat, 05 Oct 2019 23:30:09 -0400
parents c59eb1560c44
children d4ba4d51f85f
line wrap: on
line diff