diff: add --stat for diffstat output
diff/qdiff --stat invokes patch.diffstat() on the diff output.
When in interactive mode, the output's maximum width is determined by the
terminal's width.
#!/bin/sh
echo "[extensions]" >> $HGRCPATH
echo "hgk=" >> $HGRCPATH
hg init repo
cd repo
echo a > a
hg ci -Am adda
hg debug-cat-file commit 0