##// END OF EJS Templates
Fix default style so 'log --copies' has a start and an end.
Greg Ward -
r10776:08870cf7 stable
parent child Browse files
Show More
@@ -1,24 +1,24
1 1 changeset = 'changeset: {rev}:{node|short}\n{branches}{tags}{parents}user: {author}\ndate: {date|date}\nsummary: {desc|firstline}\n\n'
2 2 changeset_quiet = '{rev}:{node|short}\n'
3 3 changeset_verbose = 'changeset: {rev}:{node|short}\n{branches}{tags}{parents}user: {author}\ndate: {date|date}\n{files}{file_copies_switch}description:\n{desc|strip}\n\n\n'
4 4 changeset_debug = 'changeset: {rev}:{node}\n{branches}{tags}{parents}{manifest}user: {author}\ndate: {date|date}\n{file_mods}{file_adds}{file_dels}{file_copies_switch}{extras}description:\n{desc|strip}\n\n\n'
5 5 start_files = 'files: '
6 6 file = ' {file}'
7 7 end_files = '\n'
8 8 start_file_mods = 'files: '
9 9 file_mod = ' {file_mod}'
10 10 end_file_mods = '\n'
11 11 start_file_adds = 'files+: '
12 12 file_add = ' {file_add}'
13 13 end_file_adds = '\n'
14 14 start_file_dels = 'files-: '
15 15 file_del = ' {file_del}'
16 16 end_file_dels = '\n'
17 start_file_copies_switch = 'copies: '
17 start_file_copies = 'copies: '
18 18 file_copy = ' {name} ({source})'
19 end_file_copies_switch = '\n'
19 end_file_copies = '\n'
20 20 parent = 'parent: {rev}:{node|formatnode}\n'
21 21 manifest = 'manifest: {rev}:{node}\n'
22 22 branch = 'branch: {branch}\n'
23 23 tag = 'tag: {tag}\n'
24 24 extra = 'extra: {key}={value|stringescape}\n'
@@ -1,131 +1,135
1 1 #!/bin/sh
2 2
3 3 hg init a
4 4
5 5 cd a
6 6 echo a > a
7 7 hg ci -Ama -d '1 0'
8 8
9 9 hg cp a b
10 10 hg ci -mb -d '2 0'
11 11
12 12 mkdir dir
13 13 hg mv b dir
14 14 hg ci -mc -d '3 0'
15 15
16 16 hg mv a b
17 17 echo a > d
18 18 hg add d
19 19 hg ci -md -d '4 0'
20 20
21 21 hg mv dir/b e
22 22 hg ci -me -d '5 0'
23 23
24 24 hg log a
25 25 echo % -f, directory
26 26 hg log -f dir
27 27 echo % -f, but no args
28 28 hg log -f
29 29 echo % one rename
30 30 hg log -vf a
31 31 echo % many renames
32 32 hg log -vf e
33 33
34 34 echo '% log copies with --copies'
35 35 hg log -vC --template '{rev} {file_copies}\n'
36 36 echo '% log copies switch without --copies, with old filecopy template'
37 37 hg log -v --template '{rev} {file_copies_switch%filecopy}\n'
38 38 echo '% log copies switch with --copies'
39 39 hg log -vC --template '{rev} {file_copies_switch}\n'
40 40
41 echo '% log copies with hardcoded style and with --style=default'
42 hg log -vC -r4
43 hg log -vC -r4 --style=default
44
41 45 echo % log copies, non-linear manifest
42 46 hg up -C 3
43 47 hg mv dir/b e
44 48 echo foo > foo
45 49 hg ci -Ame2 -d '6 0'
46 50 hg log -v --template '{rev} {file_copies}\n' -r 5
47 51
48 52 echo % log copies, execute bit set
49 53 chmod +x e
50 54 hg ci -me3 -d '7 0'
51 55 hg log -v --template '{rev} {file_copies}\n' -r 6
52 56
53 57 echo '% log -p d'
54 58 hg log -pv d
55 59
56 60 # log --follow tests
57 61 hg init ../follow
58 62 cd ../follow
59 63
60 64 echo base > base
61 65 hg ci -Ambase -d '1 0'
62 66
63 67 echo r1 >> base
64 68 hg ci -Amr1 -d '1 0'
65 69 echo r2 >> base
66 70 hg ci -Amr2 -d '1 0'
67 71
68 72 hg up -C 1
69 73 echo b1 > b1
70 74 hg ci -Amb1 -d '1 0'
71 75
72 76 echo % log -f
73 77 hg log -f
74 78
75 79 hg up -C 0
76 80 echo b2 > b2
77 81 hg ci -Amb2 -d '1 0'
78 82
79 83 echo % log -f -r 1:tip
80 84 hg log -f -r 1:tip
81 85
82 86 hg up -C 3
83 87 hg merge tip
84 88
85 89 echo % log -r . with two parents
86 90 hg log -r .
87 91
88 92 hg ci -mm12 -d '1 0'
89 93
90 94 echo % log -r . with one parent
91 95 hg log -r .
92 96
93 97 echo postm >> b1
94 98 hg ci -Amb1.1 -d'1 0'
95 99
96 100 echo % log --follow-first
97 101 hg log --follow-first
98 102
99 103 echo % log -P 2
100 104 hg log -P 2
101 105
102 106 echo '% log -r tip -p --git'
103 107 hg log -r tip -p --git
104 108
105 109 echo '% log -r ""'
106 110 hg log -r ''
107 111
108 112 echo '% log -r <some unknown node id>'
109 113 hg log -r 1000000000000000000000000000000000000000
110 114
111 115 echo '% log -k r1'
112 116 hg log -k r1
113 117
114 118 echo '% log -d -1'
115 119 hg log -d -1
116 120
117 121 cd ..
118 122
119 123 hg init usertest
120 124 cd usertest
121 125
122 126 echo a > a
123 127 hg ci -A -m "a" -u "User One <user1@example.org>"
124 128 echo b > b
125 129 hg ci -A -m "b" -u "User Two <user2@example.org>"
126 130
127 131 hg log -u "User One <user1@example.org>"
128 132 hg log -u "user1" -u "user2"
129 133 hg log -u "user3"
130 134
131 135 exit 0
@@ -1,278 +1,299
1 1 adding a
2 2 changeset: 0:8580ff50825a
3 3 user: test
4 4 date: Thu Jan 01 00:00:01 1970 +0000
5 5 summary: a
6 6
7 7 % -f, directory
8 8 abort: cannot follow nonexistent file: "dir"
9 9 % -f, but no args
10 10 changeset: 4:66c1345dc4f9
11 11 tag: tip
12 12 user: test
13 13 date: Thu Jan 01 00:00:05 1970 +0000
14 14 summary: e
15 15
16 16 changeset: 3:7c6c671bb7cc
17 17 user: test
18 18 date: Thu Jan 01 00:00:04 1970 +0000
19 19 summary: d
20 20
21 21 changeset: 2:41dd4284081e
22 22 user: test
23 23 date: Thu Jan 01 00:00:03 1970 +0000
24 24 summary: c
25 25
26 26 changeset: 1:784de7cef101
27 27 user: test
28 28 date: Thu Jan 01 00:00:02 1970 +0000
29 29 summary: b
30 30
31 31 changeset: 0:8580ff50825a
32 32 user: test
33 33 date: Thu Jan 01 00:00:01 1970 +0000
34 34 summary: a
35 35
36 36 % one rename
37 37 changeset: 0:8580ff50825a
38 38 user: test
39 39 date: Thu Jan 01 00:00:01 1970 +0000
40 40 files: a
41 41 description:
42 42 a
43 43
44 44
45 45 % many renames
46 46 changeset: 4:66c1345dc4f9
47 47 tag: tip
48 48 user: test
49 49 date: Thu Jan 01 00:00:05 1970 +0000
50 50 files: dir/b e
51 51 description:
52 52 e
53 53
54 54
55 55 changeset: 2:41dd4284081e
56 56 user: test
57 57 date: Thu Jan 01 00:00:03 1970 +0000
58 58 files: b dir/b
59 59 description:
60 60 c
61 61
62 62
63 63 changeset: 1:784de7cef101
64 64 user: test
65 65 date: Thu Jan 01 00:00:02 1970 +0000
66 66 files: b
67 67 description:
68 68 b
69 69
70 70
71 71 changeset: 0:8580ff50825a
72 72 user: test
73 73 date: Thu Jan 01 00:00:01 1970 +0000
74 74 files: a
75 75 description:
76 76 a
77 77
78 78
79 79 % log copies with --copies
80 80 4 e (dir/b)
81 81 3 b (a)
82 82 2 dir/b (b)
83 83 1 b (a)
84 84 0
85 85 % log copies switch without --copies, with old filecopy template
86 86 4
87 87 3
88 88 2
89 89 1
90 90 0
91 91 % log copies switch with --copies
92 92 4 e (dir/b)
93 93 3 b (a)
94 94 2 dir/b (b)
95 95 1 b (a)
96 96 0
97 % log copies with hardcoded style and with --style=default
98 changeset: 4:66c1345dc4f9
99 tag: tip
100 user: test
101 date: Thu Jan 01 00:00:05 1970 +0000
102 files: dir/b e
103 copies: e (dir/b)
104 description:
105 e
106
107
108 changeset: 4:66c1345dc4f9
109 tag: tip
110 user: test
111 date: Thu Jan 01 00:00:05 1970 +0000
112 files: dir/b e
113 copies: e (dir/b)
114 description:
115 e
116
117
97 118 % log copies, non-linear manifest
98 119 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
99 120 adding foo
100 121 created new head
101 122 5 e (dir/b)
102 123 % log copies, execute bit set
103 124 6
104 125 % log -p d
105 126 changeset: 3:7c6c671bb7cc
106 127 user: test
107 128 date: Thu Jan 01 00:00:04 1970 +0000
108 129 files: a b d
109 130 description:
110 131 d
111 132
112 133
113 134 diff -r 41dd4284081e -r 7c6c671bb7cc d
114 135 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
115 136 +++ b/d Thu Jan 01 00:00:04 1970 +0000
116 137 @@ -0,0 +1,1 @@
117 138 +a
118 139
119 140 adding base
120 141 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
121 142 adding b1
122 143 created new head
123 144 % log -f
124 145 changeset: 3:e62f78d544b4
125 146 tag: tip
126 147 parent: 1:3d5bf5654eda
127 148 user: test
128 149 date: Thu Jan 01 00:00:01 1970 +0000
129 150 summary: b1
130 151
131 152 changeset: 1:3d5bf5654eda
132 153 user: test
133 154 date: Thu Jan 01 00:00:01 1970 +0000
134 155 summary: r1
135 156
136 157 changeset: 0:67e992f2c4f3
137 158 user: test
138 159 date: Thu Jan 01 00:00:01 1970 +0000
139 160 summary: base
140 161
141 162 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
142 163 adding b2
143 164 created new head
144 165 % log -f -r 1:tip
145 166 changeset: 1:3d5bf5654eda
146 167 user: test
147 168 date: Thu Jan 01 00:00:01 1970 +0000
148 169 summary: r1
149 170
150 171 changeset: 2:60c670bf5b30
151 172 user: test
152 173 date: Thu Jan 01 00:00:01 1970 +0000
153 174 summary: r2
154 175
155 176 changeset: 3:e62f78d544b4
156 177 parent: 1:3d5bf5654eda
157 178 user: test
158 179 date: Thu Jan 01 00:00:01 1970 +0000
159 180 summary: b1
160 181
161 182 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
162 183 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
163 184 (branch merge, don't forget to commit)
164 185 % log -r . with two parents
165 186 changeset: 3:e62f78d544b4
166 187 parent: 1:3d5bf5654eda
167 188 user: test
168 189 date: Thu Jan 01 00:00:01 1970 +0000
169 190 summary: b1
170 191
171 192 % log -r . with one parent
172 193 changeset: 5:302e9dd6890d
173 194 tag: tip
174 195 parent: 3:e62f78d544b4
175 196 parent: 4:ddb82e70d1a1
176 197 user: test
177 198 date: Thu Jan 01 00:00:01 1970 +0000
178 199 summary: m12
179 200
180 201 % log --follow-first
181 202 changeset: 6:2404bbcab562
182 203 tag: tip
183 204 user: test
184 205 date: Thu Jan 01 00:00:01 1970 +0000
185 206 summary: b1.1
186 207
187 208 changeset: 5:302e9dd6890d
188 209 parent: 3:e62f78d544b4
189 210 parent: 4:ddb82e70d1a1
190 211 user: test
191 212 date: Thu Jan 01 00:00:01 1970 +0000
192 213 summary: m12
193 214
194 215 changeset: 3:e62f78d544b4
195 216 parent: 1:3d5bf5654eda
196 217 user: test
197 218 date: Thu Jan 01 00:00:01 1970 +0000
198 219 summary: b1
199 220
200 221 changeset: 1:3d5bf5654eda
201 222 user: test
202 223 date: Thu Jan 01 00:00:01 1970 +0000
203 224 summary: r1
204 225
205 226 changeset: 0:67e992f2c4f3
206 227 user: test
207 228 date: Thu Jan 01 00:00:01 1970 +0000
208 229 summary: base
209 230
210 231 % log -P 2
211 232 changeset: 6:2404bbcab562
212 233 tag: tip
213 234 user: test
214 235 date: Thu Jan 01 00:00:01 1970 +0000
215 236 summary: b1.1
216 237
217 238 changeset: 5:302e9dd6890d
218 239 parent: 3:e62f78d544b4
219 240 parent: 4:ddb82e70d1a1
220 241 user: test
221 242 date: Thu Jan 01 00:00:01 1970 +0000
222 243 summary: m12
223 244
224 245 changeset: 4:ddb82e70d1a1
225 246 parent: 0:67e992f2c4f3
226 247 user: test
227 248 date: Thu Jan 01 00:00:01 1970 +0000
228 249 summary: b2
229 250
230 251 changeset: 3:e62f78d544b4
231 252 parent: 1:3d5bf5654eda
232 253 user: test
233 254 date: Thu Jan 01 00:00:01 1970 +0000
234 255 summary: b1
235 256
236 257 % log -r tip -p --git
237 258 changeset: 6:2404bbcab562
238 259 tag: tip
239 260 user: test
240 261 date: Thu Jan 01 00:00:01 1970 +0000
241 262 summary: b1.1
242 263
243 264 diff --git a/b1 b/b1
244 265 --- a/b1
245 266 +++ b/b1
246 267 @@ -1,1 +1,2 @@
247 268 b1
248 269 +postm
249 270
250 271 % log -r ""
251 272 abort: 00changelog.i@: ambiguous identifier!
252 273 % log -r <some unknown node id>
253 274 abort: unknown revision '1000000000000000000000000000000000000000'!
254 275 % log -k r1
255 276 changeset: 1:3d5bf5654eda
256 277 user: test
257 278 date: Thu Jan 01 00:00:01 1970 +0000
258 279 summary: r1
259 280
260 281 % log -d -1
261 282 adding a
262 283 adding b
263 284 changeset: 0:29a4c94f1924
264 285 user: User One <user1@example.org>
265 286 date: Thu Jan 01 00:00:00 1970 +0000
266 287 summary: a
267 288
268 289 changeset: 1:e834b5e69c0e
269 290 tag: tip
270 291 user: User Two <user2@example.org>
271 292 date: Thu Jan 01 00:00:00 1970 +0000
272 293 summary: b
273 294
274 295 changeset: 0:29a4c94f1924
275 296 user: User One <user1@example.org>
276 297 date: Thu Jan 01 00:00:00 1970 +0000
277 298 summary: a
278 299
General Comments 0
You need to be logged in to leave comments. Login now