Mercurial > hg
view tests/test-diffstat @ 9640:9e76232fbfbe
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.
author | Brodie Rao <me+hg@dackz.net> |
---|---|
date | Sun, 25 Oct 2009 02:52:35 +0200 |
parents | |
children | 7d17794f08a9 |
line wrap: on
line source
#!/bin/sh hg init repo cd repo i=0; while (( $i < 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 '%b' '\x00' > b hg add b echo '% binary diffstat' hg diff --stat