Show More
@@ -1,107 +1,107 b'' | |||||
1 | $ hg init repo |
|
1 | $ hg init repo | |
2 | $ cd repo |
|
2 | $ cd repo | |
3 | $ i=0; while [ "$i" -lt 213 ]; do echo a >> a; i=`expr $i + 1`; done |
|
3 | $ i=0; while [ "$i" -lt 213 ]; do echo a >> a; i=`expr $i + 1`; done | |
4 | $ hg add a |
|
4 | $ hg add a | |
5 | $ cp a b |
|
5 | $ cp a b | |
6 | $ hg add b |
|
6 | $ hg add b | |
7 |
|
7 | |||
8 | Wide diffstat: |
|
8 | Wide diffstat: | |
9 |
|
9 | |||
10 | $ hg diff --stat |
|
10 | $ hg diff --stat | |
11 | a | 213 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|
11 | a | 213 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
12 | b | 213 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|
12 | b | 213 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
13 | 2 files changed, 426 insertions(+), 0 deletions(-) |
|
13 | 2 files changed, 426 insertions(+), 0 deletions(-) | |
14 |
|
14 | |||
15 | diffstat width: |
|
15 | diffstat width: | |
16 |
|
16 | |||
17 | $ COLUMNS=24 hg diff --config ui.interactive=true --stat |
|
17 | $ COLUMNS=24 hg diff --config ui.interactive=true --stat | |
18 | a | 213 ++++++++++++++ |
|
18 | a | 213 ++++++++++++++ | |
19 | b | 213 ++++++++++++++ |
|
19 | b | 213 ++++++++++++++ | |
20 | 2 files changed, 426 insertions(+), 0 deletions(-) |
|
20 | 2 files changed, 426 insertions(+), 0 deletions(-) | |
21 |
|
21 | |||
22 | $ hg ci -m adda |
|
22 | $ hg ci -m adda | |
23 |
|
23 | |||
24 | $ cat >> a <<EOF |
|
24 | $ cat >> a <<EOF | |
25 | > a |
|
25 | > a | |
26 | > a |
|
26 | > a | |
27 | > a |
|
27 | > a | |
28 | > EOF |
|
28 | > EOF | |
29 |
|
29 | |||
30 | Narrow diffstat: |
|
30 | Narrow diffstat: | |
31 |
|
31 | |||
32 | $ hg diff --stat |
|
32 | $ hg diff --stat | |
33 | a | 3 +++ |
|
33 | a | 3 +++ | |
34 | 1 files changed, 3 insertions(+), 0 deletions(-) |
|
34 | 1 files changed, 3 insertions(+), 0 deletions(-) | |
35 |
|
35 | |||
36 | $ hg ci -m appenda |
|
36 | $ hg ci -m appenda | |
37 |
|
37 | |||
38 | >>> open("c", "wb").write("\0") |
|
38 | >>> open("c", "wb").write("\0") | |
39 | $ touch d |
|
39 | $ touch d | |
40 | $ hg add c d |
|
40 | $ hg add c d | |
41 |
|
41 | |||
42 | Binary diffstat: |
|
42 | Binary diffstat: | |
43 |
|
43 | |||
44 | $ hg diff --stat |
|
44 | $ hg diff --stat | |
45 | c | Bin |
|
45 | c | Bin | |
46 | 1 files changed, 0 insertions(+), 0 deletions(-) |
|
46 | 1 files changed, 0 insertions(+), 0 deletions(-) | |
47 |
|
47 | |||
48 | Binary git diffstat: |
|
48 | Binary git diffstat: | |
49 |
|
49 | |||
50 | $ hg diff --stat --git |
|
50 | $ hg diff --stat --git | |
51 | c | Bin |
|
51 | c | Bin | |
52 | d | 0 |
|
52 | d | 0 | |
53 | 2 files changed, 0 insertions(+), 0 deletions(-) |
|
53 | 2 files changed, 0 insertions(+), 0 deletions(-) | |
54 |
|
54 | |||
55 | $ hg ci -m createb |
|
55 | $ hg ci -m createb | |
56 |
|
56 | |||
57 | >>> open("file with spaces", "wb").write("\0") |
|
57 | >>> open("file with spaces", "wb").write("\0") | |
58 | $ hg add "file with spaces" |
|
58 | $ hg add "file with spaces" | |
59 |
|
59 | |||
60 | Filename with spaces diffstat: |
|
60 | Filename with spaces diffstat: | |
61 |
|
61 | |||
62 | $ hg diff --stat |
|
62 | $ hg diff --stat | |
63 | file with spaces | Bin |
|
63 | file with spaces | Bin | |
64 | 1 files changed, 0 insertions(+), 0 deletions(-) |
|
64 | 1 files changed, 0 insertions(+), 0 deletions(-) | |
65 |
|
65 | |||
66 | Filename with spaces git diffstat: |
|
66 | Filename with spaces git diffstat: | |
67 |
|
67 | |||
68 | $ hg diff --stat --git |
|
68 | $ hg diff --stat --git | |
69 | file with spaces | Bin |
|
69 | file with spaces | Bin | |
70 | 1 files changed, 0 insertions(+), 0 deletions(-) |
|
70 | 1 files changed, 0 insertions(+), 0 deletions(-) | |
71 |
|
71 | |||
72 | diffstat within directories: |
|
72 | diffstat within directories: | |
73 |
|
73 | |||
74 | $ hg rm -f 'file with spaces' |
|
74 | $ hg rm -f 'file with spaces' | |
75 |
|
75 | |||
76 | $ mkdir dir1 dir2 |
|
76 | $ mkdir dir1 dir2 | |
77 | $ echo new1 > dir1/new |
|
77 | $ echo new1 > dir1/new | |
78 | $ echo new2 > dir2/new |
|
78 | $ echo new2 > dir2/new | |
79 | $ hg add dir1/new dir2/new |
|
79 | $ hg add dir1/new dir2/new | |
80 | $ hg diff --stat |
|
80 | $ hg diff --stat | |
81 | dir1/new | 1 + |
|
81 | dir1/new | 1 + | |
82 | dir2/new | 1 + |
|
82 | dir2/new | 1 + | |
83 | 2 files changed, 2 insertions(+), 0 deletions(-) |
|
83 | 2 files changed, 2 insertions(+), 0 deletions(-) | |
84 |
|
84 | |||
85 | $ hg diff --stat --root dir1 |
|
85 | $ hg diff --stat --root dir1 | |
86 | new | 1 + |
|
86 | new | 1 + | |
87 | 1 files changed, 1 insertions(+), 0 deletions(-) |
|
87 | 1 files changed, 1 insertions(+), 0 deletions(-) | |
88 |
|
88 | |||
89 | $ hg diff --stat --root dir1 dir2 |
|
89 | $ hg diff --stat --root dir1 dir2 | |
90 | warning: dir2 not inside relative root dir1 |
|
90 | warning: dir2 not inside relative root dir1 | |
91 |
|
91 | |||
92 | $ hg diff --stat --root dir1 -I dir1/old |
|
92 | $ hg diff --stat --root dir1 -I dir1/old | |
93 |
|
93 | |||
94 | $ cd dir1 |
|
94 | $ cd dir1 | |
95 | $ hg diff --stat . |
|
95 | $ hg diff --stat . | |
96 | dir1/new | 1 + |
|
96 | dir1/new | 1 + | |
97 | 1 files changed, 1 insertions(+), 0 deletions(-) |
|
97 | 1 files changed, 1 insertions(+), 0 deletions(-) | |
98 | $ hg diff --stat --root . |
|
98 | $ hg diff --stat --root . | |
99 | new | 1 + |
|
99 | new | 1 + | |
100 | 1 files changed, 1 insertions(+), 0 deletions(-) |
|
100 | 1 files changed, 1 insertions(+), 0 deletions(-) | |
101 |
|
101 | |||
102 | $ hg diff --stat --root ../dir1 ../dir2 |
|
102 | $ hg diff --stat --root ../dir1 ../dir2 | |
103 | warning: ../dir2 not inside relative root . |
|
103 | warning: ../dir2 not inside relative root . (glob) | |
104 |
|
104 | |||
105 | $ hg diff --stat --root . -I old |
|
105 | $ hg diff --stat --root . -I old | |
106 |
|
106 | |||
107 | $ cd .. |
|
107 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now