tests/test-diffstat.t
author Mads Kiilerich <mads@kiilerich.com>
Fri, 26 Aug 2011 16:23:35 +0200
branchstable
changeset 15055 d629f1e89021
parent 14437 cbe13e6bdc34
child 15363 628a4a9e411d
permissions -rw-r--r--
subrepo: fix cloning of repos from urls without slash after host (issue2970) This fixes a regression introduced with the new url handling in 1.9. This should perhaps be fixed in the url class instead, but that might be too invasive for a stable bugfix.

  $ hg init repo
  $ cd repo
  $ i=0; while [ "$i" -lt 213 ]; do echo a >> a; i=`expr $i + 1`; done
  $ hg add a
  $ cp a b
  $ hg add b

Wide diffstat:

  $ hg diff --stat
   a |  213 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   b |  213 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   2 files changed, 426 insertions(+), 0 deletions(-)

diffstat width:

  $ COLUMNS=24 hg diff --config ui.interactive=true --stat
   a |  213 ++++++++++++++
   b |  213 ++++++++++++++
   2 files changed, 426 insertions(+), 0 deletions(-)

  $ hg ci -m adda

  $ cat >> a <<EOF
  > a
  > a
  > a
  > EOF

Narrow diffstat:

  $ hg diff --stat
   a |  3 +++
   1 files changed, 3 insertions(+), 0 deletions(-)

  $ hg ci -m appenda

  $ printf '\0' > c
  $ hg add c

Binary diffstat:

  $ hg diff --stat
   c |    0 
   1 files changed, 0 insertions(+), 0 deletions(-)

Binary git diffstat:

  $ hg diff --stat --git
   c |  Bin 
   1 files changed, 0 insertions(+), 0 deletions(-)

  $ hg ci -m createb

  $ printf '\0' > "file with spaces"
  $ hg add "file with spaces"

Filename with spaces diffstat:

  $ hg diff --stat
   file with spaces |    0 
   1 files changed, 0 insertions(+), 0 deletions(-)

Filename with spaces git diffstat:

  $ hg diff --stat --git
   file with spaces |  Bin 
   1 files changed, 0 insertions(+), 0 deletions(-)