Crie um resumo do changeset do Mercurial no formato JSON

#!/bin/bash

OUT
="changesets.json"

echo
"[" > $OUT
hg log
|
grep
"^changeset:" |
sed
's/changeset.*:/ "/g' |
sed
's/$/",/g' |
sed
'$s/,$//' >> $OUT
echo
']' >> $OUT