##// END OF EJS Templates
tests: unify test-diffstat
Adrian Buehlmann -
r12147:2b171fe3 default
parent child Browse files
Show More
@@ -1,34 +1,48 b''
1 #!/bin/sh
1 $ hg init repo
2 $ cd repo
3 $ i=0; while [ "$i" -lt 213 ]; do echo a >> a; i=`expr $i + 1`; done
4 $ hg add a
2
5
3 hg init repo
6 Wide diffstat:
4 cd repo
5 i=0; while [ "$i" -lt 213 ]; do echo a >> a; i=`expr $i + 1`; done
6 hg add a
7
7
8 echo '% wide diffstat'
8 $ hg diff --stat
9 hg diff --stat
9 a | 213 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
10 1 files changed, 213 insertions(+), 0 deletions(-)
11
12 diffstat width:
10
13
11 echo '% diffstat width'
14 $ COLUMNS=24 hg diff --config ui.interactive=true --stat
12 COLUMNS=24 hg diff --config ui.interactive=true --stat
15 a | 213 ++++++++++++++
16 1 files changed, 213 insertions(+), 0 deletions(-)
13
17
14 hg ci -m adda
18 $ hg ci -m adda
15
19
16 cat >> a <<EOF
20 $ cat >> a <<EOF
17 a
21 > a
18 a
22 > a
19 a
23 > a
20 EOF
24 > EOF
21
25
22 echo '% narrow diffstat'
26 Narrow diffstat:
23 hg diff --stat
27
28 $ hg diff --stat
29 a | 3 +++
30 1 files changed, 3 insertions(+), 0 deletions(-)
31
32 $ hg ci -m appenda
24
33
25 hg ci -m appenda
34 $ printf '\0' > b
35 $ hg add b
26
36
27 printf '\0' > b
37 Binary diffstat:
28 hg add b
29
38
30 echo '% binary diffstat'
39 $ hg diff --stat
31 hg diff --stat
40 b | 0
41 1 files changed, 0 insertions(+), 0 deletions(-)
32
42
33 echo '% binary git diffstat'
43 Binary git diffstat:
34 hg diff --stat --git
44
45 $ hg diff --stat --git
46 b | Bin
47 1 files changed, 0 insertions(+), 0 deletions(-)
48
1 NO CONTENT: file was removed
NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now