Show More
@@ -1,1214 +1,1222 b'' | |||
|
1 | 1 | $ "$TESTDIR/hghave" execbit || exit 80 |
|
2 | 2 | |
|
3 | The g is crafted to have 2 filelog topological heads in a linear | |
|
4 | changeset graph | |
|
5 | ||
|
3 | 6 |
$ |
|
4 | ||
|
5 | 7 | $ cd a |
|
6 | 8 | $ echo a > a |
|
9 | $ echo f > f | |
|
7 | 10 | $ hg ci -Ama -d '1 0' |
|
8 | 11 | adding a |
|
12 | adding f | |
|
9 | 13 | |
|
10 | 14 | $ hg cp a b |
|
15 | $ hg cp f g | |
|
11 | 16 | $ hg ci -mb -d '2 0' |
|
12 | 17 | |
|
13 | 18 | $ mkdir dir |
|
14 | 19 | $ hg mv b dir |
|
20 | $ echo g >> g | |
|
21 | $ echo f >> f | |
|
15 | 22 | $ hg ci -mc -d '3 0' |
|
16 | 23 | |
|
17 | 24 | $ hg mv a b |
|
25 | $ hg cp -f f g | |
|
18 | 26 | $ echo a > d |
|
19 | 27 | $ hg add d |
|
20 | 28 | $ hg ci -md -d '4 0' |
|
21 | 29 | |
|
22 | 30 | $ hg mv dir/b e |
|
23 | 31 | $ hg ci -me -d '5 0' |
|
24 | 32 | |
|
25 | 33 | $ hg log a |
|
26 |
changeset: 0: |
|
|
34 | changeset: 0:9161b9aeaf16 | |
|
27 | 35 | user: test |
|
28 | 36 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
29 | 37 | summary: a |
|
30 | 38 | |
|
31 | 39 | |
|
32 | 40 | -f, directory |
|
33 | 41 | |
|
34 | 42 | $ hg log -f dir |
|
35 | 43 | abort: cannot follow nonexistent file: "dir" |
|
36 | 44 | [255] |
|
37 | 45 | |
|
38 | 46 | -f, but no args |
|
39 | 47 | |
|
40 | 48 | $ hg log -f |
|
41 |
changeset: 4: |
|
|
49 | changeset: 4:7e4639b4691b | |
|
42 | 50 | tag: tip |
|
43 | 51 | user: test |
|
44 | 52 | date: Thu Jan 01 00:00:05 1970 +0000 |
|
45 | 53 | summary: e |
|
46 | 54 | |
|
47 |
changeset: 3: |
|
|
55 | changeset: 3:2ca5ba701980 | |
|
48 | 56 | user: test |
|
49 | 57 | date: Thu Jan 01 00:00:04 1970 +0000 |
|
50 | 58 | summary: d |
|
51 | 59 | |
|
52 |
changeset: 2: |
|
|
60 | changeset: 2:f8954cd4dc1f | |
|
53 | 61 | user: test |
|
54 | 62 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
55 | 63 | summary: c |
|
56 | 64 | |
|
57 |
changeset: 1: |
|
|
65 | changeset: 1:d89b0a12d229 | |
|
58 | 66 | user: test |
|
59 | 67 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
60 | 68 | summary: b |
|
61 | 69 | |
|
62 |
changeset: 0: |
|
|
70 | changeset: 0:9161b9aeaf16 | |
|
63 | 71 | user: test |
|
64 | 72 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
65 | 73 | summary: a |
|
66 | 74 | |
|
67 | 75 | |
|
68 | 76 | one rename |
|
69 | 77 | |
|
70 | 78 | $ hg log -vf a |
|
71 |
changeset: 0: |
|
|
79 | changeset: 0:9161b9aeaf16 | |
|
72 | 80 | user: test |
|
73 | 81 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
74 | files: a | |
|
82 | files: a f | |
|
75 | 83 | description: |
|
76 | 84 | a |
|
77 | 85 | |
|
78 | 86 | |
|
79 | 87 | |
|
80 | 88 | many renames |
|
81 | 89 | |
|
82 | 90 | $ hg log -vf e |
|
83 |
changeset: 4: |
|
|
91 | changeset: 4:7e4639b4691b | |
|
84 | 92 | tag: tip |
|
85 | 93 | user: test |
|
86 | 94 | date: Thu Jan 01 00:00:05 1970 +0000 |
|
87 | 95 | files: dir/b e |
|
88 | 96 | description: |
|
89 | 97 | e |
|
90 | 98 | |
|
91 | 99 | |
|
92 |
changeset: 2: |
|
|
100 | changeset: 2:f8954cd4dc1f | |
|
93 | 101 | user: test |
|
94 | 102 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
95 | files: b dir/b | |
|
103 | files: b dir/b f g | |
|
96 | 104 | description: |
|
97 | 105 | c |
|
98 | 106 | |
|
99 | 107 | |
|
100 |
changeset: 1: |
|
|
108 | changeset: 1:d89b0a12d229 | |
|
101 | 109 | user: test |
|
102 | 110 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
103 | files: b | |
|
111 | files: b g | |
|
104 | 112 | description: |
|
105 | 113 | b |
|
106 | 114 | |
|
107 | 115 | |
|
108 |
changeset: 0: |
|
|
116 | changeset: 0:9161b9aeaf16 | |
|
109 | 117 | user: test |
|
110 | 118 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
111 | files: a | |
|
119 | files: a f | |
|
112 | 120 | description: |
|
113 | 121 | a |
|
114 | 122 | |
|
115 | 123 | |
|
116 | 124 | |
|
117 | 125 | |
|
118 | 126 | log -pf dir/b |
|
119 | 127 | |
|
120 | 128 | $ hg log -pf dir/b |
|
121 |
changeset: 2: |
|
|
129 | changeset: 2:f8954cd4dc1f | |
|
122 | 130 | user: test |
|
123 | 131 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
124 | 132 | summary: c |
|
125 | 133 | |
|
126 | diff -r 784de7cef101 -r 41dd4284081e dir/b | |
|
134 | diff -r d89b0a12d229 -r f8954cd4dc1f dir/b | |
|
127 | 135 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
128 | 136 | +++ b/dir/b Thu Jan 01 00:00:03 1970 +0000 |
|
129 | 137 | @@ -0,0 +1,1 @@ |
|
130 | 138 | +a |
|
131 | 139 | |
|
132 |
changeset: 1: |
|
|
140 | changeset: 1:d89b0a12d229 | |
|
133 | 141 | user: test |
|
134 | 142 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
135 | 143 | summary: b |
|
136 | 144 | |
|
137 | diff -r 8580ff50825a -r 784de7cef101 b | |
|
145 | diff -r 9161b9aeaf16 -r d89b0a12d229 b | |
|
138 | 146 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
139 | 147 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 |
|
140 | 148 | @@ -0,0 +1,1 @@ |
|
141 | 149 | +a |
|
142 | 150 | |
|
143 |
changeset: 0: |
|
|
151 | changeset: 0:9161b9aeaf16 | |
|
144 | 152 | user: test |
|
145 | 153 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
146 | 154 | summary: a |
|
147 | 155 | |
|
148 |
diff -r 000000000000 -r |
|
|
156 | diff -r 000000000000 -r 9161b9aeaf16 a | |
|
149 | 157 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
150 | 158 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 |
|
151 | 159 | @@ -0,0 +1,1 @@ |
|
152 | 160 | +a |
|
153 | 161 | |
|
154 | 162 | |
|
155 | 163 | log -vf dir/b |
|
156 | 164 | |
|
157 | 165 | $ hg log -vf dir/b |
|
158 |
changeset: 2: |
|
|
166 | changeset: 2:f8954cd4dc1f | |
|
159 | 167 | user: test |
|
160 | 168 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
161 | files: b dir/b | |
|
169 | files: b dir/b f g | |
|
162 | 170 | description: |
|
163 | 171 | c |
|
164 | 172 | |
|
165 | 173 | |
|
166 |
changeset: 1: |
|
|
174 | changeset: 1:d89b0a12d229 | |
|
167 | 175 | user: test |
|
168 | 176 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
169 | files: b | |
|
177 | files: b g | |
|
170 | 178 | description: |
|
171 | 179 | b |
|
172 | 180 | |
|
173 | 181 | |
|
174 |
changeset: 0: |
|
|
182 | changeset: 0:9161b9aeaf16 | |
|
175 | 183 | user: test |
|
176 | 184 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
177 | files: a | |
|
185 | files: a f | |
|
178 | 186 | description: |
|
179 | 187 | a |
|
180 | 188 | |
|
181 | 189 | |
|
182 | 190 | |
|
183 | 191 | |
|
184 | 192 | log copies with --copies |
|
185 | 193 | |
|
186 | 194 | $ hg log -vC --template '{rev} {file_copies}\n' |
|
187 | 195 | 4 e (dir/b) |
|
188 | 3 b (a) | |
|
196 | 3 b (a)g (f) | |
|
189 | 197 | 2 dir/b (b) |
|
190 | 1 b (a) | |
|
198 | 1 b (a)g (f) | |
|
191 | 199 | 0 |
|
192 | 200 | |
|
193 | 201 | log copies switch without --copies, with old filecopy template |
|
194 | 202 | |
|
195 | 203 | $ hg log -v --template '{rev} {file_copies_switch%filecopy}\n' |
|
196 | 204 | 4 |
|
197 | 205 | 3 |
|
198 | 206 | 2 |
|
199 | 207 | 1 |
|
200 | 208 | 0 |
|
201 | 209 | |
|
202 | 210 | log copies switch with --copies |
|
203 | 211 | |
|
204 | 212 | $ hg log -vC --template '{rev} {file_copies_switch}\n' |
|
205 | 213 | 4 e (dir/b) |
|
206 | 3 b (a) | |
|
214 | 3 b (a)g (f) | |
|
207 | 215 | 2 dir/b (b) |
|
208 | 1 b (a) | |
|
216 | 1 b (a)g (f) | |
|
209 | 217 | 0 |
|
210 | 218 | |
|
211 | 219 | |
|
212 | 220 | log copies with hardcoded style and with --style=default |
|
213 | 221 | |
|
214 | 222 | $ hg log -vC -r4 |
|
215 |
changeset: 4: |
|
|
223 | changeset: 4:7e4639b4691b | |
|
216 | 224 | tag: tip |
|
217 | 225 | user: test |
|
218 | 226 | date: Thu Jan 01 00:00:05 1970 +0000 |
|
219 | 227 | files: dir/b e |
|
220 | 228 | copies: e (dir/b) |
|
221 | 229 | description: |
|
222 | 230 | e |
|
223 | 231 | |
|
224 | 232 | |
|
225 | 233 | $ hg log -vC -r4 --style=default |
|
226 |
changeset: 4: |
|
|
234 | changeset: 4:7e4639b4691b | |
|
227 | 235 | tag: tip |
|
228 | 236 | user: test |
|
229 | 237 | date: Thu Jan 01 00:00:05 1970 +0000 |
|
230 | 238 | files: dir/b e |
|
231 | 239 | copies: e (dir/b) |
|
232 | 240 | description: |
|
233 | 241 | e |
|
234 | 242 | |
|
235 | 243 | |
|
236 | 244 | |
|
237 | 245 | |
|
238 | 246 | log copies, non-linear manifest |
|
239 | 247 | |
|
240 | 248 | $ hg up -C 3 |
|
241 | 249 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
242 | 250 | $ hg mv dir/b e |
|
243 | 251 | $ echo foo > foo |
|
244 | 252 | $ hg ci -Ame2 -d '6 0' |
|
245 | 253 | adding foo |
|
246 | 254 | created new head |
|
247 | 255 | $ hg log -v --template '{rev} {file_copies}\n' -r 5 |
|
248 | 256 | 5 e (dir/b) |
|
249 | 257 | |
|
250 | 258 | |
|
251 | 259 | log copies, execute bit set |
|
252 | 260 | |
|
253 | 261 | $ chmod +x e |
|
254 | 262 | $ hg ci -me3 -d '7 0' |
|
255 | 263 | $ hg log -v --template '{rev} {file_copies}\n' -r 6 |
|
256 | 264 | 6 |
|
257 | 265 | |
|
258 | 266 | |
|
259 | 267 | log -p d |
|
260 | 268 | |
|
261 | 269 | $ hg log -pv d |
|
262 |
changeset: 3: |
|
|
270 | changeset: 3:2ca5ba701980 | |
|
263 | 271 | user: test |
|
264 | 272 | date: Thu Jan 01 00:00:04 1970 +0000 |
|
265 | files: a b d | |
|
273 | files: a b d g | |
|
266 | 274 | description: |
|
267 | 275 | d |
|
268 | 276 | |
|
269 | 277 | |
|
270 | diff -r 41dd4284081e -r 7c6c671bb7cc d | |
|
278 | diff -r f8954cd4dc1f -r 2ca5ba701980 d | |
|
271 | 279 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
272 | 280 | +++ b/d Thu Jan 01 00:00:04 1970 +0000 |
|
273 | 281 | @@ -0,0 +1,1 @@ |
|
274 | 282 | +a |
|
275 | 283 | |
|
276 | 284 | |
|
277 | 285 | |
|
278 | 286 | log --removed file |
|
279 | 287 | |
|
280 | 288 | $ hg log --removed -v a |
|
281 |
changeset: 3: |
|
|
289 | changeset: 3:2ca5ba701980 | |
|
282 | 290 | user: test |
|
283 | 291 | date: Thu Jan 01 00:00:04 1970 +0000 |
|
284 | files: a b d | |
|
292 | files: a b d g | |
|
285 | 293 | description: |
|
286 | 294 | d |
|
287 | 295 | |
|
288 | 296 | |
|
289 |
changeset: 0: |
|
|
297 | changeset: 0:9161b9aeaf16 | |
|
290 | 298 | user: test |
|
291 | 299 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
292 | files: a | |
|
300 | files: a f | |
|
293 | 301 | description: |
|
294 | 302 | a |
|
295 | 303 | |
|
296 | 304 | |
|
297 | 305 | |
|
298 | 306 | log --removed revrange file |
|
299 | 307 | |
|
300 | 308 | $ hg log --removed -v -r0:2 a |
|
301 |
changeset: 0: |
|
|
309 | changeset: 0:9161b9aeaf16 | |
|
302 | 310 | user: test |
|
303 | 311 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
304 | files: a | |
|
312 | files: a f | |
|
305 | 313 | description: |
|
306 | 314 | a |
|
307 | 315 | |
|
308 | 316 | |
|
309 | 317 | |
|
310 | 318 | |
|
311 | 319 | log --follow tests |
|
312 | 320 | |
|
313 | 321 | $ hg init ../follow |
|
314 | 322 | $ cd ../follow |
|
315 | 323 | |
|
316 | 324 | $ echo base > base |
|
317 | 325 | $ hg ci -Ambase -d '1 0' |
|
318 | 326 | adding base |
|
319 | 327 | |
|
320 | 328 | $ echo r1 >> base |
|
321 | 329 | $ hg ci -Amr1 -d '1 0' |
|
322 | 330 | $ echo r2 >> base |
|
323 | 331 | $ hg ci -Amr2 -d '1 0' |
|
324 | 332 | |
|
325 | 333 | $ hg up -C 1 |
|
326 | 334 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
327 | 335 | $ echo b1 > b1 |
|
328 | 336 | $ hg ci -Amb1 -d '1 0' |
|
329 | 337 | adding b1 |
|
330 | 338 | created new head |
|
331 | 339 | |
|
332 | 340 | |
|
333 | 341 | log -f |
|
334 | 342 | |
|
335 | 343 | $ hg log -f |
|
336 | 344 | changeset: 3:e62f78d544b4 |
|
337 | 345 | tag: tip |
|
338 | 346 | parent: 1:3d5bf5654eda |
|
339 | 347 | user: test |
|
340 | 348 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
341 | 349 | summary: b1 |
|
342 | 350 | |
|
343 | 351 | changeset: 1:3d5bf5654eda |
|
344 | 352 | user: test |
|
345 | 353 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
346 | 354 | summary: r1 |
|
347 | 355 | |
|
348 | 356 | changeset: 0:67e992f2c4f3 |
|
349 | 357 | user: test |
|
350 | 358 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
351 | 359 | summary: base |
|
352 | 360 | |
|
353 | 361 | |
|
354 | 362 | |
|
355 | 363 | log -f -r 1:tip |
|
356 | 364 | |
|
357 | 365 | $ hg up -C 0 |
|
358 | 366 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
359 | 367 | $ echo b2 > b2 |
|
360 | 368 | $ hg ci -Amb2 -d '1 0' |
|
361 | 369 | adding b2 |
|
362 | 370 | created new head |
|
363 | 371 | $ hg log -f -r 1:tip |
|
364 | 372 | changeset: 1:3d5bf5654eda |
|
365 | 373 | user: test |
|
366 | 374 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
367 | 375 | summary: r1 |
|
368 | 376 | |
|
369 | 377 | changeset: 2:60c670bf5b30 |
|
370 | 378 | user: test |
|
371 | 379 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
372 | 380 | summary: r2 |
|
373 | 381 | |
|
374 | 382 | changeset: 3:e62f78d544b4 |
|
375 | 383 | parent: 1:3d5bf5654eda |
|
376 | 384 | user: test |
|
377 | 385 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
378 | 386 | summary: b1 |
|
379 | 387 | |
|
380 | 388 | |
|
381 | 389 | |
|
382 | 390 | log -r . with two parents |
|
383 | 391 | |
|
384 | 392 | $ hg up -C 3 |
|
385 | 393 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
386 | 394 | $ hg merge tip |
|
387 | 395 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
388 | 396 | (branch merge, don't forget to commit) |
|
389 | 397 | $ hg log -r . |
|
390 | 398 | changeset: 3:e62f78d544b4 |
|
391 | 399 | parent: 1:3d5bf5654eda |
|
392 | 400 | user: test |
|
393 | 401 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
394 | 402 | summary: b1 |
|
395 | 403 | |
|
396 | 404 | |
|
397 | 405 | |
|
398 | 406 | log -r . with one parent |
|
399 | 407 | |
|
400 | 408 | $ hg ci -mm12 -d '1 0' |
|
401 | 409 | $ hg log -r . |
|
402 | 410 | changeset: 5:302e9dd6890d |
|
403 | 411 | tag: tip |
|
404 | 412 | parent: 3:e62f78d544b4 |
|
405 | 413 | parent: 4:ddb82e70d1a1 |
|
406 | 414 | user: test |
|
407 | 415 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
408 | 416 | summary: m12 |
|
409 | 417 | |
|
410 | 418 | |
|
411 | 419 | $ echo postm >> b1 |
|
412 | 420 | $ hg ci -Amb1.1 -d'1 0' |
|
413 | 421 | |
|
414 | 422 | |
|
415 | 423 | log --follow-first |
|
416 | 424 | |
|
417 | 425 | $ hg log --follow-first |
|
418 | 426 | changeset: 6:2404bbcab562 |
|
419 | 427 | tag: tip |
|
420 | 428 | user: test |
|
421 | 429 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
422 | 430 | summary: b1.1 |
|
423 | 431 | |
|
424 | 432 | changeset: 5:302e9dd6890d |
|
425 | 433 | parent: 3:e62f78d544b4 |
|
426 | 434 | parent: 4:ddb82e70d1a1 |
|
427 | 435 | user: test |
|
428 | 436 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
429 | 437 | summary: m12 |
|
430 | 438 | |
|
431 | 439 | changeset: 3:e62f78d544b4 |
|
432 | 440 | parent: 1:3d5bf5654eda |
|
433 | 441 | user: test |
|
434 | 442 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
435 | 443 | summary: b1 |
|
436 | 444 | |
|
437 | 445 | changeset: 1:3d5bf5654eda |
|
438 | 446 | user: test |
|
439 | 447 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
440 | 448 | summary: r1 |
|
441 | 449 | |
|
442 | 450 | changeset: 0:67e992f2c4f3 |
|
443 | 451 | user: test |
|
444 | 452 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
445 | 453 | summary: base |
|
446 | 454 | |
|
447 | 455 | |
|
448 | 456 | |
|
449 | 457 | log -P 2 |
|
450 | 458 | |
|
451 | 459 | $ hg log -P 2 |
|
452 | 460 | changeset: 6:2404bbcab562 |
|
453 | 461 | tag: tip |
|
454 | 462 | user: test |
|
455 | 463 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
456 | 464 | summary: b1.1 |
|
457 | 465 | |
|
458 | 466 | changeset: 5:302e9dd6890d |
|
459 | 467 | parent: 3:e62f78d544b4 |
|
460 | 468 | parent: 4:ddb82e70d1a1 |
|
461 | 469 | user: test |
|
462 | 470 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
463 | 471 | summary: m12 |
|
464 | 472 | |
|
465 | 473 | changeset: 4:ddb82e70d1a1 |
|
466 | 474 | parent: 0:67e992f2c4f3 |
|
467 | 475 | user: test |
|
468 | 476 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
469 | 477 | summary: b2 |
|
470 | 478 | |
|
471 | 479 | changeset: 3:e62f78d544b4 |
|
472 | 480 | parent: 1:3d5bf5654eda |
|
473 | 481 | user: test |
|
474 | 482 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
475 | 483 | summary: b1 |
|
476 | 484 | |
|
477 | 485 | |
|
478 | 486 | |
|
479 | 487 | log -r tip -p --git |
|
480 | 488 | |
|
481 | 489 | $ hg log -r tip -p --git |
|
482 | 490 | changeset: 6:2404bbcab562 |
|
483 | 491 | tag: tip |
|
484 | 492 | user: test |
|
485 | 493 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
486 | 494 | summary: b1.1 |
|
487 | 495 | |
|
488 | 496 | diff --git a/b1 b/b1 |
|
489 | 497 | --- a/b1 |
|
490 | 498 | +++ b/b1 |
|
491 | 499 | @@ -1,1 +1,2 @@ |
|
492 | 500 | b1 |
|
493 | 501 | +postm |
|
494 | 502 | |
|
495 | 503 | |
|
496 | 504 | |
|
497 | 505 | log -r "" |
|
498 | 506 | |
|
499 | 507 | $ hg log -r '' |
|
500 | 508 | hg: parse error: empty query |
|
501 | 509 | [255] |
|
502 | 510 | |
|
503 | 511 | log -r <some unknown node id> |
|
504 | 512 | |
|
505 | 513 | $ hg log -r 1000000000000000000000000000000000000000 |
|
506 | 514 | abort: unknown revision '1000000000000000000000000000000000000000'! |
|
507 | 515 | [255] |
|
508 | 516 | |
|
509 | 517 | log -k r1 |
|
510 | 518 | |
|
511 | 519 | $ hg log -k r1 |
|
512 | 520 | changeset: 1:3d5bf5654eda |
|
513 | 521 | user: test |
|
514 | 522 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
515 | 523 | summary: r1 |
|
516 | 524 | |
|
517 | 525 | log -d " " (whitespaces only) |
|
518 | 526 | |
|
519 | 527 | $ hg log -d " " |
|
520 | 528 | abort: dates cannot consist entirely of whitespace |
|
521 | 529 | [255] |
|
522 | 530 | |
|
523 | 531 | log -d -1 |
|
524 | 532 | |
|
525 | 533 | $ hg log -d -1 |
|
526 | 534 | |
|
527 | 535 | log -d ">" |
|
528 | 536 | |
|
529 | 537 | $ hg log -d ">" |
|
530 | 538 | abort: invalid day spec, use '>DATE' |
|
531 | 539 | [255] |
|
532 | 540 | |
|
533 | 541 | log -d "<" |
|
534 | 542 | |
|
535 | 543 | $ hg log -d "<" |
|
536 | 544 | abort: invalid day spec, use '<DATE' |
|
537 | 545 | [255] |
|
538 | 546 | |
|
539 | 547 | Negative ranges |
|
540 | 548 | $ hg log -d "--2" |
|
541 | 549 | abort: -2 must be nonnegative (see 'hg help dates') |
|
542 | 550 | [255] |
|
543 | 551 | |
|
544 | 552 | |
|
545 | 553 | log -p -l2 --color=always |
|
546 | 554 | |
|
547 | 555 | $ hg --config extensions.color= --config color.mode=ansi \ |
|
548 | 556 | > log -p -l2 --color=always |
|
549 | 557 | \x1b[0;33mchangeset: 6:2404bbcab562\x1b[0m (esc) |
|
550 | 558 | tag: tip |
|
551 | 559 | user: test |
|
552 | 560 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
553 | 561 | summary: b1.1 |
|
554 | 562 | |
|
555 | 563 | \x1b[0;1mdiff -r 302e9dd6890d -r 2404bbcab562 b1\x1b[0m (esc) |
|
556 | 564 | \x1b[0;31;1m--- a/b1 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc) |
|
557 | 565 | \x1b[0;32;1m+++ b/b1 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc) |
|
558 | 566 | \x1b[0;35m@@ -1,1 +1,2 @@\x1b[0m (esc) |
|
559 | 567 | b1 |
|
560 | 568 | \x1b[0;32m+postm\x1b[0m (esc) |
|
561 | 569 | |
|
562 | 570 | \x1b[0;33mchangeset: 5:302e9dd6890d\x1b[0m (esc) |
|
563 | 571 | parent: 3:e62f78d544b4 |
|
564 | 572 | parent: 4:ddb82e70d1a1 |
|
565 | 573 | user: test |
|
566 | 574 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
567 | 575 | summary: m12 |
|
568 | 576 | |
|
569 | 577 | \x1b[0;1mdiff -r e62f78d544b4 -r 302e9dd6890d b2\x1b[0m (esc) |
|
570 | 578 | \x1b[0;31;1m--- /dev/null Thu Jan 01 00:00:00 1970 +0000\x1b[0m (esc) |
|
571 | 579 | \x1b[0;32;1m+++ b/b2 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc) |
|
572 | 580 | \x1b[0;35m@@ -0,0 +1,1 @@\x1b[0m (esc) |
|
573 | 581 | \x1b[0;32m+b2\x1b[0m (esc) |
|
574 | 582 | |
|
575 | 583 | |
|
576 | 584 | |
|
577 | 585 | log -r tip --stat |
|
578 | 586 | |
|
579 | 587 | $ hg log -r tip --stat |
|
580 | 588 | changeset: 6:2404bbcab562 |
|
581 | 589 | tag: tip |
|
582 | 590 | user: test |
|
583 | 591 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
584 | 592 | summary: b1.1 |
|
585 | 593 | |
|
586 | 594 | b1 | 1 + |
|
587 | 595 | 1 files changed, 1 insertions(+), 0 deletions(-) |
|
588 | 596 | |
|
589 | 597 | |
|
590 | 598 | $ cd .. |
|
591 | 599 | |
|
592 | 600 | $ hg init usertest |
|
593 | 601 | $ cd usertest |
|
594 | 602 | |
|
595 | 603 | $ echo a > a |
|
596 | 604 | $ hg ci -A -m "a" -u "User One <user1@example.org>" |
|
597 | 605 | adding a |
|
598 | 606 | $ echo b > b |
|
599 | 607 | $ hg ci -A -m "b" -u "User Two <user2@example.org>" |
|
600 | 608 | adding b |
|
601 | 609 | |
|
602 | 610 | $ hg log -u "User One <user1@example.org>" |
|
603 | 611 | changeset: 0:29a4c94f1924 |
|
604 | 612 | user: User One <user1@example.org> |
|
605 | 613 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
606 | 614 | summary: a |
|
607 | 615 | |
|
608 | 616 | $ hg log -u "user1" -u "user2" |
|
609 | 617 | changeset: 1:e834b5e69c0e |
|
610 | 618 | tag: tip |
|
611 | 619 | user: User Two <user2@example.org> |
|
612 | 620 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
613 | 621 | summary: b |
|
614 | 622 | |
|
615 | 623 | changeset: 0:29a4c94f1924 |
|
616 | 624 | user: User One <user1@example.org> |
|
617 | 625 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
618 | 626 | summary: a |
|
619 | 627 | |
|
620 | 628 | $ hg log -u "user3" |
|
621 | 629 | |
|
622 | 630 | $ cd .. |
|
623 | 631 | |
|
624 | 632 | $ hg init branches |
|
625 | 633 | $ cd branches |
|
626 | 634 | |
|
627 | 635 | $ echo a > a |
|
628 | 636 | $ hg ci -A -m "commit on default" |
|
629 | 637 | adding a |
|
630 | 638 | $ hg branch test |
|
631 | 639 | marked working directory as branch test |
|
632 | 640 | (branches are permanent and global, did you want a bookmark?) |
|
633 | 641 | $ echo b > b |
|
634 | 642 | $ hg ci -A -m "commit on test" |
|
635 | 643 | adding b |
|
636 | 644 | |
|
637 | 645 | $ hg up default |
|
638 | 646 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
639 | 647 | $ echo c > c |
|
640 | 648 | $ hg ci -A -m "commit on default" |
|
641 | 649 | adding c |
|
642 | 650 | $ hg up test |
|
643 | 651 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
644 | 652 | $ echo c > c |
|
645 | 653 | $ hg ci -A -m "commit on test" |
|
646 | 654 | adding c |
|
647 | 655 | |
|
648 | 656 | |
|
649 | 657 | log -b default |
|
650 | 658 | |
|
651 | 659 | $ hg log -b default |
|
652 | 660 | changeset: 2:c3a4f03cc9a7 |
|
653 | 661 | parent: 0:24427303d56f |
|
654 | 662 | user: test |
|
655 | 663 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
656 | 664 | summary: commit on default |
|
657 | 665 | |
|
658 | 666 | changeset: 0:24427303d56f |
|
659 | 667 | user: test |
|
660 | 668 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
661 | 669 | summary: commit on default |
|
662 | 670 | |
|
663 | 671 | |
|
664 | 672 | |
|
665 | 673 | log -b test |
|
666 | 674 | |
|
667 | 675 | $ hg log -b test |
|
668 | 676 | changeset: 3:f5d8de11c2e2 |
|
669 | 677 | branch: test |
|
670 | 678 | tag: tip |
|
671 | 679 | parent: 1:d32277701ccb |
|
672 | 680 | user: test |
|
673 | 681 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
674 | 682 | summary: commit on test |
|
675 | 683 | |
|
676 | 684 | changeset: 1:d32277701ccb |
|
677 | 685 | branch: test |
|
678 | 686 | user: test |
|
679 | 687 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
680 | 688 | summary: commit on test |
|
681 | 689 | |
|
682 | 690 | |
|
683 | 691 | |
|
684 | 692 | log -b dummy |
|
685 | 693 | |
|
686 | 694 | $ hg log -b dummy |
|
687 | 695 | abort: unknown revision 'dummy'! |
|
688 | 696 | [255] |
|
689 | 697 | |
|
690 | 698 | |
|
691 | 699 | log -b . |
|
692 | 700 | |
|
693 | 701 | $ hg log -b . |
|
694 | 702 | changeset: 3:f5d8de11c2e2 |
|
695 | 703 | branch: test |
|
696 | 704 | tag: tip |
|
697 | 705 | parent: 1:d32277701ccb |
|
698 | 706 | user: test |
|
699 | 707 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
700 | 708 | summary: commit on test |
|
701 | 709 | |
|
702 | 710 | changeset: 1:d32277701ccb |
|
703 | 711 | branch: test |
|
704 | 712 | user: test |
|
705 | 713 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
706 | 714 | summary: commit on test |
|
707 | 715 | |
|
708 | 716 | |
|
709 | 717 | |
|
710 | 718 | log -b default -b test |
|
711 | 719 | |
|
712 | 720 | $ hg log -b default -b test |
|
713 | 721 | changeset: 3:f5d8de11c2e2 |
|
714 | 722 | branch: test |
|
715 | 723 | tag: tip |
|
716 | 724 | parent: 1:d32277701ccb |
|
717 | 725 | user: test |
|
718 | 726 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
719 | 727 | summary: commit on test |
|
720 | 728 | |
|
721 | 729 | changeset: 2:c3a4f03cc9a7 |
|
722 | 730 | parent: 0:24427303d56f |
|
723 | 731 | user: test |
|
724 | 732 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
725 | 733 | summary: commit on default |
|
726 | 734 | |
|
727 | 735 | changeset: 1:d32277701ccb |
|
728 | 736 | branch: test |
|
729 | 737 | user: test |
|
730 | 738 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
731 | 739 | summary: commit on test |
|
732 | 740 | |
|
733 | 741 | changeset: 0:24427303d56f |
|
734 | 742 | user: test |
|
735 | 743 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
736 | 744 | summary: commit on default |
|
737 | 745 | |
|
738 | 746 | |
|
739 | 747 | |
|
740 | 748 | log -b default -b . |
|
741 | 749 | |
|
742 | 750 | $ hg log -b default -b . |
|
743 | 751 | changeset: 3:f5d8de11c2e2 |
|
744 | 752 | branch: test |
|
745 | 753 | tag: tip |
|
746 | 754 | parent: 1:d32277701ccb |
|
747 | 755 | user: test |
|
748 | 756 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
749 | 757 | summary: commit on test |
|
750 | 758 | |
|
751 | 759 | changeset: 2:c3a4f03cc9a7 |
|
752 | 760 | parent: 0:24427303d56f |
|
753 | 761 | user: test |
|
754 | 762 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
755 | 763 | summary: commit on default |
|
756 | 764 | |
|
757 | 765 | changeset: 1:d32277701ccb |
|
758 | 766 | branch: test |
|
759 | 767 | user: test |
|
760 | 768 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
761 | 769 | summary: commit on test |
|
762 | 770 | |
|
763 | 771 | changeset: 0:24427303d56f |
|
764 | 772 | user: test |
|
765 | 773 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
766 | 774 | summary: commit on default |
|
767 | 775 | |
|
768 | 776 | |
|
769 | 777 | |
|
770 | 778 | log -b . -b test |
|
771 | 779 | |
|
772 | 780 | $ hg log -b . -b test |
|
773 | 781 | changeset: 3:f5d8de11c2e2 |
|
774 | 782 | branch: test |
|
775 | 783 | tag: tip |
|
776 | 784 | parent: 1:d32277701ccb |
|
777 | 785 | user: test |
|
778 | 786 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
779 | 787 | summary: commit on test |
|
780 | 788 | |
|
781 | 789 | changeset: 1:d32277701ccb |
|
782 | 790 | branch: test |
|
783 | 791 | user: test |
|
784 | 792 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
785 | 793 | summary: commit on test |
|
786 | 794 | |
|
787 | 795 | |
|
788 | 796 | |
|
789 | 797 | log -b 2 |
|
790 | 798 | |
|
791 | 799 | $ hg log -b 2 |
|
792 | 800 | changeset: 2:c3a4f03cc9a7 |
|
793 | 801 | parent: 0:24427303d56f |
|
794 | 802 | user: test |
|
795 | 803 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
796 | 804 | summary: commit on default |
|
797 | 805 | |
|
798 | 806 | changeset: 0:24427303d56f |
|
799 | 807 | user: test |
|
800 | 808 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
801 | 809 | summary: commit on default |
|
802 | 810 | |
|
803 | 811 | |
|
804 | 812 | |
|
805 | 813 | log -p --cwd dir (in subdir) |
|
806 | 814 | |
|
807 | 815 | $ mkdir dir |
|
808 | 816 | $ hg log -p --cwd dir |
|
809 | 817 | changeset: 3:f5d8de11c2e2 |
|
810 | 818 | branch: test |
|
811 | 819 | tag: tip |
|
812 | 820 | parent: 1:d32277701ccb |
|
813 | 821 | user: test |
|
814 | 822 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
815 | 823 | summary: commit on test |
|
816 | 824 | |
|
817 | 825 | diff -r d32277701ccb -r f5d8de11c2e2 c |
|
818 | 826 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
819 | 827 | +++ b/c Thu Jan 01 00:00:00 1970 +0000 |
|
820 | 828 | @@ -0,0 +1,1 @@ |
|
821 | 829 | +c |
|
822 | 830 | |
|
823 | 831 | changeset: 2:c3a4f03cc9a7 |
|
824 | 832 | parent: 0:24427303d56f |
|
825 | 833 | user: test |
|
826 | 834 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
827 | 835 | summary: commit on default |
|
828 | 836 | |
|
829 | 837 | diff -r 24427303d56f -r c3a4f03cc9a7 c |
|
830 | 838 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
831 | 839 | +++ b/c Thu Jan 01 00:00:00 1970 +0000 |
|
832 | 840 | @@ -0,0 +1,1 @@ |
|
833 | 841 | +c |
|
834 | 842 | |
|
835 | 843 | changeset: 1:d32277701ccb |
|
836 | 844 | branch: test |
|
837 | 845 | user: test |
|
838 | 846 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
839 | 847 | summary: commit on test |
|
840 | 848 | |
|
841 | 849 | diff -r 24427303d56f -r d32277701ccb b |
|
842 | 850 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
843 | 851 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 |
|
844 | 852 | @@ -0,0 +1,1 @@ |
|
845 | 853 | +b |
|
846 | 854 | |
|
847 | 855 | changeset: 0:24427303d56f |
|
848 | 856 | user: test |
|
849 | 857 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
850 | 858 | summary: commit on default |
|
851 | 859 | |
|
852 | 860 | diff -r 000000000000 -r 24427303d56f a |
|
853 | 861 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
854 | 862 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
855 | 863 | @@ -0,0 +1,1 @@ |
|
856 | 864 | +a |
|
857 | 865 | |
|
858 | 866 | |
|
859 | 867 | |
|
860 | 868 | log -p -R repo |
|
861 | 869 | |
|
862 | 870 | $ cd dir |
|
863 | 871 | $ hg log -p -R .. ../a |
|
864 | 872 | changeset: 0:24427303d56f |
|
865 | 873 | user: test |
|
866 | 874 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
867 | 875 | summary: commit on default |
|
868 | 876 | |
|
869 | 877 | diff -r 000000000000 -r 24427303d56f a |
|
870 | 878 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
871 | 879 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
872 | 880 | @@ -0,0 +1,1 @@ |
|
873 | 881 | +a |
|
874 | 882 | |
|
875 | 883 | |
|
876 | 884 | |
|
877 | 885 | $ cd .. |
|
878 | 886 | $ hg init follow2 |
|
879 | 887 | $ cd follow2 |
|
880 | 888 | |
|
881 | 889 | |
|
882 | 890 | # Build the following history: |
|
883 | 891 | # tip - o - x - o - x - x |
|
884 | 892 | # \ / |
|
885 | 893 | # o - o - o - x |
|
886 | 894 | # \ / |
|
887 | 895 | # o |
|
888 | 896 | # |
|
889 | 897 | # Where "o" is a revision containing "foo" and |
|
890 | 898 | # "x" is a revision without "foo" |
|
891 | 899 | |
|
892 | 900 | $ touch init |
|
893 | 901 | $ hg ci -A -m "init, unrelated" |
|
894 | 902 | adding init |
|
895 | 903 | $ echo 'foo' > init |
|
896 | 904 | $ hg ci -m "change, unrelated" |
|
897 | 905 | $ echo 'foo' > foo |
|
898 | 906 | $ hg ci -A -m "add unrelated old foo" |
|
899 | 907 | adding foo |
|
900 | 908 | $ hg rm foo |
|
901 | 909 | $ hg ci -m "delete foo, unrelated" |
|
902 | 910 | $ echo 'related' > foo |
|
903 | 911 | $ hg ci -A -m "add foo, related" |
|
904 | 912 | adding foo |
|
905 | 913 | |
|
906 | 914 | $ hg up 0 |
|
907 | 915 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
908 | 916 | $ touch branch |
|
909 | 917 | $ hg ci -A -m "first branch, unrelated" |
|
910 | 918 | adding branch |
|
911 | 919 | created new head |
|
912 | 920 | $ touch foo |
|
913 | 921 | $ hg ci -A -m "create foo, related" |
|
914 | 922 | adding foo |
|
915 | 923 | $ echo 'change' > foo |
|
916 | 924 | $ hg ci -m "change foo, related" |
|
917 | 925 | |
|
918 | 926 | $ hg up 6 |
|
919 | 927 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
920 | 928 | $ echo 'change foo in branch' > foo |
|
921 | 929 | $ hg ci -m "change foo in branch, related" |
|
922 | 930 | created new head |
|
923 | 931 | $ hg merge 7 |
|
924 | 932 | merging foo |
|
925 | 933 | warning: conflicts during merge. |
|
926 | 934 | merging foo incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
927 | 935 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
928 | 936 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
929 | 937 | [1] |
|
930 | 938 | $ echo 'merge 1' > foo |
|
931 | 939 | $ hg resolve -m foo |
|
932 | 940 | $ hg ci -m "First merge, related" |
|
933 | 941 | |
|
934 | 942 | $ hg merge 4 |
|
935 | 943 | merging foo |
|
936 | 944 | warning: conflicts during merge. |
|
937 | 945 | merging foo incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
938 | 946 | 1 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
939 | 947 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
940 | 948 | [1] |
|
941 | 949 | $ echo 'merge 2' > foo |
|
942 | 950 | $ hg resolve -m foo |
|
943 | 951 | $ hg ci -m "Last merge, related" |
|
944 | 952 | |
|
945 | 953 | $ hg --config "extensions.graphlog=" glog |
|
946 | 954 | @ changeset: 10:4dae8563d2c5 |
|
947 | 955 | |\ tag: tip |
|
948 | 956 | | | parent: 9:7b35701b003e |
|
949 | 957 | | | parent: 4:88176d361b69 |
|
950 | 958 | | | user: test |
|
951 | 959 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
952 | 960 | | | summary: Last merge, related |
|
953 | 961 | | | |
|
954 | 962 | | o changeset: 9:7b35701b003e |
|
955 | 963 | | |\ parent: 8:e5416ad8a855 |
|
956 | 964 | | | | parent: 7:87fe3144dcfa |
|
957 | 965 | | | | user: test |
|
958 | 966 | | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
959 | 967 | | | | summary: First merge, related |
|
960 | 968 | | | | |
|
961 | 969 | | | o changeset: 8:e5416ad8a855 |
|
962 | 970 | | | | parent: 6:dc6c325fe5ee |
|
963 | 971 | | | | user: test |
|
964 | 972 | | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
965 | 973 | | | | summary: change foo in branch, related |
|
966 | 974 | | | | |
|
967 | 975 | | o | changeset: 7:87fe3144dcfa |
|
968 | 976 | | |/ user: test |
|
969 | 977 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
970 | 978 | | | summary: change foo, related |
|
971 | 979 | | | |
|
972 | 980 | | o changeset: 6:dc6c325fe5ee |
|
973 | 981 | | | user: test |
|
974 | 982 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
975 | 983 | | | summary: create foo, related |
|
976 | 984 | | | |
|
977 | 985 | | o changeset: 5:73db34516eb9 |
|
978 | 986 | | | parent: 0:e87515fd044a |
|
979 | 987 | | | user: test |
|
980 | 988 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
981 | 989 | | | summary: first branch, unrelated |
|
982 | 990 | | | |
|
983 | 991 | o | changeset: 4:88176d361b69 |
|
984 | 992 | | | user: test |
|
985 | 993 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
986 | 994 | | | summary: add foo, related |
|
987 | 995 | | | |
|
988 | 996 | o | changeset: 3:dd78ae4afb56 |
|
989 | 997 | | | user: test |
|
990 | 998 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
991 | 999 | | | summary: delete foo, unrelated |
|
992 | 1000 | | | |
|
993 | 1001 | o | changeset: 2:c4c64aedf0f7 |
|
994 | 1002 | | | user: test |
|
995 | 1003 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
996 | 1004 | | | summary: add unrelated old foo |
|
997 | 1005 | | | |
|
998 | 1006 | o | changeset: 1:e5faa7440653 |
|
999 | 1007 | |/ user: test |
|
1000 | 1008 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1001 | 1009 | | summary: change, unrelated |
|
1002 | 1010 | | |
|
1003 | 1011 | o changeset: 0:e87515fd044a |
|
1004 | 1012 | user: test |
|
1005 | 1013 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1006 | 1014 | summary: init, unrelated |
|
1007 | 1015 | |
|
1008 | 1016 | |
|
1009 | 1017 | $ hg --traceback log -f foo |
|
1010 | 1018 | changeset: 10:4dae8563d2c5 |
|
1011 | 1019 | tag: tip |
|
1012 | 1020 | parent: 9:7b35701b003e |
|
1013 | 1021 | parent: 4:88176d361b69 |
|
1014 | 1022 | user: test |
|
1015 | 1023 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1016 | 1024 | summary: Last merge, related |
|
1017 | 1025 | |
|
1018 | 1026 | changeset: 9:7b35701b003e |
|
1019 | 1027 | parent: 8:e5416ad8a855 |
|
1020 | 1028 | parent: 7:87fe3144dcfa |
|
1021 | 1029 | user: test |
|
1022 | 1030 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1023 | 1031 | summary: First merge, related |
|
1024 | 1032 | |
|
1025 | 1033 | changeset: 8:e5416ad8a855 |
|
1026 | 1034 | parent: 6:dc6c325fe5ee |
|
1027 | 1035 | user: test |
|
1028 | 1036 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1029 | 1037 | summary: change foo in branch, related |
|
1030 | 1038 | |
|
1031 | 1039 | changeset: 7:87fe3144dcfa |
|
1032 | 1040 | user: test |
|
1033 | 1041 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1034 | 1042 | summary: change foo, related |
|
1035 | 1043 | |
|
1036 | 1044 | changeset: 6:dc6c325fe5ee |
|
1037 | 1045 | user: test |
|
1038 | 1046 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1039 | 1047 | summary: create foo, related |
|
1040 | 1048 | |
|
1041 | 1049 | changeset: 4:88176d361b69 |
|
1042 | 1050 | user: test |
|
1043 | 1051 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1044 | 1052 | summary: add foo, related |
|
1045 | 1053 | |
|
1046 | 1054 | |
|
1047 | 1055 | Also check when maxrev < lastrevfilelog |
|
1048 | 1056 | |
|
1049 | 1057 | $ hg --traceback log -f -r4 foo |
|
1050 | 1058 | changeset: 4:88176d361b69 |
|
1051 | 1059 | user: test |
|
1052 | 1060 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1053 | 1061 | summary: add foo, related |
|
1054 | 1062 | |
|
1055 | 1063 | |
|
1056 | 1064 | Issue2383: hg log showing _less_ differences than hg diff |
|
1057 | 1065 | |
|
1058 | 1066 | $ hg init issue2383 |
|
1059 | 1067 | $ cd issue2383 |
|
1060 | 1068 | |
|
1061 | 1069 | Create a test repo: |
|
1062 | 1070 | |
|
1063 | 1071 | $ echo a > a |
|
1064 | 1072 | $ hg ci -Am0 |
|
1065 | 1073 | adding a |
|
1066 | 1074 | $ echo b > b |
|
1067 | 1075 | $ hg ci -Am1 |
|
1068 | 1076 | adding b |
|
1069 | 1077 | $ hg co 0 |
|
1070 | 1078 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1071 | 1079 | $ echo b > a |
|
1072 | 1080 | $ hg ci -m2 |
|
1073 | 1081 | created new head |
|
1074 | 1082 | |
|
1075 | 1083 | Merge: |
|
1076 | 1084 | |
|
1077 | 1085 | $ hg merge |
|
1078 | 1086 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1079 | 1087 | (branch merge, don't forget to commit) |
|
1080 | 1088 | |
|
1081 | 1089 | Make sure there's a file listed in the merge to trigger the bug: |
|
1082 | 1090 | |
|
1083 | 1091 | $ echo c > a |
|
1084 | 1092 | $ hg ci -m3 |
|
1085 | 1093 | |
|
1086 | 1094 | Two files shown here in diff: |
|
1087 | 1095 | |
|
1088 | 1096 | $ hg diff --rev 2:3 |
|
1089 | 1097 | diff -r b09be438c43a -r 8e07aafe1edc a |
|
1090 | 1098 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
1091 | 1099 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
1092 | 1100 | @@ -1,1 +1,1 @@ |
|
1093 | 1101 | -b |
|
1094 | 1102 | +c |
|
1095 | 1103 | diff -r b09be438c43a -r 8e07aafe1edc b |
|
1096 | 1104 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1097 | 1105 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 |
|
1098 | 1106 | @@ -0,0 +1,1 @@ |
|
1099 | 1107 | +b |
|
1100 | 1108 | |
|
1101 | 1109 | Diff here should be the same: |
|
1102 | 1110 | |
|
1103 | 1111 | $ hg log -vpr 3 |
|
1104 | 1112 | changeset: 3:8e07aafe1edc |
|
1105 | 1113 | tag: tip |
|
1106 | 1114 | parent: 2:b09be438c43a |
|
1107 | 1115 | parent: 1:925d80f479bb |
|
1108 | 1116 | user: test |
|
1109 | 1117 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1110 | 1118 | files: a |
|
1111 | 1119 | description: |
|
1112 | 1120 | 3 |
|
1113 | 1121 | |
|
1114 | 1122 | |
|
1115 | 1123 | diff -r b09be438c43a -r 8e07aafe1edc a |
|
1116 | 1124 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
1117 | 1125 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
1118 | 1126 | @@ -1,1 +1,1 @@ |
|
1119 | 1127 | -b |
|
1120 | 1128 | +c |
|
1121 | 1129 | diff -r b09be438c43a -r 8e07aafe1edc b |
|
1122 | 1130 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1123 | 1131 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 |
|
1124 | 1132 | @@ -0,0 +1,1 @@ |
|
1125 | 1133 | +b |
|
1126 | 1134 | |
|
1127 | 1135 | $ cd .. |
|
1128 | 1136 | |
|
1129 | 1137 | 'hg log -r rev fn' when last(filelog(fn)) != rev |
|
1130 | 1138 | |
|
1131 | 1139 | $ hg init simplelog; cd simplelog |
|
1132 | 1140 | $ echo f > a |
|
1133 | 1141 | $ hg ci -Am'a' -d '0 0' |
|
1134 | 1142 | adding a |
|
1135 | 1143 | $ echo f >> a |
|
1136 | 1144 | $ hg ci -Am'a bis' -d '1 0' |
|
1137 | 1145 | |
|
1138 | 1146 | $ hg log -r0 a |
|
1139 | 1147 | changeset: 0:9f758d63dcde |
|
1140 | 1148 | user: test |
|
1141 | 1149 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1142 | 1150 | summary: a |
|
1143 | 1151 | |
|
1144 | 1152 | $ cat > $HGTMP/testhidden.py << EOF |
|
1145 | 1153 | > def reposetup(ui, repo): |
|
1146 | 1154 | > for line in repo.opener('hidden'): |
|
1147 | 1155 | > ctx = repo[line.strip()] |
|
1148 | 1156 | > repo.changelog.hiddenrevs.add(ctx.rev()) |
|
1149 | 1157 | > EOF |
|
1150 | 1158 | $ echo '[extensions]' >> $HGRCPATH |
|
1151 | 1159 | $ echo "hidden=$HGTMP/testhidden.py" >> $HGRCPATH |
|
1152 | 1160 | $ touch .hg/hidden |
|
1153 | 1161 | $ hg log --template='{rev}:{node}\n' |
|
1154 | 1162 | 1:a765632148dc55d38c35c4f247c618701886cb2f |
|
1155 | 1163 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 |
|
1156 | 1164 | $ echo a765632148dc55d38c35c4f247c618701886cb2f > .hg/hidden |
|
1157 | 1165 | $ hg log --template='{rev}:{node}\n' |
|
1158 | 1166 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 |
|
1159 | 1167 | $ hg log --template='{rev}:{node}\n' --hidden |
|
1160 | 1168 | 1:a765632148dc55d38c35c4f247c618701886cb2f |
|
1161 | 1169 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 |
|
1162 | 1170 | |
|
1163 | 1171 | clear extensions configuration |
|
1164 | 1172 | $ echo '[extensions]' >> $HGRCPATH |
|
1165 | 1173 | $ echo "hidden=!" >> $HGRCPATH |
|
1166 | 1174 | $ cd .. |
|
1167 | 1175 | |
|
1168 | 1176 | test -u/-k for problematic encoding |
|
1169 | 1177 | # unicode: cp932: |
|
1170 | 1178 | # u30A2 0x83 0x41(= 'A') |
|
1171 | 1179 | # u30C2 0x83 0x61(= 'a') |
|
1172 | 1180 | |
|
1173 | 1181 | $ hg init problematicencoding |
|
1174 | 1182 | $ cd problematicencoding |
|
1175 | 1183 | |
|
1176 | 1184 | $ python > setup.sh <<EOF |
|
1177 | 1185 | > print u''' |
|
1178 | 1186 | > echo a > text |
|
1179 | 1187 | > hg add text |
|
1180 | 1188 | > hg --encoding utf-8 commit -u '\u30A2' -m none |
|
1181 | 1189 | > echo b > text |
|
1182 | 1190 | > hg --encoding utf-8 commit -u '\u30C2' -m none |
|
1183 | 1191 | > echo c > text |
|
1184 | 1192 | > hg --encoding utf-8 commit -u none -m '\u30A2' |
|
1185 | 1193 | > echo d > text |
|
1186 | 1194 | > hg --encoding utf-8 commit -u none -m '\u30C2' |
|
1187 | 1195 | > '''.encode('utf-8') |
|
1188 | 1196 | > EOF |
|
1189 | 1197 | $ sh < setup.sh |
|
1190 | 1198 | |
|
1191 | 1199 | test in problematic encoding |
|
1192 | 1200 | $ python > test.sh <<EOF |
|
1193 | 1201 | > print u''' |
|
1194 | 1202 | > hg --encoding cp932 log --template '{rev}\\n' -u '\u30A2' |
|
1195 | 1203 | > echo ==== |
|
1196 | 1204 | > hg --encoding cp932 log --template '{rev}\\n' -u '\u30C2' |
|
1197 | 1205 | > echo ==== |
|
1198 | 1206 | > hg --encoding cp932 log --template '{rev}\\n' -k '\u30A2' |
|
1199 | 1207 | > echo ==== |
|
1200 | 1208 | > hg --encoding cp932 log --template '{rev}\\n' -k '\u30C2' |
|
1201 | 1209 | > '''.encode('cp932') |
|
1202 | 1210 | > EOF |
|
1203 | 1211 | $ sh < test.sh |
|
1204 | 1212 | 0 |
|
1205 | 1213 | ==== |
|
1206 | 1214 | 1 |
|
1207 | 1215 | ==== |
|
1208 | 1216 | 2 |
|
1209 | 1217 | 0 |
|
1210 | 1218 | ==== |
|
1211 | 1219 | 3 |
|
1212 | 1220 | 1 |
|
1213 | 1221 | |
|
1214 | 1222 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now