Show More
@@ -1,2391 +1,2393 b'' | |||
|
1 | 1 | Log on empty repository: checking consistency |
|
2 | 2 | |
|
3 | 3 | $ hg init empty |
|
4 | 4 | $ cd empty |
|
5 | 5 | $ hg log |
|
6 | 6 | $ hg log -r 1 |
|
7 | 7 | abort: unknown revision '1'! |
|
8 | 8 | [255] |
|
9 | 9 | $ hg log -r -1:0 |
|
10 | 10 | abort: unknown revision '-1'! |
|
11 | 11 | [255] |
|
12 | 12 | $ hg log -r 'branch(name)' |
|
13 | 13 | abort: unknown revision 'name'! |
|
14 | 14 | [255] |
|
15 | 15 | $ hg log -r null -q |
|
16 | 16 | -1:000000000000 |
|
17 | 17 | |
|
18 | 18 | The g is crafted to have 2 filelog topological heads in a linear |
|
19 | 19 | changeset graph |
|
20 | 20 | |
|
21 | 21 | $ hg init a |
|
22 | 22 | $ cd a |
|
23 | 23 | $ echo a > a |
|
24 | 24 | $ echo f > f |
|
25 | 25 | $ hg ci -Ama -d '1 0' |
|
26 | 26 | adding a |
|
27 | 27 | adding f |
|
28 | 28 | |
|
29 | 29 | $ hg cp a b |
|
30 | 30 | $ hg cp f g |
|
31 | 31 | $ hg ci -mb -d '2 0' |
|
32 | 32 | |
|
33 | 33 | $ mkdir dir |
|
34 | 34 | $ hg mv b dir |
|
35 | 35 | $ echo g >> g |
|
36 | 36 | $ echo f >> f |
|
37 | 37 | $ hg ci -mc -d '3 0' |
|
38 | 38 | |
|
39 | 39 | $ hg mv a b |
|
40 | 40 | $ hg cp -f f g |
|
41 | 41 | $ echo a > d |
|
42 | 42 | $ hg add d |
|
43 | 43 | $ hg ci -md -d '4 0' |
|
44 | 44 | |
|
45 | 45 | $ hg mv dir/b e |
|
46 | 46 | $ hg ci -me -d '5 0' |
|
47 | 47 | |
|
48 | 48 | Make sure largefiles doesn't interfere with logging a regular file |
|
49 | 49 | $ hg --debug log a -T '{rev}: {desc}\n' --config extensions.largefiles= |
|
50 | 50 | The fsmonitor extension is incompatible with the largefiles extension and has been disabled. (fsmonitor !) |
|
51 | 51 | updated patterns: .hglf/a, a |
|
52 | 52 | 0: a |
|
53 | 53 | $ hg log a |
|
54 | 54 | changeset: 0:9161b9aeaf16 |
|
55 | 55 | user: test |
|
56 | 56 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
57 | 57 | summary: a |
|
58 | 58 | |
|
59 | 59 | $ hg log glob:a* |
|
60 | 60 | changeset: 3:2ca5ba701980 |
|
61 | 61 | user: test |
|
62 | 62 | date: Thu Jan 01 00:00:04 1970 +0000 |
|
63 | 63 | summary: d |
|
64 | 64 | |
|
65 | 65 | changeset: 0:9161b9aeaf16 |
|
66 | 66 | user: test |
|
67 | 67 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
68 | 68 | summary: a |
|
69 | 69 | |
|
70 | 70 | $ hg --debug log glob:a* -T '{rev}: {desc}\n' --config extensions.largefiles= |
|
71 | 71 | The fsmonitor extension is incompatible with the largefiles extension and has been disabled. (fsmonitor !) |
|
72 | 72 | updated patterns: glob:.hglf/a*, glob:a* |
|
73 | 73 | 3: d |
|
74 | 74 | 0: a |
|
75 | 75 | |
|
76 | 76 | log on directory |
|
77 | 77 | |
|
78 | 78 | $ hg log dir |
|
79 | 79 | changeset: 4:7e4639b4691b |
|
80 | 80 | tag: tip |
|
81 | 81 | user: test |
|
82 | 82 | date: Thu Jan 01 00:00:05 1970 +0000 |
|
83 | 83 | summary: e |
|
84 | 84 | |
|
85 | 85 | changeset: 2:f8954cd4dc1f |
|
86 | 86 | user: test |
|
87 | 87 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
88 | 88 | summary: c |
|
89 | 89 | |
|
90 | 90 | $ hg log somethingthatdoesntexist dir |
|
91 | 91 | changeset: 4:7e4639b4691b |
|
92 | 92 | tag: tip |
|
93 | 93 | user: test |
|
94 | 94 | date: Thu Jan 01 00:00:05 1970 +0000 |
|
95 | 95 | summary: e |
|
96 | 96 | |
|
97 | 97 | changeset: 2:f8954cd4dc1f |
|
98 | 98 | user: test |
|
99 | 99 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
100 | 100 | summary: c |
|
101 | 101 | |
|
102 | 102 | |
|
103 | 103 | -f, non-existent directory |
|
104 | 104 | |
|
105 | 105 | $ hg log -f dir |
|
106 | 106 | abort: cannot follow file not in parent revision: "dir" |
|
107 | 107 | [255] |
|
108 | 108 | |
|
109 | 109 | -f, directory |
|
110 | 110 | |
|
111 | 111 | $ hg up -q 3 |
|
112 | 112 | $ hg log -f dir |
|
113 | 113 | changeset: 2:f8954cd4dc1f |
|
114 | 114 | user: test |
|
115 | 115 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
116 | 116 | summary: c |
|
117 | 117 | |
|
118 | 118 | -f, directory with --patch |
|
119 | 119 | |
|
120 | 120 | $ hg log -f dir -p |
|
121 | 121 | changeset: 2:f8954cd4dc1f |
|
122 | 122 | user: test |
|
123 | 123 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
124 | 124 | summary: c |
|
125 | 125 | |
|
126 | 126 | diff -r d89b0a12d229 -r f8954cd4dc1f dir/b |
|
127 | 127 | --- /dev/null* (glob) |
|
128 | 128 | +++ b/dir/b* (glob) |
|
129 | 129 | @@ -0,0 +1,1 @@ |
|
130 | 130 | +a |
|
131 | 131 | |
|
132 | 132 | |
|
133 | 133 | -f, pattern |
|
134 | 134 | |
|
135 | 135 | $ hg log -f -I 'dir**' -p |
|
136 | 136 | changeset: 2:f8954cd4dc1f |
|
137 | 137 | user: test |
|
138 | 138 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
139 | 139 | summary: c |
|
140 | 140 | |
|
141 | 141 | diff -r d89b0a12d229 -r f8954cd4dc1f dir/b |
|
142 | 142 | --- /dev/null* (glob) |
|
143 | 143 | +++ b/dir/b* (glob) |
|
144 | 144 | @@ -0,0 +1,1 @@ |
|
145 | 145 | +a |
|
146 | 146 | |
|
147 | 147 | $ hg up -q 4 |
|
148 | 148 | |
|
149 | 149 | -f, a wrong style |
|
150 | 150 | |
|
151 | 151 | $ hg log -f -l1 --style something |
|
152 | 152 | abort: style 'something' not found |
|
153 | 153 | (available styles: bisect, changelog, compact, default, phases, show, status, xml) |
|
154 | 154 | [255] |
|
155 | 155 | |
|
156 | 156 | -f, phases style |
|
157 | 157 | |
|
158 | 158 | |
|
159 | 159 | $ hg log -f -l1 --style phases |
|
160 | 160 | changeset: 4:7e4639b4691b |
|
161 | 161 | tag: tip |
|
162 | 162 | phase: draft |
|
163 | 163 | user: test |
|
164 | 164 | date: Thu Jan 01 00:00:05 1970 +0000 |
|
165 | 165 | summary: e |
|
166 | 166 | |
|
167 | 167 | |
|
168 | 168 | $ hg log -f -l1 --style phases -q |
|
169 | 169 | 4:7e4639b4691b |
|
170 | 170 | |
|
171 | 171 | -f, but no args |
|
172 | 172 | |
|
173 | 173 | $ hg log -f |
|
174 | 174 | changeset: 4:7e4639b4691b |
|
175 | 175 | tag: tip |
|
176 | 176 | user: test |
|
177 | 177 | date: Thu Jan 01 00:00:05 1970 +0000 |
|
178 | 178 | summary: e |
|
179 | 179 | |
|
180 | 180 | changeset: 3:2ca5ba701980 |
|
181 | 181 | user: test |
|
182 | 182 | date: Thu Jan 01 00:00:04 1970 +0000 |
|
183 | 183 | summary: d |
|
184 | 184 | |
|
185 | 185 | changeset: 2:f8954cd4dc1f |
|
186 | 186 | user: test |
|
187 | 187 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
188 | 188 | summary: c |
|
189 | 189 | |
|
190 | 190 | changeset: 1:d89b0a12d229 |
|
191 | 191 | user: test |
|
192 | 192 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
193 | 193 | summary: b |
|
194 | 194 | |
|
195 | 195 | changeset: 0:9161b9aeaf16 |
|
196 | 196 | user: test |
|
197 | 197 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
198 | 198 | summary: a |
|
199 | 199 | |
|
200 | 200 | |
|
201 | 201 | one rename |
|
202 | 202 | |
|
203 | 203 | $ hg up -q 2 |
|
204 | 204 | $ hg log -vf a |
|
205 | 205 | changeset: 0:9161b9aeaf16 |
|
206 | 206 | user: test |
|
207 | 207 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
208 | 208 | files: a f |
|
209 | 209 | description: |
|
210 | 210 | a |
|
211 | 211 | |
|
212 | 212 | |
|
213 | 213 | |
|
214 | 214 | many renames |
|
215 | 215 | |
|
216 | 216 | $ hg up -q tip |
|
217 | 217 | $ hg log -vf e |
|
218 | 218 | changeset: 4:7e4639b4691b |
|
219 | 219 | tag: tip |
|
220 | 220 | user: test |
|
221 | 221 | date: Thu Jan 01 00:00:05 1970 +0000 |
|
222 | 222 | files: dir/b e |
|
223 | 223 | description: |
|
224 | 224 | e |
|
225 | 225 | |
|
226 | 226 | |
|
227 | 227 | changeset: 2:f8954cd4dc1f |
|
228 | 228 | user: test |
|
229 | 229 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
230 | 230 | files: b dir/b f g |
|
231 | 231 | description: |
|
232 | 232 | c |
|
233 | 233 | |
|
234 | 234 | |
|
235 | 235 | changeset: 1:d89b0a12d229 |
|
236 | 236 | user: test |
|
237 | 237 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
238 | 238 | files: b g |
|
239 | 239 | description: |
|
240 | 240 | b |
|
241 | 241 | |
|
242 | 242 | |
|
243 | 243 | changeset: 0:9161b9aeaf16 |
|
244 | 244 | user: test |
|
245 | 245 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
246 | 246 | files: a f |
|
247 | 247 | description: |
|
248 | 248 | a |
|
249 | 249 | |
|
250 | 250 | |
|
251 | 251 | |
|
252 | 252 | |
|
253 | 253 | log -pf dir/b |
|
254 | 254 | |
|
255 | 255 | $ hg up -q 3 |
|
256 | 256 | $ hg log -pf dir/b |
|
257 | 257 | changeset: 2:f8954cd4dc1f |
|
258 | 258 | user: test |
|
259 | 259 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
260 | 260 | summary: c |
|
261 | 261 | |
|
262 | 262 | diff -r d89b0a12d229 -r f8954cd4dc1f dir/b |
|
263 | 263 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
264 | 264 | +++ b/dir/b Thu Jan 01 00:00:03 1970 +0000 |
|
265 | 265 | @@ -0,0 +1,1 @@ |
|
266 | 266 | +a |
|
267 | 267 | |
|
268 | 268 | changeset: 1:d89b0a12d229 |
|
269 | 269 | user: test |
|
270 | 270 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
271 | 271 | summary: b |
|
272 | 272 | |
|
273 | 273 | diff -r 9161b9aeaf16 -r d89b0a12d229 b |
|
274 | 274 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
275 | 275 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 |
|
276 | 276 | @@ -0,0 +1,1 @@ |
|
277 | 277 | +a |
|
278 | 278 | |
|
279 | 279 | changeset: 0:9161b9aeaf16 |
|
280 | 280 | user: test |
|
281 | 281 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
282 | 282 | summary: a |
|
283 | 283 | |
|
284 | 284 | diff -r 000000000000 -r 9161b9aeaf16 a |
|
285 | 285 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
286 | 286 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 |
|
287 | 287 | @@ -0,0 +1,1 @@ |
|
288 | 288 | +a |
|
289 | 289 | |
|
290 | 290 | |
|
291 | 291 | log -pf b inside dir |
|
292 | 292 | |
|
293 | 293 | $ hg --cwd=dir log -pf b |
|
294 | 294 | changeset: 2:f8954cd4dc1f |
|
295 | 295 | user: test |
|
296 | 296 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
297 | 297 | summary: c |
|
298 | 298 | |
|
299 | 299 | diff -r d89b0a12d229 -r f8954cd4dc1f dir/b |
|
300 | 300 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
301 | 301 | +++ b/dir/b Thu Jan 01 00:00:03 1970 +0000 |
|
302 | 302 | @@ -0,0 +1,1 @@ |
|
303 | 303 | +a |
|
304 | 304 | |
|
305 | 305 | changeset: 1:d89b0a12d229 |
|
306 | 306 | user: test |
|
307 | 307 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
308 | 308 | summary: b |
|
309 | 309 | |
|
310 | 310 | diff -r 9161b9aeaf16 -r d89b0a12d229 b |
|
311 | 311 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
312 | 312 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 |
|
313 | 313 | @@ -0,0 +1,1 @@ |
|
314 | 314 | +a |
|
315 | 315 | |
|
316 | 316 | changeset: 0:9161b9aeaf16 |
|
317 | 317 | user: test |
|
318 | 318 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
319 | 319 | summary: a |
|
320 | 320 | |
|
321 | 321 | diff -r 000000000000 -r 9161b9aeaf16 a |
|
322 | 322 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
323 | 323 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 |
|
324 | 324 | @@ -0,0 +1,1 @@ |
|
325 | 325 | +a |
|
326 | 326 | |
|
327 | 327 | |
|
328 | 328 | log -pf, but no args |
|
329 | 329 | |
|
330 | 330 | $ hg log -pf |
|
331 | 331 | changeset: 3:2ca5ba701980 |
|
332 | 332 | user: test |
|
333 | 333 | date: Thu Jan 01 00:00:04 1970 +0000 |
|
334 | 334 | summary: d |
|
335 | 335 | |
|
336 | 336 | diff -r f8954cd4dc1f -r 2ca5ba701980 a |
|
337 | 337 | --- a/a Thu Jan 01 00:00:03 1970 +0000 |
|
338 | 338 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
339 | 339 | @@ -1,1 +0,0 @@ |
|
340 | 340 | -a |
|
341 | 341 | diff -r f8954cd4dc1f -r 2ca5ba701980 b |
|
342 | 342 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
343 | 343 | +++ b/b Thu Jan 01 00:00:04 1970 +0000 |
|
344 | 344 | @@ -0,0 +1,1 @@ |
|
345 | 345 | +a |
|
346 | 346 | diff -r f8954cd4dc1f -r 2ca5ba701980 d |
|
347 | 347 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
348 | 348 | +++ b/d Thu Jan 01 00:00:04 1970 +0000 |
|
349 | 349 | @@ -0,0 +1,1 @@ |
|
350 | 350 | +a |
|
351 | 351 | diff -r f8954cd4dc1f -r 2ca5ba701980 g |
|
352 | 352 | --- a/g Thu Jan 01 00:00:03 1970 +0000 |
|
353 | 353 | +++ b/g Thu Jan 01 00:00:04 1970 +0000 |
|
354 | 354 | @@ -1,2 +1,2 @@ |
|
355 | 355 | f |
|
356 | 356 | -g |
|
357 | 357 | +f |
|
358 | 358 | |
|
359 | 359 | changeset: 2:f8954cd4dc1f |
|
360 | 360 | user: test |
|
361 | 361 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
362 | 362 | summary: c |
|
363 | 363 | |
|
364 | 364 | diff -r d89b0a12d229 -r f8954cd4dc1f b |
|
365 | 365 | --- a/b Thu Jan 01 00:00:02 1970 +0000 |
|
366 | 366 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
367 | 367 | @@ -1,1 +0,0 @@ |
|
368 | 368 | -a |
|
369 | 369 | diff -r d89b0a12d229 -r f8954cd4dc1f dir/b |
|
370 | 370 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
371 | 371 | +++ b/dir/b Thu Jan 01 00:00:03 1970 +0000 |
|
372 | 372 | @@ -0,0 +1,1 @@ |
|
373 | 373 | +a |
|
374 | 374 | diff -r d89b0a12d229 -r f8954cd4dc1f f |
|
375 | 375 | --- a/f Thu Jan 01 00:00:02 1970 +0000 |
|
376 | 376 | +++ b/f Thu Jan 01 00:00:03 1970 +0000 |
|
377 | 377 | @@ -1,1 +1,2 @@ |
|
378 | 378 | f |
|
379 | 379 | +f |
|
380 | 380 | diff -r d89b0a12d229 -r f8954cd4dc1f g |
|
381 | 381 | --- a/g Thu Jan 01 00:00:02 1970 +0000 |
|
382 | 382 | +++ b/g Thu Jan 01 00:00:03 1970 +0000 |
|
383 | 383 | @@ -1,1 +1,2 @@ |
|
384 | 384 | f |
|
385 | 385 | +g |
|
386 | 386 | |
|
387 | 387 | changeset: 1:d89b0a12d229 |
|
388 | 388 | user: test |
|
389 | 389 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
390 | 390 | summary: b |
|
391 | 391 | |
|
392 | 392 | diff -r 9161b9aeaf16 -r d89b0a12d229 b |
|
393 | 393 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
394 | 394 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 |
|
395 | 395 | @@ -0,0 +1,1 @@ |
|
396 | 396 | +a |
|
397 | 397 | diff -r 9161b9aeaf16 -r d89b0a12d229 g |
|
398 | 398 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
399 | 399 | +++ b/g Thu Jan 01 00:00:02 1970 +0000 |
|
400 | 400 | @@ -0,0 +1,1 @@ |
|
401 | 401 | +f |
|
402 | 402 | |
|
403 | 403 | changeset: 0:9161b9aeaf16 |
|
404 | 404 | user: test |
|
405 | 405 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
406 | 406 | summary: a |
|
407 | 407 | |
|
408 | 408 | diff -r 000000000000 -r 9161b9aeaf16 a |
|
409 | 409 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
410 | 410 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 |
|
411 | 411 | @@ -0,0 +1,1 @@ |
|
412 | 412 | +a |
|
413 | 413 | diff -r 000000000000 -r 9161b9aeaf16 f |
|
414 | 414 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
415 | 415 | +++ b/f Thu Jan 01 00:00:01 1970 +0000 |
|
416 | 416 | @@ -0,0 +1,1 @@ |
|
417 | 417 | +f |
|
418 | 418 | |
|
419 | 419 | |
|
420 | 420 | log -vf dir/b |
|
421 | 421 | |
|
422 | 422 | $ hg log -vf dir/b |
|
423 | 423 | changeset: 2:f8954cd4dc1f |
|
424 | 424 | user: test |
|
425 | 425 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
426 | 426 | files: b dir/b f g |
|
427 | 427 | description: |
|
428 | 428 | c |
|
429 | 429 | |
|
430 | 430 | |
|
431 | 431 | changeset: 1:d89b0a12d229 |
|
432 | 432 | user: test |
|
433 | 433 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
434 | 434 | files: b g |
|
435 | 435 | description: |
|
436 | 436 | b |
|
437 | 437 | |
|
438 | 438 | |
|
439 | 439 | changeset: 0:9161b9aeaf16 |
|
440 | 440 | user: test |
|
441 | 441 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
442 | 442 | files: a f |
|
443 | 443 | description: |
|
444 | 444 | a |
|
445 | 445 | |
|
446 | 446 | |
|
447 | 447 | |
|
448 | 448 | |
|
449 | 449 | -f and multiple filelog heads |
|
450 | 450 | |
|
451 | 451 | $ hg up -q 2 |
|
452 | 452 | $ hg log -f g --template '{rev}\n' |
|
453 | 453 | 2 |
|
454 | 454 | 1 |
|
455 | 455 | 0 |
|
456 | 456 | $ hg up -q tip |
|
457 | 457 | $ hg log -f g --template '{rev}\n' |
|
458 | 458 | 3 |
|
459 | 459 | 2 |
|
460 | 460 | 0 |
|
461 | 461 | |
|
462 | 462 | |
|
463 | 463 | log copies with --copies |
|
464 | 464 | |
|
465 | 465 | $ hg log -vC --template '{rev} {file_copies}\n' |
|
466 | 466 | 4 e (dir/b) |
|
467 | 467 | 3 b (a)g (f) |
|
468 | 468 | 2 dir/b (b) |
|
469 | 469 | 1 b (a)g (f) |
|
470 | 470 | 0 |
|
471 | 471 | |
|
472 | 472 | log copies switch without --copies, with old filecopy template |
|
473 | 473 | |
|
474 | 474 | $ hg log -v --template '{rev} {file_copies_switch%filecopy}\n' |
|
475 | 475 | 4 |
|
476 | 476 | 3 |
|
477 | 477 | 2 |
|
478 | 478 | 1 |
|
479 | 479 | 0 |
|
480 | 480 | |
|
481 | 481 | log copies switch with --copies |
|
482 | 482 | |
|
483 | 483 | $ hg log -vC --template '{rev} {file_copies_switch}\n' |
|
484 | 484 | 4 e (dir/b) |
|
485 | 485 | 3 b (a)g (f) |
|
486 | 486 | 2 dir/b (b) |
|
487 | 487 | 1 b (a)g (f) |
|
488 | 488 | 0 |
|
489 | 489 | |
|
490 | 490 | |
|
491 | 491 | log copies with hardcoded style and with --style=default |
|
492 | 492 | |
|
493 | 493 | $ hg log -vC -r4 |
|
494 | 494 | changeset: 4:7e4639b4691b |
|
495 | 495 | tag: tip |
|
496 | 496 | user: test |
|
497 | 497 | date: Thu Jan 01 00:00:05 1970 +0000 |
|
498 | 498 | files: dir/b e |
|
499 | 499 | copies: e (dir/b) |
|
500 | 500 | description: |
|
501 | 501 | e |
|
502 | 502 | |
|
503 | 503 | |
|
504 | 504 | $ hg log -vC -r4 --style=default |
|
505 | 505 | changeset: 4:7e4639b4691b |
|
506 | 506 | tag: tip |
|
507 | 507 | user: test |
|
508 | 508 | date: Thu Jan 01 00:00:05 1970 +0000 |
|
509 | 509 | files: dir/b e |
|
510 | 510 | copies: e (dir/b) |
|
511 | 511 | description: |
|
512 | 512 | e |
|
513 | 513 | |
|
514 | 514 | |
|
515 | 515 | $ hg log -vC -r4 -Tjson |
|
516 | 516 | [ |
|
517 | 517 | { |
|
518 | 518 | "rev": 4, |
|
519 | 519 | "node": "7e4639b4691b9f84b81036a8d4fb218ce3c5e3a3", |
|
520 | 520 | "branch": "default", |
|
521 | 521 | "phase": "draft", |
|
522 | 522 | "user": "test", |
|
523 | 523 | "date": [5, 0], |
|
524 | 524 | "desc": "e", |
|
525 | 525 | "bookmarks": [], |
|
526 | 526 | "tags": ["tip"], |
|
527 | 527 | "parents": ["2ca5ba7019804f1f597249caddf22a64d34df0ba"], |
|
528 | 528 | "files": ["dir/b", "e"], |
|
529 | 529 | "copies": {"e": "dir/b"} |
|
530 | 530 | } |
|
531 | 531 | ] |
|
532 | 532 | |
|
533 | 533 | log copies, non-linear manifest |
|
534 | 534 | |
|
535 | 535 | $ hg up -C 3 |
|
536 | 536 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
537 | 537 | $ hg mv dir/b e |
|
538 | 538 | $ echo foo > foo |
|
539 | 539 | $ hg ci -Ame2 -d '6 0' |
|
540 | 540 | adding foo |
|
541 | 541 | created new head |
|
542 | 542 | $ hg log -v --template '{rev} {file_copies}\n' -r 5 |
|
543 | 543 | 5 e (dir/b) |
|
544 | 544 | |
|
545 | 545 | |
|
546 | 546 | log copies, execute bit set |
|
547 | 547 | |
|
548 | 548 | #if execbit |
|
549 | 549 | $ chmod +x e |
|
550 | 550 | $ hg ci -me3 -d '7 0' |
|
551 | 551 | $ hg log -v --template '{rev} {file_copies}\n' -r 6 |
|
552 | 552 | 6 |
|
553 | 553 | #endif |
|
554 | 554 | |
|
555 | 555 | |
|
556 | 556 | log -p d |
|
557 | 557 | |
|
558 | 558 | $ hg log -pv d |
|
559 | 559 | changeset: 3:2ca5ba701980 |
|
560 | 560 | user: test |
|
561 | 561 | date: Thu Jan 01 00:00:04 1970 +0000 |
|
562 | 562 | files: a b d g |
|
563 | 563 | description: |
|
564 | 564 | d |
|
565 | 565 | |
|
566 | 566 | |
|
567 | 567 | diff -r f8954cd4dc1f -r 2ca5ba701980 d |
|
568 | 568 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
569 | 569 | +++ b/d Thu Jan 01 00:00:04 1970 +0000 |
|
570 | 570 | @@ -0,0 +1,1 @@ |
|
571 | 571 | +a |
|
572 | 572 | |
|
573 | 573 | |
|
574 | 574 | |
|
575 | 575 | log --removed file |
|
576 | 576 | |
|
577 | 577 | $ hg log --removed -v a |
|
578 | 578 | changeset: 3:2ca5ba701980 |
|
579 | 579 | user: test |
|
580 | 580 | date: Thu Jan 01 00:00:04 1970 +0000 |
|
581 | 581 | files: a b d g |
|
582 | 582 | description: |
|
583 | 583 | d |
|
584 | 584 | |
|
585 | 585 | |
|
586 | 586 | changeset: 0:9161b9aeaf16 |
|
587 | 587 | user: test |
|
588 | 588 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
589 | 589 | files: a f |
|
590 | 590 | description: |
|
591 | 591 | a |
|
592 | 592 | |
|
593 | 593 | |
|
594 | 594 | |
|
595 | 595 | log --removed revrange file |
|
596 | 596 | |
|
597 | 597 | $ hg log --removed -v -r0:2 a |
|
598 | 598 | changeset: 0:9161b9aeaf16 |
|
599 | 599 | user: test |
|
600 | 600 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
601 | 601 | files: a f |
|
602 | 602 | description: |
|
603 | 603 | a |
|
604 | 604 | |
|
605 | 605 | |
|
606 | 606 | $ cd .. |
|
607 | 607 | |
|
608 | 608 | log --follow tests |
|
609 | 609 | |
|
610 | 610 | $ hg init follow |
|
611 | 611 | $ cd follow |
|
612 | 612 | |
|
613 | 613 | $ echo base > base |
|
614 | 614 | $ hg ci -Ambase -d '1 0' |
|
615 | 615 | adding base |
|
616 | 616 | |
|
617 | 617 | $ echo r1 >> base |
|
618 | 618 | $ hg ci -Amr1 -d '1 0' |
|
619 | 619 | $ echo r2 >> base |
|
620 | 620 | $ hg ci -Amr2 -d '1 0' |
|
621 | 621 | |
|
622 | 622 | $ hg up -C 1 |
|
623 | 623 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
624 | 624 | $ echo b1 > b1 |
|
625 | 625 | |
|
626 | 626 | log -r "follow('set:clean()')" |
|
627 | 627 | |
|
628 | 628 | $ hg log -r "follow('set:clean()')" |
|
629 | 629 | changeset: 0:67e992f2c4f3 |
|
630 | 630 | user: test |
|
631 | 631 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
632 | 632 | summary: base |
|
633 | 633 | |
|
634 | 634 | changeset: 1:3d5bf5654eda |
|
635 | 635 | user: test |
|
636 | 636 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
637 | 637 | summary: r1 |
|
638 | 638 | |
|
639 | 639 | |
|
640 | 640 | $ hg ci -Amb1 -d '1 0' |
|
641 | 641 | adding b1 |
|
642 | 642 | created new head |
|
643 | 643 | |
|
644 | 644 | |
|
645 | 645 | log -f |
|
646 | 646 | |
|
647 | 647 | $ hg log -f |
|
648 | 648 | changeset: 3:e62f78d544b4 |
|
649 | 649 | tag: tip |
|
650 | 650 | parent: 1:3d5bf5654eda |
|
651 | 651 | user: test |
|
652 | 652 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
653 | 653 | summary: b1 |
|
654 | 654 | |
|
655 | 655 | changeset: 1:3d5bf5654eda |
|
656 | 656 | user: test |
|
657 | 657 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
658 | 658 | summary: r1 |
|
659 | 659 | |
|
660 | 660 | changeset: 0:67e992f2c4f3 |
|
661 | 661 | user: test |
|
662 | 662 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
663 | 663 | summary: base |
|
664 | 664 | |
|
665 | 665 | |
|
666 | 666 | log -r follow('glob:b*') |
|
667 | 667 | |
|
668 | 668 | $ hg log -r "follow('glob:b*')" |
|
669 | 669 | changeset: 0:67e992f2c4f3 |
|
670 | 670 | user: test |
|
671 | 671 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
672 | 672 | summary: base |
|
673 | 673 | |
|
674 | 674 | changeset: 1:3d5bf5654eda |
|
675 | 675 | user: test |
|
676 | 676 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
677 | 677 | summary: r1 |
|
678 | 678 | |
|
679 | 679 | changeset: 3:e62f78d544b4 |
|
680 | 680 | tag: tip |
|
681 | 681 | parent: 1:3d5bf5654eda |
|
682 | 682 | user: test |
|
683 | 683 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
684 | 684 | summary: b1 |
|
685 | 685 | |
|
686 | 686 | log -f -r '1 + 4' |
|
687 | 687 | |
|
688 | 688 | $ hg up -C 0 |
|
689 | 689 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
690 | 690 | $ echo b2 > b2 |
|
691 | 691 | $ hg ci -Amb2 -d '1 0' |
|
692 | 692 | adding b2 |
|
693 | 693 | created new head |
|
694 | 694 | $ hg log -f -r '1 + 4' |
|
695 | 695 | changeset: 4:ddb82e70d1a1 |
|
696 | 696 | tag: tip |
|
697 | 697 | parent: 0:67e992f2c4f3 |
|
698 | 698 | user: test |
|
699 | 699 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
700 | 700 | summary: b2 |
|
701 | 701 | |
|
702 | 702 | changeset: 1:3d5bf5654eda |
|
703 | 703 | user: test |
|
704 | 704 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
705 | 705 | summary: r1 |
|
706 | 706 | |
|
707 | 707 | changeset: 0:67e992f2c4f3 |
|
708 | 708 | user: test |
|
709 | 709 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
710 | 710 | summary: base |
|
711 | 711 | |
|
712 | 712 | log -r "follow('set:grep(b2)')" |
|
713 | 713 | |
|
714 | 714 | $ hg log -r "follow('set:grep(b2)')" |
|
715 | 715 | changeset: 4:ddb82e70d1a1 |
|
716 | 716 | tag: tip |
|
717 | 717 | parent: 0:67e992f2c4f3 |
|
718 | 718 | user: test |
|
719 | 719 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
720 | 720 | summary: b2 |
|
721 | 721 | |
|
722 | 722 | log -r "follow('set:grep(b2)', 4)" |
|
723 | 723 | |
|
724 | 724 | $ hg up -qC 0 |
|
725 | 725 | $ hg log -r "follow('set:grep(b2)', 4)" |
|
726 | 726 | changeset: 4:ddb82e70d1a1 |
|
727 | 727 | tag: tip |
|
728 | 728 | parent: 0:67e992f2c4f3 |
|
729 | 729 | user: test |
|
730 | 730 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
731 | 731 | summary: b2 |
|
732 | 732 | |
|
733 | 733 | $ hg up -qC 4 |
|
734 | 734 | |
|
735 | 735 | log -f -r null |
|
736 | 736 | |
|
737 | 737 | $ hg log -f -r null |
|
738 | 738 | changeset: -1:000000000000 |
|
739 | 739 | user: |
|
740 | 740 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
741 | 741 | |
|
742 | 742 | $ hg log -f -r null -G |
|
743 | 743 | o changeset: -1:000000000000 |
|
744 | 744 | user: |
|
745 | 745 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
746 | 746 | |
|
747 | 747 | |
|
748 | 748 | |
|
749 | 749 | log -f with null parent |
|
750 | 750 | |
|
751 | 751 | $ hg up -C null |
|
752 | 752 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
753 | 753 | $ hg log -f |
|
754 | 754 | |
|
755 | 755 | |
|
756 | 756 | log -r . with two parents |
|
757 | 757 | |
|
758 | 758 | $ hg up -C 3 |
|
759 | 759 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
760 | 760 | $ hg merge tip |
|
761 | 761 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
762 | 762 | (branch merge, don't forget to commit) |
|
763 | 763 | $ hg log -r . |
|
764 | 764 | changeset: 3:e62f78d544b4 |
|
765 | 765 | parent: 1:3d5bf5654eda |
|
766 | 766 | user: test |
|
767 | 767 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
768 | 768 | summary: b1 |
|
769 | 769 | |
|
770 | 770 | |
|
771 | 771 | |
|
772 | 772 | log -r . with one parent |
|
773 | 773 | |
|
774 | 774 | $ hg ci -mm12 -d '1 0' |
|
775 | 775 | $ hg log -r . |
|
776 | 776 | changeset: 5:302e9dd6890d |
|
777 | 777 | tag: tip |
|
778 | 778 | parent: 3:e62f78d544b4 |
|
779 | 779 | parent: 4:ddb82e70d1a1 |
|
780 | 780 | user: test |
|
781 | 781 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
782 | 782 | summary: m12 |
|
783 | 783 | |
|
784 | 784 | |
|
785 | 785 | $ echo postm >> b1 |
|
786 | 786 | $ hg ci -Amb1.1 -d'1 0' |
|
787 | 787 | |
|
788 | 788 | |
|
789 | 789 | log --follow-first |
|
790 | 790 | |
|
791 | 791 | $ hg log --follow-first |
|
792 | 792 | changeset: 6:2404bbcab562 |
|
793 | 793 | tag: tip |
|
794 | 794 | user: test |
|
795 | 795 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
796 | 796 | summary: b1.1 |
|
797 | 797 | |
|
798 | 798 | changeset: 5:302e9dd6890d |
|
799 | 799 | parent: 3:e62f78d544b4 |
|
800 | 800 | parent: 4:ddb82e70d1a1 |
|
801 | 801 | user: test |
|
802 | 802 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
803 | 803 | summary: m12 |
|
804 | 804 | |
|
805 | 805 | changeset: 3:e62f78d544b4 |
|
806 | 806 | parent: 1:3d5bf5654eda |
|
807 | 807 | user: test |
|
808 | 808 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
809 | 809 | summary: b1 |
|
810 | 810 | |
|
811 | 811 | changeset: 1:3d5bf5654eda |
|
812 | 812 | user: test |
|
813 | 813 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
814 | 814 | summary: r1 |
|
815 | 815 | |
|
816 | 816 | changeset: 0:67e992f2c4f3 |
|
817 | 817 | user: test |
|
818 | 818 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
819 | 819 | summary: base |
|
820 | 820 | |
|
821 | 821 | |
|
822 | 822 | |
|
823 | 823 | log -P 2 |
|
824 | 824 | |
|
825 | 825 | $ hg log -P 2 |
|
826 | 826 | changeset: 6:2404bbcab562 |
|
827 | 827 | tag: tip |
|
828 | 828 | user: test |
|
829 | 829 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
830 | 830 | summary: b1.1 |
|
831 | 831 | |
|
832 | 832 | changeset: 5:302e9dd6890d |
|
833 | 833 | parent: 3:e62f78d544b4 |
|
834 | 834 | parent: 4:ddb82e70d1a1 |
|
835 | 835 | user: test |
|
836 | 836 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
837 | 837 | summary: m12 |
|
838 | 838 | |
|
839 | 839 | changeset: 4:ddb82e70d1a1 |
|
840 | 840 | parent: 0:67e992f2c4f3 |
|
841 | 841 | user: test |
|
842 | 842 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
843 | 843 | summary: b2 |
|
844 | 844 | |
|
845 | 845 | changeset: 3:e62f78d544b4 |
|
846 | 846 | parent: 1:3d5bf5654eda |
|
847 | 847 | user: test |
|
848 | 848 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
849 | 849 | summary: b1 |
|
850 | 850 | |
|
851 | 851 | |
|
852 | 852 | |
|
853 | 853 | log -r tip -p --git |
|
854 | 854 | |
|
855 | 855 | $ hg log -r tip -p --git |
|
856 | 856 | changeset: 6:2404bbcab562 |
|
857 | 857 | tag: tip |
|
858 | 858 | user: test |
|
859 | 859 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
860 | 860 | summary: b1.1 |
|
861 | 861 | |
|
862 | 862 | diff --git a/b1 b/b1 |
|
863 | 863 | --- a/b1 |
|
864 | 864 | +++ b/b1 |
|
865 | 865 | @@ -1,1 +1,2 @@ |
|
866 | 866 | b1 |
|
867 | 867 | +postm |
|
868 | 868 | |
|
869 | 869 | |
|
870 | 870 | |
|
871 | 871 | log -r "" |
|
872 | 872 | |
|
873 | 873 | $ hg log -r '' |
|
874 | 874 | hg: parse error: empty query |
|
875 | 875 | [255] |
|
876 | 876 | |
|
877 | 877 | log -r <some unknown node id> |
|
878 | 878 | |
|
879 | 879 | $ hg log -r 1000000000000000000000000000000000000000 |
|
880 | 880 | abort: unknown revision '1000000000000000000000000000000000000000'! |
|
881 | 881 | [255] |
|
882 | 882 | |
|
883 | 883 | log -k r1 |
|
884 | 884 | |
|
885 | 885 | $ hg log -k r1 |
|
886 | 886 | changeset: 1:3d5bf5654eda |
|
887 | 887 | user: test |
|
888 | 888 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
889 | 889 | summary: r1 |
|
890 | 890 | |
|
891 | 891 | log -p -l2 --color=always |
|
892 | 892 | |
|
893 | 893 | $ hg --config extensions.color= --config color.mode=ansi \ |
|
894 | 894 | > log -p -l2 --color=always |
|
895 | 895 | \x1b[0;33mchangeset: 6:2404bbcab562\x1b[0m (esc) |
|
896 | 896 | tag: tip |
|
897 | 897 | user: test |
|
898 | 898 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
899 | 899 | summary: b1.1 |
|
900 | 900 | |
|
901 | 901 | \x1b[0;1mdiff -r 302e9dd6890d -r 2404bbcab562 b1\x1b[0m (esc) |
|
902 | 902 | \x1b[0;31;1m--- a/b1 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc) |
|
903 | 903 | \x1b[0;32;1m+++ b/b1 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc) |
|
904 | 904 | \x1b[0;35m@@ -1,1 +1,2 @@\x1b[0m (esc) |
|
905 | 905 | b1 |
|
906 | 906 | \x1b[0;32m+postm\x1b[0m (esc) |
|
907 | 907 | |
|
908 | 908 | \x1b[0;33mchangeset: 5:302e9dd6890d\x1b[0m (esc) |
|
909 | 909 | parent: 3:e62f78d544b4 |
|
910 | 910 | parent: 4:ddb82e70d1a1 |
|
911 | 911 | user: test |
|
912 | 912 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
913 | 913 | summary: m12 |
|
914 | 914 | |
|
915 | 915 | \x1b[0;1mdiff -r e62f78d544b4 -r 302e9dd6890d b2\x1b[0m (esc) |
|
916 | 916 | \x1b[0;31;1m--- /dev/null Thu Jan 01 00:00:00 1970 +0000\x1b[0m (esc) |
|
917 | 917 | \x1b[0;32;1m+++ b/b2 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc) |
|
918 | 918 | \x1b[0;35m@@ -0,0 +1,1 @@\x1b[0m (esc) |
|
919 | 919 | \x1b[0;32m+b2\x1b[0m (esc) |
|
920 | 920 | |
|
921 | 921 | |
|
922 | 922 | |
|
923 | 923 | log -r tip --stat |
|
924 | 924 | |
|
925 | 925 | $ hg log -r tip --stat |
|
926 | 926 | changeset: 6:2404bbcab562 |
|
927 | 927 | tag: tip |
|
928 | 928 | user: test |
|
929 | 929 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
930 | 930 | summary: b1.1 |
|
931 | 931 | |
|
932 | 932 | b1 | 1 + |
|
933 | 933 | 1 files changed, 1 insertions(+), 0 deletions(-) |
|
934 | 934 | |
|
935 | 935 | |
|
936 | 936 | $ cd .. |
|
937 | 937 | |
|
938 | 938 | log --follow --patch FILE in repository where linkrev isn't trustworthy |
|
939 | 939 | (issue5376) |
|
940 | 940 | |
|
941 | 941 | $ hg init follow-dup |
|
942 | 942 | $ cd follow-dup |
|
943 | 943 | $ cat <<EOF >> .hg/hgrc |
|
944 | 944 | > [ui] |
|
945 | 945 | > logtemplate = '=== {rev}: {desc}\n' |
|
946 | 946 | > [diff] |
|
947 | 947 | > nodates = True |
|
948 | 948 | > EOF |
|
949 | 949 | $ echo 0 >> a |
|
950 | 950 | $ hg ci -qAm 'a0' |
|
951 | 951 | $ echo 1 >> a |
|
952 | 952 | $ hg ci -m 'a1' |
|
953 | 953 | $ hg up -q 0 |
|
954 | 954 | $ echo 1 >> a |
|
955 | 955 | $ touch b |
|
956 | 956 | $ hg ci -qAm 'a1 with b' |
|
957 | 957 | $ echo 3 >> a |
|
958 | 958 | $ hg ci -m 'a3' |
|
959 | 959 | |
|
960 | 960 | fctx.rev() == 2, but fctx.linkrev() == 1 |
|
961 | 961 | |
|
962 | 962 | $ hg log -pf a |
|
963 | 963 | === 3: a3 |
|
964 | 964 | diff -r 4ea02ba94d66 -r e7a6331a34f0 a |
|
965 | 965 | --- a/a |
|
966 | 966 | +++ b/a |
|
967 | 967 | @@ -1,2 +1,3 @@ |
|
968 | 968 | 0 |
|
969 | 969 | 1 |
|
970 | 970 | +3 |
|
971 | 971 | |
|
972 | 972 | === 2: a1 with b |
|
973 | 973 | diff -r 49b5e81287e2 -r 4ea02ba94d66 a |
|
974 | 974 | --- a/a |
|
975 | 975 | +++ b/a |
|
976 | 976 | @@ -1,1 +1,2 @@ |
|
977 | 977 | 0 |
|
978 | 978 | +1 |
|
979 | 979 | |
|
980 | 980 | === 0: a0 |
|
981 | 981 | diff -r 000000000000 -r 49b5e81287e2 a |
|
982 | 982 | --- /dev/null |
|
983 | 983 | +++ b/a |
|
984 | 984 | @@ -0,0 +1,1 @@ |
|
985 | 985 | +0 |
|
986 | 986 | |
|
987 | 987 | |
|
988 | 988 | fctx.introrev() == 2, but fctx.linkrev() == 1 |
|
989 | 989 | |
|
990 | 990 | $ hg up -q 2 |
|
991 | 991 | $ hg log -pf a |
|
992 | 992 | === 2: a1 with b |
|
993 | 993 | diff -r 49b5e81287e2 -r 4ea02ba94d66 a |
|
994 | 994 | --- a/a |
|
995 | 995 | +++ b/a |
|
996 | 996 | @@ -1,1 +1,2 @@ |
|
997 | 997 | 0 |
|
998 | 998 | +1 |
|
999 | 999 | |
|
1000 | 1000 | === 0: a0 |
|
1001 | 1001 | diff -r 000000000000 -r 49b5e81287e2 a |
|
1002 | 1002 | --- /dev/null |
|
1003 | 1003 | +++ b/a |
|
1004 | 1004 | @@ -0,0 +1,1 @@ |
|
1005 | 1005 | +0 |
|
1006 | 1006 | |
|
1007 | 1007 | |
|
1008 | 1008 | $ cd .. |
|
1009 | 1009 | |
|
1010 | 1010 | Test that log should respect the order of -rREV even if multiple OR conditions |
|
1011 | 1011 | are specified (issue5100): |
|
1012 | 1012 | |
|
1013 | 1013 | $ hg init revorder |
|
1014 | 1014 | $ cd revorder |
|
1015 | 1015 | |
|
1016 | 1016 | $ hg branch -q b0 |
|
1017 | 1017 | $ echo 0 >> f0 |
|
1018 | 1018 | $ hg ci -qAm k0 -u u0 |
|
1019 | 1019 | $ hg branch -q b1 |
|
1020 | 1020 | $ echo 1 >> f1 |
|
1021 | 1021 | $ hg ci -qAm k1 -u u1 |
|
1022 | 1022 | $ hg branch -q b2 |
|
1023 | 1023 | $ echo 2 >> f2 |
|
1024 | 1024 | $ hg ci -qAm k2 -u u2 |
|
1025 | 1025 | |
|
1026 | 1026 | $ hg update -q b2 |
|
1027 | 1027 | $ echo 3 >> f2 |
|
1028 | 1028 | $ hg ci -qAm k2 -u u2 |
|
1029 | 1029 | $ hg update -q b1 |
|
1030 | 1030 | $ echo 4 >> f1 |
|
1031 | 1031 | $ hg ci -qAm k1 -u u1 |
|
1032 | 1032 | $ hg update -q b0 |
|
1033 | 1033 | $ echo 5 >> f0 |
|
1034 | 1034 | $ hg ci -qAm k0 -u u0 |
|
1035 | 1035 | |
|
1036 | 1036 | summary of revisions: |
|
1037 | 1037 | |
|
1038 | 1038 | $ hg log -G -T '{rev} {branch} {author} {desc} {files}\n' |
|
1039 | 1039 | @ 5 b0 u0 k0 f0 |
|
1040 | 1040 | | |
|
1041 | 1041 | | o 4 b1 u1 k1 f1 |
|
1042 | 1042 | | | |
|
1043 | 1043 | | | o 3 b2 u2 k2 f2 |
|
1044 | 1044 | | | | |
|
1045 | 1045 | | | o 2 b2 u2 k2 f2 |
|
1046 | 1046 | | |/ |
|
1047 | 1047 | | o 1 b1 u1 k1 f1 |
|
1048 | 1048 | |/ |
|
1049 | 1049 | o 0 b0 u0 k0 f0 |
|
1050 | 1050 | |
|
1051 | 1051 | |
|
1052 | 1052 | log -b BRANCH in ascending order: |
|
1053 | 1053 | |
|
1054 | 1054 | $ hg log -r0:tip -T '{rev} {branch}\n' -b b0 -b b1 |
|
1055 | 1055 | 0 b0 |
|
1056 | 1056 | 1 b1 |
|
1057 | 1057 | 4 b1 |
|
1058 | 1058 | 5 b0 |
|
1059 | 1059 | $ hg log -r0:tip -T '{rev} {branch}\n' -b b1 -b b0 |
|
1060 | 1060 | 0 b0 |
|
1061 | 1061 | 1 b1 |
|
1062 | 1062 | 4 b1 |
|
1063 | 1063 | 5 b0 |
|
1064 | 1064 | |
|
1065 | 1065 | log --only-branch BRANCH in descending order: |
|
1066 | 1066 | |
|
1067 | 1067 | $ hg log -rtip:0 -T '{rev} {branch}\n' --only-branch b1 --only-branch b2 |
|
1068 | 1068 | 4 b1 |
|
1069 | 1069 | 3 b2 |
|
1070 | 1070 | 2 b2 |
|
1071 | 1071 | 1 b1 |
|
1072 | 1072 | $ hg log -rtip:0 -T '{rev} {branch}\n' --only-branch b2 --only-branch b1 |
|
1073 | 1073 | 4 b1 |
|
1074 | 1074 | 3 b2 |
|
1075 | 1075 | 2 b2 |
|
1076 | 1076 | 1 b1 |
|
1077 | 1077 | |
|
1078 | 1078 | log -u USER in ascending order, against compound set: |
|
1079 | 1079 | |
|
1080 | 1080 | $ hg log -r'::head()' -T '{rev} {author}\n' -u u0 -u u2 |
|
1081 | 1081 | 0 u0 |
|
1082 | 1082 | 2 u2 |
|
1083 | 1083 | 3 u2 |
|
1084 | 1084 | 5 u0 |
|
1085 | 1085 | $ hg log -r'::head()' -T '{rev} {author}\n' -u u2 -u u0 |
|
1086 | 1086 | 0 u0 |
|
1087 | 1087 | 2 u2 |
|
1088 | 1088 | 3 u2 |
|
1089 | 1089 | 5 u0 |
|
1090 | 1090 | |
|
1091 | 1091 | log -k TEXT in descending order, against compound set: |
|
1092 | 1092 | |
|
1093 | 1093 | $ hg log -r'5 + reverse(::3)' -T '{rev} {desc}\n' -k k0 -k k1 -k k2 |
|
1094 | 1094 | 5 k0 |
|
1095 | 1095 | 3 k2 |
|
1096 | 1096 | 2 k2 |
|
1097 | 1097 | 1 k1 |
|
1098 | 1098 | 0 k0 |
|
1099 | 1099 | $ hg log -r'5 + reverse(::3)' -T '{rev} {desc}\n' -k k2 -k k1 -k k0 |
|
1100 | 1100 | 5 k0 |
|
1101 | 1101 | 3 k2 |
|
1102 | 1102 | 2 k2 |
|
1103 | 1103 | 1 k1 |
|
1104 | 1104 | 0 k0 |
|
1105 | 1105 | |
|
1106 | 1106 | log FILE in ascending order, against dagrange: |
|
1107 | 1107 | |
|
1108 | 1108 | $ hg log -r1:: -T '{rev} {files}\n' f1 f2 |
|
1109 | 1109 | 1 f1 |
|
1110 | 1110 | 2 f2 |
|
1111 | 1111 | 3 f2 |
|
1112 | 1112 | 4 f1 |
|
1113 | 1113 | $ hg log -r1:: -T '{rev} {files}\n' f2 f1 |
|
1114 | 1114 | 1 f1 |
|
1115 | 1115 | 2 f2 |
|
1116 | 1116 | 3 f2 |
|
1117 | 1117 | 4 f1 |
|
1118 | 1118 | |
|
1119 | 1119 | $ cd .. |
|
1120 | 1120 | |
|
1121 | 1121 | User |
|
1122 | 1122 | |
|
1123 | 1123 | $ hg init usertest |
|
1124 | 1124 | $ cd usertest |
|
1125 | 1125 | |
|
1126 | 1126 | $ echo a > a |
|
1127 | 1127 | $ hg ci -A -m "a" -u "User One <user1@example.org>" |
|
1128 | 1128 | adding a |
|
1129 | 1129 | $ echo b > b |
|
1130 | 1130 | $ hg ci -A -m "b" -u "User Two <user2@example.org>" |
|
1131 | 1131 | adding b |
|
1132 | 1132 | |
|
1133 | 1133 | $ hg log -u "User One <user1@example.org>" |
|
1134 | 1134 | changeset: 0:29a4c94f1924 |
|
1135 | 1135 | user: User One <user1@example.org> |
|
1136 | 1136 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1137 | 1137 | summary: a |
|
1138 | 1138 | |
|
1139 | 1139 | $ hg log -u "user1" -u "user2" |
|
1140 | 1140 | changeset: 1:e834b5e69c0e |
|
1141 | 1141 | tag: tip |
|
1142 | 1142 | user: User Two <user2@example.org> |
|
1143 | 1143 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1144 | 1144 | summary: b |
|
1145 | 1145 | |
|
1146 | 1146 | changeset: 0:29a4c94f1924 |
|
1147 | 1147 | user: User One <user1@example.org> |
|
1148 | 1148 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1149 | 1149 | summary: a |
|
1150 | 1150 | |
|
1151 | 1151 | $ hg log -u "user3" |
|
1152 | 1152 | |
|
1153 | 1153 | $ cd .. |
|
1154 | 1154 | |
|
1155 | 1155 | $ hg init branches |
|
1156 | 1156 | $ cd branches |
|
1157 | 1157 | |
|
1158 | 1158 | $ echo a > a |
|
1159 | 1159 | $ hg ci -A -m "commit on default" |
|
1160 | 1160 | adding a |
|
1161 | 1161 | $ hg branch test |
|
1162 | 1162 | marked working directory as branch test |
|
1163 | 1163 | (branches are permanent and global, did you want a bookmark?) |
|
1164 | 1164 | $ echo b > b |
|
1165 | 1165 | $ hg ci -A -m "commit on test" |
|
1166 | 1166 | adding b |
|
1167 | 1167 | |
|
1168 | 1168 | $ hg up default |
|
1169 | 1169 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1170 | 1170 | $ echo c > c |
|
1171 | 1171 | $ hg ci -A -m "commit on default" |
|
1172 | 1172 | adding c |
|
1173 | 1173 | $ hg up test |
|
1174 | 1174 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1175 | 1175 | $ echo c > c |
|
1176 | 1176 | $ hg ci -A -m "commit on test" |
|
1177 | 1177 | adding c |
|
1178 | 1178 | |
|
1179 | 1179 | |
|
1180 | 1180 | log -b default |
|
1181 | 1181 | |
|
1182 | 1182 | $ hg log -b default |
|
1183 | 1183 | changeset: 2:c3a4f03cc9a7 |
|
1184 | 1184 | parent: 0:24427303d56f |
|
1185 | 1185 | user: test |
|
1186 | 1186 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1187 | 1187 | summary: commit on default |
|
1188 | 1188 | |
|
1189 | 1189 | changeset: 0:24427303d56f |
|
1190 | 1190 | user: test |
|
1191 | 1191 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1192 | 1192 | summary: commit on default |
|
1193 | 1193 | |
|
1194 | 1194 | |
|
1195 | 1195 | |
|
1196 | 1196 | log -b test |
|
1197 | 1197 | |
|
1198 | 1198 | $ hg log -b test |
|
1199 | 1199 | changeset: 3:f5d8de11c2e2 |
|
1200 | 1200 | branch: test |
|
1201 | 1201 | tag: tip |
|
1202 | 1202 | parent: 1:d32277701ccb |
|
1203 | 1203 | user: test |
|
1204 | 1204 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1205 | 1205 | summary: commit on test |
|
1206 | 1206 | |
|
1207 | 1207 | changeset: 1:d32277701ccb |
|
1208 | 1208 | branch: test |
|
1209 | 1209 | user: test |
|
1210 | 1210 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1211 | 1211 | summary: commit on test |
|
1212 | 1212 | |
|
1213 | 1213 | |
|
1214 | 1214 | |
|
1215 | 1215 | log -b dummy |
|
1216 | 1216 | |
|
1217 | 1217 | $ hg log -b dummy |
|
1218 | 1218 | abort: unknown revision 'dummy'! |
|
1219 | 1219 | [255] |
|
1220 | 1220 | |
|
1221 | 1221 | |
|
1222 | 1222 | log -b . |
|
1223 | 1223 | |
|
1224 | 1224 | $ hg log -b . |
|
1225 | 1225 | changeset: 3:f5d8de11c2e2 |
|
1226 | 1226 | branch: test |
|
1227 | 1227 | tag: tip |
|
1228 | 1228 | parent: 1:d32277701ccb |
|
1229 | 1229 | user: test |
|
1230 | 1230 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1231 | 1231 | summary: commit on test |
|
1232 | 1232 | |
|
1233 | 1233 | changeset: 1:d32277701ccb |
|
1234 | 1234 | branch: test |
|
1235 | 1235 | user: test |
|
1236 | 1236 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1237 | 1237 | summary: commit on test |
|
1238 | 1238 | |
|
1239 | 1239 | |
|
1240 | 1240 | |
|
1241 | 1241 | log -b default -b test |
|
1242 | 1242 | |
|
1243 | 1243 | $ hg log -b default -b test |
|
1244 | 1244 | changeset: 3:f5d8de11c2e2 |
|
1245 | 1245 | branch: test |
|
1246 | 1246 | tag: tip |
|
1247 | 1247 | parent: 1:d32277701ccb |
|
1248 | 1248 | user: test |
|
1249 | 1249 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1250 | 1250 | summary: commit on test |
|
1251 | 1251 | |
|
1252 | 1252 | changeset: 2:c3a4f03cc9a7 |
|
1253 | 1253 | parent: 0:24427303d56f |
|
1254 | 1254 | user: test |
|
1255 | 1255 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1256 | 1256 | summary: commit on default |
|
1257 | 1257 | |
|
1258 | 1258 | changeset: 1:d32277701ccb |
|
1259 | 1259 | branch: test |
|
1260 | 1260 | user: test |
|
1261 | 1261 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1262 | 1262 | summary: commit on test |
|
1263 | 1263 | |
|
1264 | 1264 | changeset: 0:24427303d56f |
|
1265 | 1265 | user: test |
|
1266 | 1266 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1267 | 1267 | summary: commit on default |
|
1268 | 1268 | |
|
1269 | 1269 | |
|
1270 | 1270 | |
|
1271 | 1271 | log -b default -b . |
|
1272 | 1272 | |
|
1273 | 1273 | $ hg log -b default -b . |
|
1274 | 1274 | changeset: 3:f5d8de11c2e2 |
|
1275 | 1275 | branch: test |
|
1276 | 1276 | tag: tip |
|
1277 | 1277 | parent: 1:d32277701ccb |
|
1278 | 1278 | user: test |
|
1279 | 1279 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1280 | 1280 | summary: commit on test |
|
1281 | 1281 | |
|
1282 | 1282 | changeset: 2:c3a4f03cc9a7 |
|
1283 | 1283 | parent: 0:24427303d56f |
|
1284 | 1284 | user: test |
|
1285 | 1285 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1286 | 1286 | summary: commit on default |
|
1287 | 1287 | |
|
1288 | 1288 | changeset: 1:d32277701ccb |
|
1289 | 1289 | branch: test |
|
1290 | 1290 | user: test |
|
1291 | 1291 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1292 | 1292 | summary: commit on test |
|
1293 | 1293 | |
|
1294 | 1294 | changeset: 0:24427303d56f |
|
1295 | 1295 | user: test |
|
1296 | 1296 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1297 | 1297 | summary: commit on default |
|
1298 | 1298 | |
|
1299 | 1299 | |
|
1300 | 1300 | |
|
1301 | 1301 | log -b . -b test |
|
1302 | 1302 | |
|
1303 | 1303 | $ hg log -b . -b test |
|
1304 | 1304 | changeset: 3:f5d8de11c2e2 |
|
1305 | 1305 | branch: test |
|
1306 | 1306 | tag: tip |
|
1307 | 1307 | parent: 1:d32277701ccb |
|
1308 | 1308 | user: test |
|
1309 | 1309 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1310 | 1310 | summary: commit on test |
|
1311 | 1311 | |
|
1312 | 1312 | changeset: 1:d32277701ccb |
|
1313 | 1313 | branch: test |
|
1314 | 1314 | user: test |
|
1315 | 1315 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1316 | 1316 | summary: commit on test |
|
1317 | 1317 | |
|
1318 | 1318 | |
|
1319 | 1319 | |
|
1320 | 1320 | log -b 2 |
|
1321 | 1321 | |
|
1322 | 1322 | $ hg log -b 2 |
|
1323 | 1323 | changeset: 2:c3a4f03cc9a7 |
|
1324 | 1324 | parent: 0:24427303d56f |
|
1325 | 1325 | user: test |
|
1326 | 1326 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1327 | 1327 | summary: commit on default |
|
1328 | 1328 | |
|
1329 | 1329 | changeset: 0:24427303d56f |
|
1330 | 1330 | user: test |
|
1331 | 1331 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1332 | 1332 | summary: commit on default |
|
1333 | 1333 | |
|
1334 | 1334 | #if gettext |
|
1335 | 1335 | |
|
1336 | 1336 | Test that all log names are translated (e.g. branches, bookmarks, tags): |
|
1337 | 1337 | |
|
1338 | 1338 | $ hg bookmark babar -r tip |
|
1339 | 1339 | |
|
1340 | 1340 | $ HGENCODING=UTF-8 LANGUAGE=de hg log -r tip |
|
1341 | 1341 | \xc3\x84nderung: 3:f5d8de11c2e2 (esc) |
|
1342 | 1342 | Zweig: test |
|
1343 | 1343 | Lesezeichen: babar |
|
1344 | 1344 | Marke: tip |
|
1345 | 1345 | Vorg\xc3\xa4nger: 1:d32277701ccb (esc) |
|
1346 | 1346 | Nutzer: test |
|
1347 | 1347 | Datum: Thu Jan 01 00:00:00 1970 +0000 |
|
1348 | 1348 | Zusammenfassung: commit on test |
|
1349 | 1349 | |
|
1350 | 1350 | $ hg bookmark -d babar |
|
1351 | 1351 | |
|
1352 | 1352 | #endif |
|
1353 | 1353 | |
|
1354 | 1354 | log -p --cwd dir (in subdir) |
|
1355 | 1355 | |
|
1356 | 1356 | $ mkdir dir |
|
1357 | 1357 | $ hg log -p --cwd dir |
|
1358 | 1358 | changeset: 3:f5d8de11c2e2 |
|
1359 | 1359 | branch: test |
|
1360 | 1360 | tag: tip |
|
1361 | 1361 | parent: 1:d32277701ccb |
|
1362 | 1362 | user: test |
|
1363 | 1363 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1364 | 1364 | summary: commit on test |
|
1365 | 1365 | |
|
1366 | 1366 | diff -r d32277701ccb -r f5d8de11c2e2 c |
|
1367 | 1367 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1368 | 1368 | +++ b/c Thu Jan 01 00:00:00 1970 +0000 |
|
1369 | 1369 | @@ -0,0 +1,1 @@ |
|
1370 | 1370 | +c |
|
1371 | 1371 | |
|
1372 | 1372 | changeset: 2:c3a4f03cc9a7 |
|
1373 | 1373 | parent: 0:24427303d56f |
|
1374 | 1374 | user: test |
|
1375 | 1375 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1376 | 1376 | summary: commit on default |
|
1377 | 1377 | |
|
1378 | 1378 | diff -r 24427303d56f -r c3a4f03cc9a7 c |
|
1379 | 1379 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1380 | 1380 | +++ b/c Thu Jan 01 00:00:00 1970 +0000 |
|
1381 | 1381 | @@ -0,0 +1,1 @@ |
|
1382 | 1382 | +c |
|
1383 | 1383 | |
|
1384 | 1384 | changeset: 1:d32277701ccb |
|
1385 | 1385 | branch: test |
|
1386 | 1386 | user: test |
|
1387 | 1387 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1388 | 1388 | summary: commit on test |
|
1389 | 1389 | |
|
1390 | 1390 | diff -r 24427303d56f -r d32277701ccb b |
|
1391 | 1391 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1392 | 1392 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 |
|
1393 | 1393 | @@ -0,0 +1,1 @@ |
|
1394 | 1394 | +b |
|
1395 | 1395 | |
|
1396 | 1396 | changeset: 0:24427303d56f |
|
1397 | 1397 | user: test |
|
1398 | 1398 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1399 | 1399 | summary: commit on default |
|
1400 | 1400 | |
|
1401 | 1401 | diff -r 000000000000 -r 24427303d56f a |
|
1402 | 1402 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1403 | 1403 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
1404 | 1404 | @@ -0,0 +1,1 @@ |
|
1405 | 1405 | +a |
|
1406 | 1406 | |
|
1407 | 1407 | |
|
1408 | 1408 | |
|
1409 | 1409 | log -p -R repo |
|
1410 | 1410 | |
|
1411 | 1411 | $ cd dir |
|
1412 | 1412 | $ hg log -p -R .. ../a |
|
1413 | 1413 | changeset: 0:24427303d56f |
|
1414 | 1414 | user: test |
|
1415 | 1415 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1416 | 1416 | summary: commit on default |
|
1417 | 1417 | |
|
1418 | 1418 | diff -r 000000000000 -r 24427303d56f a |
|
1419 | 1419 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1420 | 1420 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
1421 | 1421 | @@ -0,0 +1,1 @@ |
|
1422 | 1422 | +a |
|
1423 | 1423 | |
|
1424 | 1424 | |
|
1425 | 1425 | $ cd ../.. |
|
1426 | 1426 | |
|
1427 | 1427 | $ hg init follow2 |
|
1428 | 1428 | $ cd follow2 |
|
1429 | 1429 | |
|
1430 | 1430 | # Build the following history: |
|
1431 | 1431 | # tip - o - x - o - x - x |
|
1432 | 1432 | # \ / |
|
1433 | 1433 | # o - o - o - x |
|
1434 | 1434 | # \ / |
|
1435 | 1435 | # o |
|
1436 | 1436 | # |
|
1437 | 1437 | # Where "o" is a revision containing "foo" and |
|
1438 | 1438 | # "x" is a revision without "foo" |
|
1439 | 1439 | |
|
1440 | 1440 | $ touch init |
|
1441 | 1441 | $ hg ci -A -m "init, unrelated" |
|
1442 | 1442 | adding init |
|
1443 | 1443 | $ echo 'foo' > init |
|
1444 | 1444 | $ hg ci -m "change, unrelated" |
|
1445 | 1445 | $ echo 'foo' > foo |
|
1446 | 1446 | $ hg ci -A -m "add unrelated old foo" |
|
1447 | 1447 | adding foo |
|
1448 | 1448 | $ hg rm foo |
|
1449 | 1449 | $ hg ci -m "delete foo, unrelated" |
|
1450 | 1450 | $ echo 'related' > foo |
|
1451 | 1451 | $ hg ci -A -m "add foo, related" |
|
1452 | 1452 | adding foo |
|
1453 | 1453 | |
|
1454 | 1454 | $ hg up 0 |
|
1455 | 1455 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1456 | 1456 | $ touch branch |
|
1457 | 1457 | $ hg ci -A -m "first branch, unrelated" |
|
1458 | 1458 | adding branch |
|
1459 | 1459 | created new head |
|
1460 | 1460 | $ touch foo |
|
1461 | 1461 | $ hg ci -A -m "create foo, related" |
|
1462 | 1462 | adding foo |
|
1463 | 1463 | $ echo 'change' > foo |
|
1464 | 1464 | $ hg ci -m "change foo, related" |
|
1465 | 1465 | |
|
1466 | 1466 | $ hg up 6 |
|
1467 | 1467 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1468 | 1468 | $ echo 'change foo in branch' > foo |
|
1469 | 1469 | $ hg ci -m "change foo in branch, related" |
|
1470 | 1470 | created new head |
|
1471 | 1471 | $ hg merge 7 |
|
1472 | 1472 | merging foo |
|
1473 | 1473 | warning: conflicts while merging foo! (edit, then use 'hg resolve --mark') |
|
1474 | 1474 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
1475 | 1475 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
1476 | 1476 | [1] |
|
1477 | 1477 | $ echo 'merge 1' > foo |
|
1478 | 1478 | $ hg resolve -m foo |
|
1479 | 1479 | (no more unresolved files) |
|
1480 | 1480 | $ hg ci -m "First merge, related" |
|
1481 | 1481 | |
|
1482 | 1482 | $ hg merge 4 |
|
1483 | 1483 | merging foo |
|
1484 | 1484 | warning: conflicts while merging foo! (edit, then use 'hg resolve --mark') |
|
1485 | 1485 | 1 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
1486 | 1486 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
1487 | 1487 | [1] |
|
1488 | 1488 | $ echo 'merge 2' > foo |
|
1489 | 1489 | $ hg resolve -m foo |
|
1490 | 1490 | (no more unresolved files) |
|
1491 | 1491 | $ hg ci -m "Last merge, related" |
|
1492 | 1492 | |
|
1493 | 1493 | $ hg log --graph |
|
1494 | 1494 | @ changeset: 10:4dae8563d2c5 |
|
1495 | 1495 | |\ tag: tip |
|
1496 | 1496 | | | parent: 9:7b35701b003e |
|
1497 | 1497 | | | parent: 4:88176d361b69 |
|
1498 | 1498 | | | user: test |
|
1499 | 1499 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1500 | 1500 | | | summary: Last merge, related |
|
1501 | 1501 | | | |
|
1502 | 1502 | | o changeset: 9:7b35701b003e |
|
1503 | 1503 | | |\ parent: 8:e5416ad8a855 |
|
1504 | 1504 | | | | parent: 7:87fe3144dcfa |
|
1505 | 1505 | | | | user: test |
|
1506 | 1506 | | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1507 | 1507 | | | | summary: First merge, related |
|
1508 | 1508 | | | | |
|
1509 | 1509 | | | o changeset: 8:e5416ad8a855 |
|
1510 | 1510 | | | | parent: 6:dc6c325fe5ee |
|
1511 | 1511 | | | | user: test |
|
1512 | 1512 | | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1513 | 1513 | | | | summary: change foo in branch, related |
|
1514 | 1514 | | | | |
|
1515 | 1515 | | o | changeset: 7:87fe3144dcfa |
|
1516 | 1516 | | |/ user: test |
|
1517 | 1517 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1518 | 1518 | | | summary: change foo, related |
|
1519 | 1519 | | | |
|
1520 | 1520 | | o changeset: 6:dc6c325fe5ee |
|
1521 | 1521 | | | user: test |
|
1522 | 1522 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1523 | 1523 | | | summary: create foo, related |
|
1524 | 1524 | | | |
|
1525 | 1525 | | o changeset: 5:73db34516eb9 |
|
1526 | 1526 | | | parent: 0:e87515fd044a |
|
1527 | 1527 | | | user: test |
|
1528 | 1528 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1529 | 1529 | | | summary: first branch, unrelated |
|
1530 | 1530 | | | |
|
1531 | 1531 | o | changeset: 4:88176d361b69 |
|
1532 | 1532 | | | user: test |
|
1533 | 1533 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1534 | 1534 | | | summary: add foo, related |
|
1535 | 1535 | | | |
|
1536 | 1536 | o | changeset: 3:dd78ae4afb56 |
|
1537 | 1537 | | | user: test |
|
1538 | 1538 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1539 | 1539 | | | summary: delete foo, unrelated |
|
1540 | 1540 | | | |
|
1541 | 1541 | o | changeset: 2:c4c64aedf0f7 |
|
1542 | 1542 | | | user: test |
|
1543 | 1543 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1544 | 1544 | | | summary: add unrelated old foo |
|
1545 | 1545 | | | |
|
1546 | 1546 | o | changeset: 1:e5faa7440653 |
|
1547 | 1547 | |/ user: test |
|
1548 | 1548 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1549 | 1549 | | summary: change, unrelated |
|
1550 | 1550 | | |
|
1551 | 1551 | o changeset: 0:e87515fd044a |
|
1552 | 1552 | user: test |
|
1553 | 1553 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1554 | 1554 | summary: init, unrelated |
|
1555 | 1555 | |
|
1556 | 1556 | |
|
1557 | 1557 | $ hg --traceback log -f foo |
|
1558 | 1558 | changeset: 10:4dae8563d2c5 |
|
1559 | 1559 | tag: tip |
|
1560 | 1560 | parent: 9:7b35701b003e |
|
1561 | 1561 | parent: 4:88176d361b69 |
|
1562 | 1562 | user: test |
|
1563 | 1563 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1564 | 1564 | summary: Last merge, related |
|
1565 | 1565 | |
|
1566 | 1566 | changeset: 9:7b35701b003e |
|
1567 | 1567 | parent: 8:e5416ad8a855 |
|
1568 | 1568 | parent: 7:87fe3144dcfa |
|
1569 | 1569 | user: test |
|
1570 | 1570 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1571 | 1571 | summary: First merge, related |
|
1572 | 1572 | |
|
1573 | 1573 | changeset: 8:e5416ad8a855 |
|
1574 | 1574 | parent: 6:dc6c325fe5ee |
|
1575 | 1575 | user: test |
|
1576 | 1576 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1577 | 1577 | summary: change foo in branch, related |
|
1578 | 1578 | |
|
1579 | 1579 | changeset: 7:87fe3144dcfa |
|
1580 | 1580 | user: test |
|
1581 | 1581 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1582 | 1582 | summary: change foo, related |
|
1583 | 1583 | |
|
1584 | 1584 | changeset: 6:dc6c325fe5ee |
|
1585 | 1585 | user: test |
|
1586 | 1586 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1587 | 1587 | summary: create foo, related |
|
1588 | 1588 | |
|
1589 | 1589 | changeset: 4:88176d361b69 |
|
1590 | 1590 | user: test |
|
1591 | 1591 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1592 | 1592 | summary: add foo, related |
|
1593 | 1593 | |
|
1594 | 1594 | |
|
1595 | 1595 | Also check when maxrev < lastrevfilelog |
|
1596 | 1596 | |
|
1597 | 1597 | $ hg --traceback log -f -r4 foo |
|
1598 | 1598 | changeset: 4:88176d361b69 |
|
1599 | 1599 | user: test |
|
1600 | 1600 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1601 | 1601 | summary: add foo, related |
|
1602 | 1602 | |
|
1603 | 1603 | changeset: 2:c4c64aedf0f7 |
|
1604 | 1604 | user: test |
|
1605 | 1605 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1606 | 1606 | summary: add unrelated old foo |
|
1607 | 1607 | |
|
1608 | 1608 | $ cd .. |
|
1609 | 1609 | |
|
1610 | 1610 | Issue2383: hg log showing _less_ differences than hg diff |
|
1611 | 1611 | |
|
1612 | 1612 | $ hg init issue2383 |
|
1613 | 1613 | $ cd issue2383 |
|
1614 | 1614 | |
|
1615 | 1615 | Create a test repo: |
|
1616 | 1616 | |
|
1617 | 1617 | $ echo a > a |
|
1618 | 1618 | $ hg ci -Am0 |
|
1619 | 1619 | adding a |
|
1620 | 1620 | $ echo b > b |
|
1621 | 1621 | $ hg ci -Am1 |
|
1622 | 1622 | adding b |
|
1623 | 1623 | $ hg co 0 |
|
1624 | 1624 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1625 | 1625 | $ echo b > a |
|
1626 | 1626 | $ hg ci -m2 |
|
1627 | 1627 | created new head |
|
1628 | 1628 | |
|
1629 | 1629 | Merge: |
|
1630 | 1630 | |
|
1631 | 1631 | $ hg merge |
|
1632 | 1632 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1633 | 1633 | (branch merge, don't forget to commit) |
|
1634 | 1634 | |
|
1635 | 1635 | Make sure there's a file listed in the merge to trigger the bug: |
|
1636 | 1636 | |
|
1637 | 1637 | $ echo c > a |
|
1638 | 1638 | $ hg ci -m3 |
|
1639 | 1639 | |
|
1640 | 1640 | Two files shown here in diff: |
|
1641 | 1641 | |
|
1642 | 1642 | $ hg diff --rev 2:3 |
|
1643 | 1643 | diff -r b09be438c43a -r 8e07aafe1edc a |
|
1644 | 1644 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
1645 | 1645 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
1646 | 1646 | @@ -1,1 +1,1 @@ |
|
1647 | 1647 | -b |
|
1648 | 1648 | +c |
|
1649 | 1649 | diff -r b09be438c43a -r 8e07aafe1edc b |
|
1650 | 1650 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1651 | 1651 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 |
|
1652 | 1652 | @@ -0,0 +1,1 @@ |
|
1653 | 1653 | +b |
|
1654 | 1654 | |
|
1655 | 1655 | Diff here should be the same: |
|
1656 | 1656 | |
|
1657 | 1657 | $ hg log -vpr 3 |
|
1658 | 1658 | changeset: 3:8e07aafe1edc |
|
1659 | 1659 | tag: tip |
|
1660 | 1660 | parent: 2:b09be438c43a |
|
1661 | 1661 | parent: 1:925d80f479bb |
|
1662 | 1662 | user: test |
|
1663 | 1663 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1664 | 1664 | files: a |
|
1665 | 1665 | description: |
|
1666 | 1666 | 3 |
|
1667 | 1667 | |
|
1668 | 1668 | |
|
1669 | 1669 | diff -r b09be438c43a -r 8e07aafe1edc a |
|
1670 | 1670 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
1671 | 1671 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
1672 | 1672 | @@ -1,1 +1,1 @@ |
|
1673 | 1673 | -b |
|
1674 | 1674 | +c |
|
1675 | 1675 | diff -r b09be438c43a -r 8e07aafe1edc b |
|
1676 | 1676 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1677 | 1677 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 |
|
1678 | 1678 | @@ -0,0 +1,1 @@ |
|
1679 | 1679 | +b |
|
1680 | 1680 | |
|
1681 | 1681 | $ cd .. |
|
1682 | 1682 | |
|
1683 | 1683 | 'hg log -r rev fn' when last(filelog(fn)) != rev |
|
1684 | 1684 | |
|
1685 | 1685 | $ hg init simplelog |
|
1686 | 1686 | $ cd simplelog |
|
1687 | 1687 | $ echo f > a |
|
1688 | 1688 | $ hg ci -Am'a' -d '0 0' |
|
1689 | 1689 | adding a |
|
1690 | 1690 | $ echo f >> a |
|
1691 | 1691 | $ hg ci -Am'a bis' -d '1 0' |
|
1692 | 1692 | |
|
1693 | 1693 | $ hg log -r0 a |
|
1694 | 1694 | changeset: 0:9f758d63dcde |
|
1695 | 1695 | user: test |
|
1696 | 1696 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1697 | 1697 | summary: a |
|
1698 | 1698 | |
|
1699 | 1699 | enable obsolete to test hidden feature |
|
1700 | 1700 | |
|
1701 | 1701 | $ cat >> $HGRCPATH << EOF |
|
1702 | 1702 | > [experimental] |
|
1703 | 1703 | > stabilization=createmarkers |
|
1704 | 1704 | > EOF |
|
1705 | 1705 | |
|
1706 | 1706 | $ hg log --template='{rev}:{node}\n' |
|
1707 | 1707 | 1:a765632148dc55d38c35c4f247c618701886cb2f |
|
1708 | 1708 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 |
|
1709 | 1709 | $ hg debugobsolete a765632148dc55d38c35c4f247c618701886cb2f |
|
1710 | 1710 | obsoleted 1 changesets |
|
1711 | 1711 | $ hg up null -q |
|
1712 | 1712 | $ hg log --template='{rev}:{node}\n' |
|
1713 | 1713 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 |
|
1714 | 1714 | $ hg log --template='{rev}:{node}\n' --hidden |
|
1715 | 1715 | 1:a765632148dc55d38c35c4f247c618701886cb2f |
|
1716 | 1716 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 |
|
1717 | 1717 | $ hg log -r a |
|
1718 | 1718 | abort: hidden revision 'a'! |
|
1719 | 1719 | (use --hidden to access hidden revisions) |
|
1720 | 1720 | [255] |
|
1721 | 1721 | |
|
1722 | 1722 | test that parent prevent a changeset to be hidden |
|
1723 | 1723 | |
|
1724 | 1724 | $ hg up 1 -q --hidden |
|
1725 | 1725 | $ hg log --template='{rev}:{node}\n' |
|
1726 | 1726 | 1:a765632148dc55d38c35c4f247c618701886cb2f |
|
1727 | 1727 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 |
|
1728 | 1728 | |
|
1729 | 1729 | test that second parent prevent a changeset to be hidden too |
|
1730 | 1730 | |
|
1731 | 1731 | $ hg debugsetparents 0 1 # nothing suitable to merge here |
|
1732 | 1732 | $ hg log --template='{rev}:{node}\n' |
|
1733 | 1733 | 1:a765632148dc55d38c35c4f247c618701886cb2f |
|
1734 | 1734 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 |
|
1735 | 1735 | $ hg debugsetparents 1 |
|
1736 | 1736 | $ hg up -q null |
|
1737 | 1737 | |
|
1738 | 1738 | bookmarks prevent a changeset being hidden |
|
1739 | 1739 | |
|
1740 | 1740 | $ hg bookmark --hidden -r 1 X |
|
1741 | 1741 | $ hg log --template '{rev}:{node}\n' |
|
1742 | 1742 | 1:a765632148dc55d38c35c4f247c618701886cb2f |
|
1743 | 1743 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 |
|
1744 | 1744 | $ hg bookmark -d X |
|
1745 | 1745 | |
|
1746 | 1746 | divergent bookmarks are not hidden |
|
1747 | 1747 | |
|
1748 | 1748 | $ hg bookmark --hidden -r 1 X@foo |
|
1749 | 1749 | $ hg log --template '{rev}:{node}\n' |
|
1750 | 1750 | 1:a765632148dc55d38c35c4f247c618701886cb2f |
|
1751 | 1751 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 |
|
1752 | 1752 | |
|
1753 | 1753 | test hidden revision 0 (issue5385) |
|
1754 | 1754 | |
|
1755 | 1755 | $ hg bookmark -d X@foo |
|
1756 | 1756 | $ hg up null -q |
|
1757 | 1757 | $ hg debugobsolete 9f758d63dcde62d547ebfb08e1e7ee96535f2b05 |
|
1758 | 1758 | obsoleted 1 changesets |
|
1759 | 1759 | $ echo f > b |
|
1760 | 1760 | $ hg ci -Am'b' -d '2 0' |
|
1761 | 1761 | adding b |
|
1762 | 1762 | $ echo f >> b |
|
1763 | 1763 | $ hg ci -m'b bis' -d '3 0' |
|
1764 | 1764 | $ hg log -T'{rev}:{node}\n' |
|
1765 | 1765 | 3:d7d28b288a6b83d5d2cf49f10c5974deed3a1d2e |
|
1766 | 1766 | 2:94375ec45bddd2a824535fc04855bd058c926ec0 |
|
1767 | 1767 | |
|
1768 | 1768 | $ hg log -T'{rev}:{node}\n' -r: |
|
1769 | 1769 | 2:94375ec45bddd2a824535fc04855bd058c926ec0 |
|
1770 | 1770 | 3:d7d28b288a6b83d5d2cf49f10c5974deed3a1d2e |
|
1771 | 1771 | $ hg log -T'{rev}:{node}\n' -r:tip |
|
1772 | 1772 | 2:94375ec45bddd2a824535fc04855bd058c926ec0 |
|
1773 | 1773 | 3:d7d28b288a6b83d5d2cf49f10c5974deed3a1d2e |
|
1774 | 1774 | $ hg log -T'{rev}:{node}\n' -r:0 |
|
1775 | 1775 | abort: hidden revision '0'! |
|
1776 | 1776 | (use --hidden to access hidden revisions) |
|
1777 | 1777 | [255] |
|
1778 | 1778 | $ hg log -T'{rev}:{node}\n' -f |
|
1779 | 1779 | 3:d7d28b288a6b83d5d2cf49f10c5974deed3a1d2e |
|
1780 | 1780 | 2:94375ec45bddd2a824535fc04855bd058c926ec0 |
|
1781 | 1781 | |
|
1782 | 1782 | clear extensions configuration |
|
1783 | 1783 | $ echo '[extensions]' >> $HGRCPATH |
|
1784 | 1784 | $ echo "obs=!" >> $HGRCPATH |
|
1785 | 1785 | $ cd .. |
|
1786 | 1786 | |
|
1787 | 1787 | test -u/-k for problematic encoding |
|
1788 | 1788 | # unicode: cp932: |
|
1789 | 1789 | # u30A2 0x83 0x41(= 'A') |
|
1790 | 1790 | # u30C2 0x83 0x61(= 'a') |
|
1791 | 1791 | |
|
1792 | 1792 | $ hg init problematicencoding |
|
1793 | 1793 | $ cd problematicencoding |
|
1794 | 1794 | |
|
1795 | 1795 | $ $PYTHON > setup.sh <<EOF |
|
1796 | 1796 | > print(u''' |
|
1797 | 1797 | > echo a > text |
|
1798 | 1798 | > hg add text |
|
1799 | 1799 | > hg --encoding utf-8 commit -u '\u30A2' -m none |
|
1800 | 1800 | > echo b > text |
|
1801 | 1801 | > hg --encoding utf-8 commit -u '\u30C2' -m none |
|
1802 | 1802 | > echo c > text |
|
1803 | 1803 | > hg --encoding utf-8 commit -u none -m '\u30A2' |
|
1804 | 1804 | > echo d > text |
|
1805 | 1805 | > hg --encoding utf-8 commit -u none -m '\u30C2' |
|
1806 | 1806 | > '''.encode('utf-8')) |
|
1807 | 1807 | > EOF |
|
1808 | 1808 | $ sh < setup.sh |
|
1809 | 1809 | |
|
1810 | 1810 | test in problematic encoding |
|
1811 | 1811 | $ $PYTHON > test.sh <<EOF |
|
1812 | 1812 | > print(u''' |
|
1813 | 1813 | > hg --encoding cp932 log --template '{rev}\\n' -u '\u30A2' |
|
1814 | 1814 | > echo ==== |
|
1815 | 1815 | > hg --encoding cp932 log --template '{rev}\\n' -u '\u30C2' |
|
1816 | 1816 | > echo ==== |
|
1817 | 1817 | > hg --encoding cp932 log --template '{rev}\\n' -k '\u30A2' |
|
1818 | 1818 | > echo ==== |
|
1819 | 1819 | > hg --encoding cp932 log --template '{rev}\\n' -k '\u30C2' |
|
1820 | 1820 | > '''.encode('cp932')) |
|
1821 | 1821 | > EOF |
|
1822 | 1822 | $ sh < test.sh |
|
1823 | 1823 | 0 |
|
1824 | 1824 | ==== |
|
1825 | 1825 | 1 |
|
1826 | 1826 | ==== |
|
1827 | 1827 | 2 |
|
1828 | 1828 | 0 |
|
1829 | 1829 | ==== |
|
1830 | 1830 | 3 |
|
1831 | 1831 | 1 |
|
1832 | 1832 | |
|
1833 | 1833 | $ cd .. |
|
1834 | 1834 | |
|
1835 | 1835 | test hg log on non-existent files and on directories |
|
1836 | 1836 | $ hg init issue1340 |
|
1837 | 1837 | $ cd issue1340 |
|
1838 | 1838 | $ mkdir d1; mkdir D2; mkdir D3.i; mkdir d4.hg; mkdir d5.d; mkdir .d6 |
|
1839 | 1839 | $ echo 1 > d1/f1 |
|
1840 | 1840 | $ echo 1 > D2/f1 |
|
1841 | 1841 | $ echo 1 > D3.i/f1 |
|
1842 | 1842 | $ echo 1 > d4.hg/f1 |
|
1843 | 1843 | $ echo 1 > d5.d/f1 |
|
1844 | 1844 | $ echo 1 > .d6/f1 |
|
1845 | 1845 | $ hg -q add . |
|
1846 | 1846 | $ hg commit -m "a bunch of weird directories" |
|
1847 | 1847 | $ hg log -l1 d1/f1 | grep changeset |
|
1848 | 1848 | changeset: 0:65624cd9070a |
|
1849 | 1849 | $ hg log -l1 f1 |
|
1850 | 1850 | $ hg log -l1 . | grep changeset |
|
1851 | 1851 | changeset: 0:65624cd9070a |
|
1852 | 1852 | $ hg log -l1 ./ | grep changeset |
|
1853 | 1853 | changeset: 0:65624cd9070a |
|
1854 | 1854 | $ hg log -l1 d1 | grep changeset |
|
1855 | 1855 | changeset: 0:65624cd9070a |
|
1856 | 1856 | $ hg log -l1 D2 | grep changeset |
|
1857 | 1857 | changeset: 0:65624cd9070a |
|
1858 | 1858 | $ hg log -l1 D2/f1 | grep changeset |
|
1859 | 1859 | changeset: 0:65624cd9070a |
|
1860 | 1860 | $ hg log -l1 D3.i | grep changeset |
|
1861 | 1861 | changeset: 0:65624cd9070a |
|
1862 | 1862 | $ hg log -l1 D3.i/f1 | grep changeset |
|
1863 | 1863 | changeset: 0:65624cd9070a |
|
1864 | 1864 | $ hg log -l1 d4.hg | grep changeset |
|
1865 | 1865 | changeset: 0:65624cd9070a |
|
1866 | 1866 | $ hg log -l1 d4.hg/f1 | grep changeset |
|
1867 | 1867 | changeset: 0:65624cd9070a |
|
1868 | 1868 | $ hg log -l1 d5.d | grep changeset |
|
1869 | 1869 | changeset: 0:65624cd9070a |
|
1870 | 1870 | $ hg log -l1 d5.d/f1 | grep changeset |
|
1871 | 1871 | changeset: 0:65624cd9070a |
|
1872 | 1872 | $ hg log -l1 .d6 | grep changeset |
|
1873 | 1873 | changeset: 0:65624cd9070a |
|
1874 | 1874 | $ hg log -l1 .d6/f1 | grep changeset |
|
1875 | 1875 | changeset: 0:65624cd9070a |
|
1876 | 1876 | |
|
1877 | 1877 | issue3772: hg log -r :null showing revision 0 as well |
|
1878 | 1878 | |
|
1879 | 1879 | $ hg log -r :null |
|
1880 | 1880 | changeset: 0:65624cd9070a |
|
1881 | 1881 | tag: tip |
|
1882 | 1882 | user: test |
|
1883 | 1883 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1884 | 1884 | summary: a bunch of weird directories |
|
1885 | 1885 | |
|
1886 | 1886 | changeset: -1:000000000000 |
|
1887 | 1887 | user: |
|
1888 | 1888 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1889 | 1889 | |
|
1890 | 1890 | $ hg log -r null:null |
|
1891 | 1891 | changeset: -1:000000000000 |
|
1892 | 1892 | user: |
|
1893 | 1893 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1894 | 1894 | |
|
1895 | 1895 | working-directory revision requires special treatment |
|
1896 | 1896 | |
|
1897 | 1897 | clean: |
|
1898 | 1898 | |
|
1899 | 1899 | $ hg log -r 'wdir()' --debug |
|
1900 | 1900 | changeset: 2147483647:ffffffffffffffffffffffffffffffffffffffff |
|
1901 | 1901 | phase: draft |
|
1902 | 1902 | parent: 0:65624cd9070a035fa7191a54f2b8af39f16b0c08 |
|
1903 | 1903 | parent: -1:0000000000000000000000000000000000000000 |
|
1904 | 1904 | user: test |
|
1905 | 1905 | date: [A-Za-z0-9:+ ]+ (re) |
|
1906 | 1906 | extra: branch=default |
|
1907 | 1907 | |
|
1908 | 1908 | $ hg log -r 'wdir()' -p --stat |
|
1909 | 1909 | changeset: 2147483647:ffffffffffff |
|
1910 | 1910 | parent: 0:65624cd9070a |
|
1911 | 1911 | user: test |
|
1912 | 1912 | date: [A-Za-z0-9:+ ]+ (re) |
|
1913 | 1913 | |
|
1914 | 1914 | |
|
1915 | 1915 | |
|
1916 | 1916 | |
|
1917 | 1917 | dirty: |
|
1918 | 1918 | |
|
1919 | 1919 | $ echo 2 >> d1/f1 |
|
1920 | 1920 | $ echo 2 > d1/f2 |
|
1921 | 1921 | $ hg add d1/f2 |
|
1922 | 1922 | $ hg remove .d6/f1 |
|
1923 | 1923 | $ hg status |
|
1924 | 1924 | M d1/f1 |
|
1925 | 1925 | A d1/f2 |
|
1926 | 1926 | R .d6/f1 |
|
1927 | 1927 | |
|
1928 | 1928 | $ hg log -r 'wdir()' |
|
1929 | 1929 | changeset: 2147483647:ffffffffffff |
|
1930 | 1930 | parent: 0:65624cd9070a |
|
1931 | 1931 | user: test |
|
1932 | 1932 | date: [A-Za-z0-9:+ ]+ (re) |
|
1933 | 1933 | |
|
1934 | 1934 | $ hg log -r 'wdir()' -q |
|
1935 | 1935 | 2147483647:ffffffffffff |
|
1936 | 1936 | |
|
1937 | 1937 | $ hg log -r 'wdir()' --debug |
|
1938 | 1938 | changeset: 2147483647:ffffffffffffffffffffffffffffffffffffffff |
|
1939 | 1939 | phase: draft |
|
1940 | 1940 | parent: 0:65624cd9070a035fa7191a54f2b8af39f16b0c08 |
|
1941 | 1941 | parent: -1:0000000000000000000000000000000000000000 |
|
1942 | 1942 | user: test |
|
1943 | 1943 | date: [A-Za-z0-9:+ ]+ (re) |
|
1944 | 1944 | files: d1/f1 |
|
1945 | 1945 | files+: d1/f2 |
|
1946 | 1946 | files-: .d6/f1 |
|
1947 | 1947 | extra: branch=default |
|
1948 | 1948 | |
|
1949 | 1949 | $ hg log -r 'wdir()' -p --stat --git |
|
1950 | 1950 | changeset: 2147483647:ffffffffffff |
|
1951 | 1951 | parent: 0:65624cd9070a |
|
1952 | 1952 | user: test |
|
1953 | 1953 | date: [A-Za-z0-9:+ ]+ (re) |
|
1954 | 1954 | |
|
1955 | 1955 | .d6/f1 | 1 - |
|
1956 | 1956 | d1/f1 | 1 + |
|
1957 | 1957 | d1/f2 | 1 + |
|
1958 | 1958 | 3 files changed, 2 insertions(+), 1 deletions(-) |
|
1959 | 1959 | |
|
1960 | 1960 | diff --git a/.d6/f1 b/.d6/f1 |
|
1961 | 1961 | deleted file mode 100644 |
|
1962 | 1962 | --- a/.d6/f1 |
|
1963 | 1963 | +++ /dev/null |
|
1964 | 1964 | @@ -1,1 +0,0 @@ |
|
1965 | 1965 | -1 |
|
1966 | 1966 | diff --git a/d1/f1 b/d1/f1 |
|
1967 | 1967 | --- a/d1/f1 |
|
1968 | 1968 | +++ b/d1/f1 |
|
1969 | 1969 | @@ -1,1 +1,2 @@ |
|
1970 | 1970 | 1 |
|
1971 | 1971 | +2 |
|
1972 | 1972 | diff --git a/d1/f2 b/d1/f2 |
|
1973 | 1973 | new file mode 100644 |
|
1974 | 1974 | --- /dev/null |
|
1975 | 1975 | +++ b/d1/f2 |
|
1976 | 1976 | @@ -0,0 +1,1 @@ |
|
1977 | 1977 | +2 |
|
1978 | 1978 | |
|
1979 | 1979 | $ hg log -r 'wdir()' -Tjson |
|
1980 | 1980 | [ |
|
1981 | 1981 | { |
|
1982 | 1982 | "rev": null, |
|
1983 | 1983 | "node": null, |
|
1984 | 1984 | "branch": "default", |
|
1985 | 1985 | "phase": "draft", |
|
1986 | 1986 | "user": "test", |
|
1987 | 1987 | "date": [*, 0], (glob) |
|
1988 | 1988 | "desc": "", |
|
1989 | 1989 | "bookmarks": [], |
|
1990 | 1990 | "tags": [], |
|
1991 | 1991 | "parents": ["65624cd9070a035fa7191a54f2b8af39f16b0c08"] |
|
1992 | 1992 | } |
|
1993 | 1993 | ] |
|
1994 | 1994 | |
|
1995 | 1995 | $ hg log -r 'wdir()' -Tjson -q |
|
1996 | 1996 | [ |
|
1997 | 1997 | { |
|
1998 | 1998 | "rev": null, |
|
1999 | 1999 | "node": null |
|
2000 | 2000 | } |
|
2001 | 2001 | ] |
|
2002 | 2002 | |
|
2003 | 2003 | $ hg log -r 'wdir()' -Tjson --debug |
|
2004 | 2004 | [ |
|
2005 | 2005 | { |
|
2006 | 2006 | "rev": null, |
|
2007 | 2007 | "node": null, |
|
2008 | 2008 | "branch": "default", |
|
2009 | 2009 | "phase": "draft", |
|
2010 | 2010 | "user": "test", |
|
2011 | 2011 | "date": [*, 0], (glob) |
|
2012 | 2012 | "desc": "", |
|
2013 | 2013 | "bookmarks": [], |
|
2014 | 2014 | "tags": [], |
|
2015 | 2015 | "parents": ["65624cd9070a035fa7191a54f2b8af39f16b0c08"], |
|
2016 | 2016 | "manifest": null, |
|
2017 | 2017 | "extra": {"branch": "default"}, |
|
2018 | 2018 | "modified": ["d1/f1"], |
|
2019 | 2019 | "added": ["d1/f2"], |
|
2020 | 2020 | "removed": [".d6/f1"] |
|
2021 | 2021 | } |
|
2022 | 2022 | ] |
|
2023 | 2023 | |
|
2024 | 2024 | $ hg revert -aqC |
|
2025 | 2025 | |
|
2026 | 2026 | Check that adding an arbitrary name shows up in log automatically |
|
2027 | 2027 | |
|
2028 | 2028 | $ cat > ../names.py <<EOF |
|
2029 | 2029 | > """A small extension to test adding arbitrary names to a repo""" |
|
2030 | > from mercurial.namespaces import namespace | |
|
2030 | > from __future__ import absolute_import | |
|
2031 | > from mercurial import namespaces | |
|
2031 | 2032 | > |
|
2032 | 2033 | > def reposetup(ui, repo): |
|
2033 | 2034 | > foo = {'foo': repo[0].node()} |
|
2034 | 2035 | > names = lambda r: foo.keys() |
|
2035 | 2036 | > namemap = lambda r, name: foo.get(name) |
|
2036 | 2037 | > nodemap = lambda r, node: [name for name, n in foo.iteritems() |
|
2037 | 2038 | > if n == node] |
|
2038 | > ns = namespace("bars", templatename="bar", logname="barlog", | |
|
2039 | > colorname="barcolor", listnames=names, namemap=namemap, | |
|
2040 | > nodemap=nodemap) | |
|
2039 | > ns = namespaces.namespace( | |
|
2040 | > "bars", templatename="bar", logname="barlog", | |
|
2041 | > colorname="barcolor", listnames=names, namemap=namemap, | |
|
2042 | > nodemap=nodemap) | |
|
2041 | 2043 | > |
|
2042 | 2044 | > repo.names.addnamespace(ns) |
|
2043 | 2045 | > EOF |
|
2044 | 2046 | |
|
2045 | 2047 | $ hg --config extensions.names=../names.py log -r 0 |
|
2046 | 2048 | changeset: 0:65624cd9070a |
|
2047 | 2049 | tag: tip |
|
2048 | 2050 | barlog: foo |
|
2049 | 2051 | user: test |
|
2050 | 2052 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2051 | 2053 | summary: a bunch of weird directories |
|
2052 | 2054 | |
|
2053 | 2055 | $ hg --config extensions.names=../names.py \ |
|
2054 | 2056 | > --config extensions.color= --config color.log.barcolor=red \ |
|
2055 | 2057 | > --color=always log -r 0 |
|
2056 | 2058 | \x1b[0;33mchangeset: 0:65624cd9070a\x1b[0m (esc) |
|
2057 | 2059 | tag: tip |
|
2058 | 2060 | \x1b[0;31mbarlog: foo\x1b[0m (esc) |
|
2059 | 2061 | user: test |
|
2060 | 2062 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2061 | 2063 | summary: a bunch of weird directories |
|
2062 | 2064 | |
|
2063 | 2065 | $ hg --config extensions.names=../names.py log -r 0 --template '{bars}\n' |
|
2064 | 2066 | foo |
|
2065 | 2067 | |
|
2066 | 2068 | $ cd .. |
|
2067 | 2069 | |
|
2068 | 2070 | hg log -f dir across branches |
|
2069 | 2071 | |
|
2070 | 2072 | $ hg init acrossbranches |
|
2071 | 2073 | $ cd acrossbranches |
|
2072 | 2074 | $ mkdir d |
|
2073 | 2075 | $ echo a > d/a && hg ci -Aqm a |
|
2074 | 2076 | $ echo b > d/a && hg ci -Aqm b |
|
2075 | 2077 | $ hg up -q 0 |
|
2076 | 2078 | $ echo b > d/a && hg ci -Aqm c |
|
2077 | 2079 | $ hg log -f d -T '{desc}' -G |
|
2078 | 2080 | @ c |
|
2079 | 2081 | | |
|
2080 | 2082 | o a |
|
2081 | 2083 | |
|
2082 | 2084 | Ensure that largefiles doesn't interfere with following a normal file |
|
2083 | 2085 | $ hg --config extensions.largefiles= log -f d -T '{desc}' -G |
|
2084 | 2086 | The fsmonitor extension is incompatible with the largefiles extension and has been disabled. (fsmonitor !) |
|
2085 | 2087 | @ c |
|
2086 | 2088 | | |
|
2087 | 2089 | o a |
|
2088 | 2090 | |
|
2089 | 2091 | $ hg log -f d/a -T '{desc}' -G |
|
2090 | 2092 | @ c |
|
2091 | 2093 | | |
|
2092 | 2094 | o a |
|
2093 | 2095 | |
|
2094 | 2096 | $ cd .. |
|
2095 | 2097 | |
|
2096 | 2098 | hg log -f with linkrev pointing to another branch |
|
2097 | 2099 | ------------------------------------------------- |
|
2098 | 2100 | |
|
2099 | 2101 | create history with a filerev whose linkrev points to another branch |
|
2100 | 2102 | |
|
2101 | 2103 | $ hg init branchedlinkrev |
|
2102 | 2104 | $ cd branchedlinkrev |
|
2103 | 2105 | $ echo 1 > a |
|
2104 | 2106 | $ hg commit -Am 'content1' |
|
2105 | 2107 | adding a |
|
2106 | 2108 | $ echo 2 > a |
|
2107 | 2109 | $ hg commit -m 'content2' |
|
2108 | 2110 | $ hg up --rev 'desc(content1)' |
|
2109 | 2111 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
2110 | 2112 | $ echo unrelated > unrelated |
|
2111 | 2113 | $ hg commit -Am 'unrelated' |
|
2112 | 2114 | adding unrelated |
|
2113 | 2115 | created new head |
|
2114 | 2116 | $ hg graft -r 'desc(content2)' |
|
2115 | 2117 | grafting 1:2294ae80ad84 "content2" |
|
2116 | 2118 | $ echo 3 > a |
|
2117 | 2119 | $ hg commit -m 'content3' |
|
2118 | 2120 | $ hg log -G |
|
2119 | 2121 | @ changeset: 4:50b9b36e9c5d |
|
2120 | 2122 | | tag: tip |
|
2121 | 2123 | | user: test |
|
2122 | 2124 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2123 | 2125 | | summary: content3 |
|
2124 | 2126 | | |
|
2125 | 2127 | o changeset: 3:15b2327059e5 |
|
2126 | 2128 | | user: test |
|
2127 | 2129 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2128 | 2130 | | summary: content2 |
|
2129 | 2131 | | |
|
2130 | 2132 | o changeset: 2:2029acd1168c |
|
2131 | 2133 | | parent: 0:ae0a3c9f9e95 |
|
2132 | 2134 | | user: test |
|
2133 | 2135 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2134 | 2136 | | summary: unrelated |
|
2135 | 2137 | | |
|
2136 | 2138 | | o changeset: 1:2294ae80ad84 |
|
2137 | 2139 | |/ user: test |
|
2138 | 2140 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2139 | 2141 | | summary: content2 |
|
2140 | 2142 | | |
|
2141 | 2143 | o changeset: 0:ae0a3c9f9e95 |
|
2142 | 2144 | user: test |
|
2143 | 2145 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2144 | 2146 | summary: content1 |
|
2145 | 2147 | |
|
2146 | 2148 | |
|
2147 | 2149 | log -f on the file should list the graft result. |
|
2148 | 2150 | |
|
2149 | 2151 | $ hg log -Gf a |
|
2150 | 2152 | @ changeset: 4:50b9b36e9c5d |
|
2151 | 2153 | | tag: tip |
|
2152 | 2154 | | user: test |
|
2153 | 2155 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2154 | 2156 | | summary: content3 |
|
2155 | 2157 | | |
|
2156 | 2158 | o changeset: 3:15b2327059e5 |
|
2157 | 2159 | : user: test |
|
2158 | 2160 | : date: Thu Jan 01 00:00:00 1970 +0000 |
|
2159 | 2161 | : summary: content2 |
|
2160 | 2162 | : |
|
2161 | 2163 | o changeset: 0:ae0a3c9f9e95 |
|
2162 | 2164 | user: test |
|
2163 | 2165 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2164 | 2166 | summary: content1 |
|
2165 | 2167 | |
|
2166 | 2168 | |
|
2167 | 2169 | plain log lists the original version |
|
2168 | 2170 | (XXX we should probably list both) |
|
2169 | 2171 | |
|
2170 | 2172 | $ hg log -G a |
|
2171 | 2173 | @ changeset: 4:50b9b36e9c5d |
|
2172 | 2174 | : tag: tip |
|
2173 | 2175 | : user: test |
|
2174 | 2176 | : date: Thu Jan 01 00:00:00 1970 +0000 |
|
2175 | 2177 | : summary: content3 |
|
2176 | 2178 | : |
|
2177 | 2179 | : o changeset: 1:2294ae80ad84 |
|
2178 | 2180 | :/ user: test |
|
2179 | 2181 | : date: Thu Jan 01 00:00:00 1970 +0000 |
|
2180 | 2182 | : summary: content2 |
|
2181 | 2183 | : |
|
2182 | 2184 | o changeset: 0:ae0a3c9f9e95 |
|
2183 | 2185 | user: test |
|
2184 | 2186 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2185 | 2187 | summary: content1 |
|
2186 | 2188 | |
|
2187 | 2189 | |
|
2188 | 2190 | hg log -f from the grafted changeset |
|
2189 | 2191 | (The bootstrap should properly take the topology in account) |
|
2190 | 2192 | |
|
2191 | 2193 | $ hg up 'desc(content3)^' |
|
2192 | 2194 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
2193 | 2195 | $ hg log -Gf a |
|
2194 | 2196 | @ changeset: 3:15b2327059e5 |
|
2195 | 2197 | : user: test |
|
2196 | 2198 | : date: Thu Jan 01 00:00:00 1970 +0000 |
|
2197 | 2199 | : summary: content2 |
|
2198 | 2200 | : |
|
2199 | 2201 | o changeset: 0:ae0a3c9f9e95 |
|
2200 | 2202 | user: test |
|
2201 | 2203 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2202 | 2204 | summary: content1 |
|
2203 | 2205 | |
|
2204 | 2206 | |
|
2205 | 2207 | Test that we use the first non-hidden changeset in that case. |
|
2206 | 2208 | |
|
2207 | 2209 | (hide the changeset) |
|
2208 | 2210 | |
|
2209 | 2211 | $ hg log -T '{node}\n' -r 1 |
|
2210 | 2212 | 2294ae80ad8447bc78383182eeac50cb049df623 |
|
2211 | 2213 | $ hg debugobsolete 2294ae80ad8447bc78383182eeac50cb049df623 |
|
2212 | 2214 | obsoleted 1 changesets |
|
2213 | 2215 | $ hg log -G |
|
2214 | 2216 | o changeset: 4:50b9b36e9c5d |
|
2215 | 2217 | | tag: tip |
|
2216 | 2218 | | user: test |
|
2217 | 2219 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2218 | 2220 | | summary: content3 |
|
2219 | 2221 | | |
|
2220 | 2222 | @ changeset: 3:15b2327059e5 |
|
2221 | 2223 | | user: test |
|
2222 | 2224 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2223 | 2225 | | summary: content2 |
|
2224 | 2226 | | |
|
2225 | 2227 | o changeset: 2:2029acd1168c |
|
2226 | 2228 | | parent: 0:ae0a3c9f9e95 |
|
2227 | 2229 | | user: test |
|
2228 | 2230 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2229 | 2231 | | summary: unrelated |
|
2230 | 2232 | | |
|
2231 | 2233 | o changeset: 0:ae0a3c9f9e95 |
|
2232 | 2234 | user: test |
|
2233 | 2235 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2234 | 2236 | summary: content1 |
|
2235 | 2237 | |
|
2236 | 2238 | |
|
2237 | 2239 | Check that log on the file does not drop the file revision. |
|
2238 | 2240 | |
|
2239 | 2241 | $ hg log -G a |
|
2240 | 2242 | o changeset: 4:50b9b36e9c5d |
|
2241 | 2243 | | tag: tip |
|
2242 | 2244 | | user: test |
|
2243 | 2245 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2244 | 2246 | | summary: content3 |
|
2245 | 2247 | | |
|
2246 | 2248 | @ changeset: 3:15b2327059e5 |
|
2247 | 2249 | : user: test |
|
2248 | 2250 | : date: Thu Jan 01 00:00:00 1970 +0000 |
|
2249 | 2251 | : summary: content2 |
|
2250 | 2252 | : |
|
2251 | 2253 | o changeset: 0:ae0a3c9f9e95 |
|
2252 | 2254 | user: test |
|
2253 | 2255 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2254 | 2256 | summary: content1 |
|
2255 | 2257 | |
|
2256 | 2258 | |
|
2257 | 2259 | Even when a head revision is linkrev-shadowed. |
|
2258 | 2260 | |
|
2259 | 2261 | $ hg log -T '{node}\n' -r 4 |
|
2260 | 2262 | 50b9b36e9c5df2c6fc6dcefa8ad0da929e84aed2 |
|
2261 | 2263 | $ hg debugobsolete 50b9b36e9c5df2c6fc6dcefa8ad0da929e84aed2 |
|
2262 | 2264 | obsoleted 1 changesets |
|
2263 | 2265 | $ hg log -G a |
|
2264 | 2266 | @ changeset: 3:15b2327059e5 |
|
2265 | 2267 | : tag: tip |
|
2266 | 2268 | : user: test |
|
2267 | 2269 | : date: Thu Jan 01 00:00:00 1970 +0000 |
|
2268 | 2270 | : summary: content2 |
|
2269 | 2271 | : |
|
2270 | 2272 | o changeset: 0:ae0a3c9f9e95 |
|
2271 | 2273 | user: test |
|
2272 | 2274 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2273 | 2275 | summary: content1 |
|
2274 | 2276 | |
|
2275 | 2277 | |
|
2276 | 2278 | $ cd .. |
|
2277 | 2279 | |
|
2278 | 2280 | Even when the file revision is missing from some head: |
|
2279 | 2281 | |
|
2280 | 2282 | $ hg init issue4490 |
|
2281 | 2283 | $ cd issue4490 |
|
2282 | 2284 | $ echo '[experimental]' >> .hg/hgrc |
|
2283 | 2285 | $ echo 'stabilization=createmarkers' >> .hg/hgrc |
|
2284 | 2286 | $ echo a > a |
|
2285 | 2287 | $ hg ci -Am0 |
|
2286 | 2288 | adding a |
|
2287 | 2289 | $ echo b > b |
|
2288 | 2290 | $ hg ci -Am1 |
|
2289 | 2291 | adding b |
|
2290 | 2292 | $ echo B > b |
|
2291 | 2293 | $ hg ci --amend -m 1 |
|
2292 | 2294 | $ hg up 0 |
|
2293 | 2295 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
2294 | 2296 | $ echo c > c |
|
2295 | 2297 | $ hg ci -Am2 |
|
2296 | 2298 | adding c |
|
2297 | 2299 | created new head |
|
2298 | 2300 | $ hg up 'head() and not .' |
|
2299 | 2301 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
2300 | 2302 | $ hg log -G |
|
2301 | 2303 | o changeset: 4:db815d6d32e6 |
|
2302 | 2304 | | tag: tip |
|
2303 | 2305 | | parent: 0:f7b1eb17ad24 |
|
2304 | 2306 | | user: test |
|
2305 | 2307 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2306 | 2308 | | summary: 2 |
|
2307 | 2309 | | |
|
2308 | 2310 | | @ changeset: 3:9bc8ce7f9356 |
|
2309 | 2311 | |/ parent: 0:f7b1eb17ad24 |
|
2310 | 2312 | | user: test |
|
2311 | 2313 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2312 | 2314 | | summary: 1 |
|
2313 | 2315 | | |
|
2314 | 2316 | o changeset: 0:f7b1eb17ad24 |
|
2315 | 2317 | user: test |
|
2316 | 2318 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2317 | 2319 | summary: 0 |
|
2318 | 2320 | |
|
2319 | 2321 | $ hg log -f -G b |
|
2320 | 2322 | @ changeset: 3:9bc8ce7f9356 |
|
2321 | 2323 | | parent: 0:f7b1eb17ad24 |
|
2322 | 2324 | ~ user: test |
|
2323 | 2325 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2324 | 2326 | summary: 1 |
|
2325 | 2327 | |
|
2326 | 2328 | $ hg log -G b |
|
2327 | 2329 | @ changeset: 3:9bc8ce7f9356 |
|
2328 | 2330 | | parent: 0:f7b1eb17ad24 |
|
2329 | 2331 | ~ user: test |
|
2330 | 2332 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2331 | 2333 | summary: 1 |
|
2332 | 2334 | |
|
2333 | 2335 | $ cd .. |
|
2334 | 2336 | |
|
2335 | 2337 | Check proper report when the manifest changes but not the file issue4499 |
|
2336 | 2338 | ------------------------------------------------------------------------ |
|
2337 | 2339 | |
|
2338 | 2340 | $ hg init issue4499 |
|
2339 | 2341 | $ cd issue4499 |
|
2340 | 2342 | $ for f in A B C D F E G H I J K L M N O P Q R S T U; do |
|
2341 | 2343 | > echo 1 > $f; |
|
2342 | 2344 | > hg add $f; |
|
2343 | 2345 | > done |
|
2344 | 2346 | $ hg commit -m 'A1B1C1' |
|
2345 | 2347 | $ echo 2 > A |
|
2346 | 2348 | $ echo 2 > B |
|
2347 | 2349 | $ echo 2 > C |
|
2348 | 2350 | $ hg commit -m 'A2B2C2' |
|
2349 | 2351 | $ hg up 0 |
|
2350 | 2352 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
2351 | 2353 | $ echo 3 > A |
|
2352 | 2354 | $ echo 2 > B |
|
2353 | 2355 | $ echo 2 > C |
|
2354 | 2356 | $ hg commit -m 'A3B2C2' |
|
2355 | 2357 | created new head |
|
2356 | 2358 | |
|
2357 | 2359 | $ hg log -G |
|
2358 | 2360 | @ changeset: 2:fe5fc3d0eb17 |
|
2359 | 2361 | | tag: tip |
|
2360 | 2362 | | parent: 0:abf4f0e38563 |
|
2361 | 2363 | | user: test |
|
2362 | 2364 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2363 | 2365 | | summary: A3B2C2 |
|
2364 | 2366 | | |
|
2365 | 2367 | | o changeset: 1:07dcc6b312c0 |
|
2366 | 2368 | |/ user: test |
|
2367 | 2369 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2368 | 2370 | | summary: A2B2C2 |
|
2369 | 2371 | | |
|
2370 | 2372 | o changeset: 0:abf4f0e38563 |
|
2371 | 2373 | user: test |
|
2372 | 2374 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2373 | 2375 | summary: A1B1C1 |
|
2374 | 2376 | |
|
2375 | 2377 | |
|
2376 | 2378 | Log -f on B should reports current changesets |
|
2377 | 2379 | |
|
2378 | 2380 | $ hg log -fG B |
|
2379 | 2381 | @ changeset: 2:fe5fc3d0eb17 |
|
2380 | 2382 | | tag: tip |
|
2381 | 2383 | | parent: 0:abf4f0e38563 |
|
2382 | 2384 | | user: test |
|
2383 | 2385 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2384 | 2386 | | summary: A3B2C2 |
|
2385 | 2387 | | |
|
2386 | 2388 | o changeset: 0:abf4f0e38563 |
|
2387 | 2389 | user: test |
|
2388 | 2390 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2389 | 2391 | summary: A1B1C1 |
|
2390 | 2392 | |
|
2391 | 2393 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now