diff mercurial/logcmdutil.py @ 41996:77ef3498ceb3

template: add CBOR output format The whole output is wrapped as an array just like the other serialization formats. It's an indefinite-length array since the size is unknown while encoding. Maybe we can add 'cbor-stream' (and 'pickle-stream') as needed.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 10 Mar 2019 12:57:24 +0900
parents db69a763bc89
children db26dbbee74d
line wrap: on
line diff
--- a/mercurial/logcmdutil.py	Tue Mar 19 23:00:07 2019 -0700
+++ b/mercurial/logcmdutil.py	Sun Mar 10 12:57:24 2019 +0900
@@ -542,7 +542,7 @@
     regular display via changesetprinter() is done.
     """
     postargs = (differ, opts, buffered)
-    if opts.get('template') == 'json':
+    if opts.get('template') in {'cbor', 'json'}:
         fm = ui.formatter('log', opts)
         return changesetformatter(ui, repo, fm, *postargs)