Show More
@@ -1,81 +1,141 b'' | |||
|
1 | #!/bin/sh | |
|
1 | $ echo "[extensions]" >> $HGRCPATH | |
|
2 | $ echo "churn=" >> $HGRCPATH | |
|
3 | ||
|
4 | create test repository | |
|
2 | 5 | |
|
3 | echo "[extensions]" >> $HGRCPATH | |
|
4 | echo "churn=" >> $HGRCPATH | |
|
6 | $ hg init repo | |
|
7 | $ cd repo | |
|
8 | $ echo a > a | |
|
9 | $ hg ci -Am adda -u user1 -d 6:00 | |
|
10 | adding a | |
|
11 | $ echo b >> a | |
|
12 | $ echo b > b | |
|
13 | $ hg ci -m changeba -u user2 -d 9:00 a | |
|
14 | $ hg ci -Am addb -u user2 -d 9:30 | |
|
15 | adding b | |
|
16 | $ echo c >> a | |
|
17 | $ echo c >> b | |
|
18 | $ echo c > c | |
|
19 | $ hg ci -m changeca -u user3 -d 12:00 a | |
|
20 | $ hg ci -m changecb -u user3 -d 12:15 b | |
|
21 | $ hg ci -Am addc -u user3 -d 12:30 | |
|
22 | adding c | |
|
23 | $ mkdir -p d/e | |
|
24 | $ echo abc > d/e/f1.txt | |
|
25 | $ hg ci -Am "add d/e/f1.txt" -u user1 -d 12:45 d/e/f1.txt | |
|
26 | $ mkdir -p d/g | |
|
27 | $ echo def > d/g/f2.txt | |
|
28 | $ hg ci -Am "add d/g/f2.txt" -u user1 -d 13:00 d/g/f2.txt | |
|
29 | ||
|
30 | ||
|
31 | churn separate directories | |
|
5 | 32 | |
|
6 | echo % create test repository | |
|
7 | hg init repo | |
|
8 | cd repo | |
|
9 | echo a > a | |
|
10 | hg ci -Am adda -u user1 -d 6:00 | |
|
11 | echo b >> a | |
|
12 | echo b > b | |
|
13 | hg ci -m changeba -u user2 -d 9:00 a | |
|
14 | hg ci -Am addb -u user2 -d 9:30 | |
|
15 | echo c >> a | |
|
16 | echo c >> b | |
|
17 | echo c > c | |
|
18 | hg ci -m changeca -u user3 -d 12:00 a | |
|
19 | hg ci -m changecb -u user3 -d 12:15 b | |
|
20 | hg ci -Am addc -u user3 -d 12:30 | |
|
21 | mkdir -p d/e | |
|
22 | echo abc > d/e/f1.txt | |
|
23 | hg ci -Am "add d/e/f1.txt" -u user1 -d 12:45 d/e/f1.txt | |
|
24 | mkdir -p d/g | |
|
25 | echo def > d/g/f2.txt | |
|
26 | hg ci -Am "add d/g/f2.txt" -u user1 -d 13:00 d/g/f2.txt | |
|
33 | $ cd d | |
|
34 | $ hg churn e | |
|
35 | user1 1 *************************************************************** | |
|
36 | ||
|
37 | churn all | |
|
38 | ||
|
39 | $ hg churn | |
|
40 | user3 3 *************************************************************** | |
|
41 | user1 3 *************************************************************** | |
|
42 | user2 2 ****************************************** | |
|
43 | ||
|
44 | churn excluding one dir | |
|
27 | 45 | |
|
28 | echo % churn separate directories | |
|
29 | cd d | |
|
30 | hg churn e | |
|
31 | echo % churn all | |
|
32 | hg churn | |
|
33 | echo % churn excluding one dir | |
|
34 | hg churn -X e | |
|
35 | echo % churn up to rev 2 | |
|
36 | hg churn -r :2 | |
|
37 | cd .. | |
|
38 | echo % churn with aliases | |
|
39 | cat > ../aliases <<EOF | |
|
40 | user1 alias1 | |
|
46 | $ hg churn -X e | |
|
47 | user3 3 *************************************************************** | |
|
48 | user2 2 ****************************************** | |
|
49 | user1 2 ****************************************** | |
|
50 | ||
|
51 | churn up to rev 2 | |
|
52 | ||
|
53 | $ hg churn -r :2 | |
|
54 | user2 2 *************************************************************** | |
|
55 | user1 1 ******************************** | |
|
56 | $ cd .. | |
|
57 | ||
|
58 | churn with aliases | |
|
59 | ||
|
60 | $ cat > ../aliases <<EOF | |
|
61 | > user1 alias1 | |
|
62 | > user3 alias3 | |
|
63 | > not-an-alias | |
|
64 | > EOF | |
|
65 | ||
|
66 | churn with .hgchurn | |
|
41 | 67 | |
|
42 | user3 alias3 | |
|
43 | not-an-alias | |
|
44 | EOF | |
|
45 | hg churn --aliases ../aliases | |
|
46 | echo % churn with .hgchurn | |
|
47 | mv ../aliases .hgchurn | |
|
48 |
hg |
|
|
49 | rm .hgchurn | |
|
50 |
|
|
|
51 | COLUMNS=40 hg churn | |
|
52 | echo % churn by hour | |
|
53 | hg churn -f '%H' -s | |
|
68 | $ mv ../aliases .hgchurn | |
|
69 | $ hg churn | |
|
70 | skipping malformed alias: not-an-alias | |
|
71 | alias3 3 ************************************************************** | |
|
72 | alias1 3 ************************************************************** | |
|
73 | user2 2 ***************************************** | |
|
74 | $ rm .hgchurn | |
|
75 | ||
|
76 | churn with column specifier | |
|
77 | ||
|
78 | $ COLUMNS=40 hg churn | |
|
79 | user3 3 *********************** | |
|
80 | user1 3 *********************** | |
|
81 | user2 2 *************** | |
|
82 | ||
|
83 | churn by hour | |
|
84 | ||
|
85 | $ hg churn -f '%H' -s | |
|
86 | 06 1 ***************** | |
|
87 | 09 2 ********************************* | |
|
88 | 12 4 ****************************************************************** | |
|
89 | 13 1 ***************** | |
|
90 | ||
|
91 | ||
|
92 | churn with separated added/removed lines | |
|
93 | ||
|
94 | $ hg rm d/g/f2.txt | |
|
95 | $ hg ci -Am "removed d/g/f2.txt" -u user1 -d 14:00 d/g/f2.txt | |
|
96 | $ hg churn --diffstat | |
|
97 | user1 +3/-1 +++++++++++++++++++++++++++++++++++++++++-------------- | |
|
98 | user3 +3/-0 +++++++++++++++++++++++++++++++++++++++++ | |
|
99 | user2 +2/-0 +++++++++++++++++++++++++++ | |
|
100 | ||
|
101 | churn --diffstat with color | |
|
54 | 102 | |
|
55 | echo % churn with separated added/removed lines | |
|
56 | hg rm d/g/f2.txt | |
|
57 | hg ci -Am "removed d/g/f2.txt" -u user1 -d 14:00 d/g/f2.txt | |
|
58 | hg churn --diffstat | |
|
59 | echo % churn --diffstat with color | |
|
60 | hg --config extensions.color= churn --config color.mode=ansi \ | |
|
61 | --diffstat --color=always | |
|
103 | $ hg --config extensions.color= churn --config color.mode=ansi \ | |
|
104 | > --diffstat --color=always | |
|
105 | user1 +3/-1 [0;32m+++++++++++++++++++++++++++++++++++++++++[0m[0;31m--------------[0m | |
|
106 | user3 +3/-0 [0;32m+++++++++++++++++++++++++++++++++++++++++[0m | |
|
107 | user2 +2/-0 [0;32m+++++++++++++++++++++++++++[0m | |
|
108 | ||
|
109 | ||
|
110 | changeset number churn | |
|
62 | 111 | |
|
63 | echo % changeset number churn | |
|
64 | hg churn -c | |
|
112 | $ hg churn -c | |
|
113 | user1 4 *************************************************************** | |
|
114 | user3 3 *********************************************** | |
|
115 | user2 2 ******************************** | |
|
116 | ||
|
117 | $ echo 'with space = no-space' >> ../aliases | |
|
118 | $ echo a >> a | |
|
119 | $ hg commit -m a -u 'with space' -d 15:00 | |
|
120 | ||
|
121 | churn with space in alias | |
|
65 | 122 | |
|
66 | echo 'with space = no-space' >> ../aliases | |
|
67 | echo a >> a | |
|
68 | hg commit -m a -u 'with space' -d 15:00 | |
|
69 | echo % churn with space in alias | |
|
70 | hg churn --aliases ../aliases -r tip | |
|
123 | $ hg churn --aliases ../aliases -r tip | |
|
124 | no-space 1 ************************************************************ | |
|
71 | 125 | |
|
72 | cd .. | |
|
126 | $ cd .. | |
|
127 | ||
|
128 | ||
|
129 | issue 833: ZeroDivisionError | |
|
73 | 130 | |
|
74 | # issue 833: ZeroDivisionError | |
|
75 |
|
|
|
76 | cd issue-833 | |
|
77 | touch foo | |
|
78 | hg ci -Am foo | |
|
79 | # this was failing with a ZeroDivisionError | |
|
80 | hg churn | |
|
81 | cd .. | |
|
131 | $ hg init issue-833 | |
|
132 | $ cd issue-833 | |
|
133 | $ touch foo | |
|
134 | $ hg ci -Am foo | |
|
135 | adding foo | |
|
136 | ||
|
137 | this was failing with a ZeroDivisionError | |
|
138 | ||
|
139 | $ hg churn | |
|
140 | test 0 | |
|
141 | $ cd .. |
|
1 | NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now