diffstat: made test case work with POSIX sh and printf
* arithmetic expression ((...)), without $, is bashism.
* printf '\xXX' seems non-standard. '\0' is okay.
http://www.opengroup.org/onlinepubs/009695399/utilities/printf.html
tested with bash 4.0 and dash 0.5.5.1
#!/bin/sh
hg init repo
cd repo
i=0; while [ "$i" -lt 213 ]; do echo a >> a; i=$(($i + 1)); done
hg add a
echo '% wide diffstat'
hg diff --stat
echo '% diffstat width'
COLUMNS=24 hg diff --config ui.interactive=true --stat
hg ci -m adda
cat >> a <<EOF
a
a
a
EOF
echo '% narrow diffstat'
hg diff --stat
hg ci -m appenda
printf '\0' > b
hg add b
echo '% binary diffstat'
hg diff --stat
echo '% binary git diffstat'
hg diff --stat --git