Mercurial > evolve
comparison tests/test-topic-stack.t @ 2929:06844693bb21
tests: update after removing of redundant amend commit
Following e8a7c1a0565a, temporary amend commits has been removed impacting all
revision numbers in tests including amend operations.
Update tests case to use description or hashes when possible and update
revisions number when not.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Fri, 15 Sep 2017 15:48:18 +0200 |
parents | 01cf426bd458 |
children | 3a9303b7b648 |
comparison
equal
deleted
inserted
replaced
2928:6275808e89ef | 2929:06844693bb21 |
---|---|
252 ------------------------------------ | 252 ------------------------------------ |
253 | 253 |
254 $ echo bbb > ddd | 254 $ echo bbb > ddd |
255 $ hg commit --amend | 255 $ hg commit --amend |
256 $ hg log -G | 256 $ hg log -G |
257 @ 7 default {foo} draft c_d | 257 @ 6 default {foo} draft c_d |
258 | | 258 | |
259 | o 5 default {foo} draft c_f | 259 | o 5 default {foo} draft c_f |
260 | | | 260 | | |
261 | o 4 default {foo} draft c_e | 261 | o 4 default {foo} draft c_e |
262 | | | 262 | | |
299 | 299 |
300 Also test the revset: | 300 Also test the revset: |
301 | 301 |
302 $ hg log -r 'stack()' | 302 $ hg log -r 'stack()' |
303 2 default {foo} draft c_c | 303 2 default {foo} draft c_c |
304 7 default {foo} draft c_d | 304 6 default {foo} draft c_d |
305 4 default {foo} draft c_e | 305 4 default {foo} draft c_e |
306 5 default {foo} draft c_f | 306 5 default {foo} draft c_f |
307 | 307 |
308 $ hg log -r 'stack(foo)' | 308 $ hg log -r 'stack(foo)' |
309 hg: parse error: stack() takes no argument, it works on current topic | 309 hg: parse error: stack() takes no argument, it works on current topic |
320 | 320 |
321 $ hg rebase -s 'desc(c_e)' -d 'desc(c_d) - obsolete()' | 321 $ hg rebase -s 'desc(c_e)' -d 'desc(c_d) - obsolete()' |
322 rebasing 4:0f9ac936c87d "c_e" | 322 rebasing 4:0f9ac936c87d "c_e" |
323 rebasing 5:6559e6d93aea "c_f" | 323 rebasing 5:6559e6d93aea "c_f" |
324 $ hg log -G | 324 $ hg log -G |
325 o 9 default {foo} draft c_f | 325 o 8 default {foo} draft c_f |
326 | | 326 | |
327 o 8 default {foo} draft c_e | 327 o 7 default {foo} draft c_e |
328 | | 328 | |
329 @ 7 default {foo} draft c_d | 329 @ 6 default {foo} draft c_d |
330 | | 330 | |
331 o 2 default {foo} draft c_c | 331 o 2 default {foo} draft c_c |
332 | | 332 | |
333 o 1 default {} public c_b | 333 o 1 default {} public c_b |
334 | | 334 | |
345 $ hg commit -m c_g | 345 $ hg commit -m c_g |
346 $ echo aaa > hhh | 346 $ echo aaa > hhh |
347 $ hg add hhh | 347 $ hg add hhh |
348 $ hg commit -m c_h | 348 $ hg commit -m c_h |
349 $ hg log -G | 349 $ hg log -G |
350 @ 11 default {foo} draft c_h | 350 @ 10 default {foo} draft c_h |
351 | | 351 | |
352 o 10 default {foo} draft c_g | 352 o 9 default {foo} draft c_g |
353 | | 353 | |
354 | o 9 default {foo} draft c_f | 354 | o 8 default {foo} draft c_f |
355 | | | 355 | | |
356 | o 8 default {foo} draft c_e | 356 | o 7 default {foo} draft c_e |
357 |/ | 357 |/ |
358 o 7 default {foo} draft c_d | 358 o 6 default {foo} draft c_d |
359 | | 359 | |
360 o 2 default {foo} draft c_c | 360 o 2 default {foo} draft c_c |
361 | | 361 | |
362 o 1 default {} public c_b | 362 o 1 default {} public c_b |
363 | | 363 | |
367 Test output | 367 Test output |
368 | 368 |
369 $ hg top -l | 369 $ hg top -l |
370 ### topic: foo (2 heads) | 370 ### topic: foo (2 heads) |
371 ### branch: default | 371 ### branch: default |
372 t6: c_f | 372 t6@ c_h (current) |
373 t5: c_e | 373 t5: c_g |
374 t2^ c_d (base) | 374 t2^ c_d (base) |
375 t4@ c_h (current) | 375 t4: c_f |
376 t3: c_g | 376 t3: c_e |
377 t2: c_d | 377 t2: c_d |
378 t1: c_c | 378 t1: c_c |
379 t0^ c_b (base) | 379 t0^ c_b (base) |
380 | 380 |
381 Case with multiple heads on the topic with unstability involved | 381 Case with multiple heads on the topic with unstability involved |
386 $ hg up 'desc(c_d)' | 386 $ hg up 'desc(c_d)' |
387 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | 387 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
388 $ echo ccc > ddd | 388 $ echo ccc > ddd |
389 $ hg commit --amend -m 'c_D' | 389 $ hg commit --amend -m 'c_D' |
390 $ hg rebase -d . -s 'desc(c_g)' | 390 $ hg rebase -d . -s 'desc(c_g)' |
391 rebasing 10:81264ae8a36a "c_g" | 391 rebasing 9:81264ae8a36a "c_g" |
392 rebasing 11:fde5f5941642 "c_h" | 392 rebasing 10:fde5f5941642 "c_h" |
393 $ hg log -G | 393 $ hg log -G |
394 o 15 default {foo} draft c_h | 394 o 13 default {foo} draft c_h |
395 | | 395 | |
396 o 14 default {foo} draft c_g | 396 o 12 default {foo} draft c_g |
397 | | 397 | |
398 @ 13 default {foo} draft c_D | 398 @ 11 default {foo} draft c_D |
399 | | 399 | |
400 | o 9 default {foo} draft c_f | 400 | o 8 default {foo} draft c_f |
401 | | | 401 | | |
402 | o 8 default {foo} draft c_e | 402 | o 7 default {foo} draft c_e |
403 | | | 403 | | |
404 | x 7 default {foo} draft c_d | 404 | x 6 default {foo} draft c_d |
405 |/ | 405 |/ |
406 o 2 default {foo} draft c_c | 406 o 2 default {foo} draft c_c |
407 | | 407 | |
408 o 1 default {} public c_b | 408 o 1 default {} public c_b |
409 | | 409 | |
411 | 411 |
412 | 412 |
413 $ hg topic --list | 413 $ hg topic --list |
414 ### topic: foo (2 heads) | 414 ### topic: foo (2 heads) |
415 ### branch: default | 415 ### branch: default |
416 t6$ c_f (unstable) | 416 t6: c_h |
417 t5$ c_e (unstable) | 417 t5: c_g |
418 t2^ c_D (base) | 418 t2^ c_D (base) |
419 t4: c_h | 419 t4$ c_f (unstable) |
420 t3: c_g | 420 t3$ c_e (unstable) |
421 t2@ c_D (current) | 421 t2@ c_D (current) |
422 t1: c_c | 422 t1: c_c |
423 t0^ c_b (base) | 423 t0^ c_b (base) |
424 | 424 |
425 Trying to list non existing topic | 425 Trying to list non existing topic |
432 | 432 |
433 Complex cases where commits with same topic are not consecutive but are linear | 433 Complex cases where commits with same topic are not consecutive but are linear |
434 ============================================================================== | 434 ============================================================================== |
435 | 435 |
436 $ hg log --graph | 436 $ hg log --graph |
437 o 15 default {foo} draft c_h | 437 o 13 default {foo} draft c_h |
438 | | 438 | |
439 o 14 default {foo} draft c_g | 439 o 12 default {foo} draft c_g |
440 | | 440 | |
441 @ 13 default {foo} draft c_D | 441 @ 11 default {foo} draft c_D |
442 | | 442 | |
443 | o 9 default {foo} draft c_f | 443 | o 8 default {foo} draft c_f |
444 | | | 444 | | |
445 | o 8 default {foo} draft c_e | 445 | o 7 default {foo} draft c_e |
446 | | | 446 | | |
447 | x 7 default {foo} draft c_d | 447 | x 6 default {foo} draft c_d |
448 |/ | 448 |/ |
449 o 2 default {foo} draft c_c | 449 o 2 default {foo} draft c_c |
450 | | 450 | |
451 o 1 default {} public c_b | 451 o 1 default {} public c_b |
452 | | 452 | |
453 o 0 default {} public c_a | 453 o 0 default {} public c_a |
454 | 454 |
455 Converting into a linear chain | 455 Converting into a linear chain |
456 $ hg rebase -s 'desc("c_e") - obsolete()' -d 'desc("c_h") - obsolete()' | 456 $ hg rebase -s 'desc("c_e") - obsolete()' -d 'desc("c_h") - obsolete()' |
457 rebasing 8:215bc359096a "c_e" | 457 rebasing 7:215bc359096a "c_e" |
458 rebasing 9:ec9267b3f33f "c_f" | 458 rebasing 8:ec9267b3f33f "c_f" |
459 | 459 |
460 $ hg log -G | 460 $ hg log -G |
461 o 17 default {foo} draft c_f | 461 o 15 default {foo} draft c_f |
462 | | 462 | |
463 o 16 default {foo} draft c_e | 463 o 14 default {foo} draft c_e |
464 | | 464 | |
465 o 15 default {foo} draft c_h | 465 o 13 default {foo} draft c_h |
466 | | 466 | |
467 o 14 default {foo} draft c_g | 467 o 12 default {foo} draft c_g |
468 | | 468 | |
469 @ 13 default {foo} draft c_D | 469 @ 11 default {foo} draft c_D |
470 | | 470 | |
471 o 2 default {foo} draft c_c | 471 o 2 default {foo} draft c_c |
472 | | 472 | |
473 o 1 default {} public c_b | 473 o 1 default {} public c_b |
474 | | 474 | |
477 Changing topics on some commits in between | 477 Changing topics on some commits in between |
478 $ hg topic foobar -r 'desc(c_e) + desc(c_D)' | 478 $ hg topic foobar -r 'desc(c_e) + desc(c_D)' |
479 switching to topic foobar | 479 switching to topic foobar |
480 changed topic on 2 changes | 480 changed topic on 2 changes |
481 $ hg log -G | 481 $ hg log -G |
482 @ 19 default {foobar} draft c_D | 482 @ 17 default {foobar} draft c_D |
483 | | 483 | |
484 | o 18 default {foobar} draft c_e | 484 | o 16 default {foobar} draft c_e |
485 | | | 485 | | |
486 | | o 17 default {foo} draft c_f | 486 | | o 15 default {foo} draft c_f |
487 | | | | 487 | | | |
488 | | x 16 default {foo} draft c_e | 488 | | x 14 default {foo} draft c_e |
489 | |/ | 489 | |/ |
490 | o 15 default {foo} draft c_h | 490 | o 13 default {foo} draft c_h |
491 | | | 491 | | |
492 | o 14 default {foo} draft c_g | 492 | o 12 default {foo} draft c_g |
493 | | | 493 | | |
494 | x 13 default {foo} draft c_D | 494 | x 11 default {foo} draft c_D |
495 |/ | 495 |/ |
496 o 2 default {foo} draft c_c | 496 o 2 default {foo} draft c_c |
497 | | 497 | |
498 o 1 default {} public c_b | 498 o 1 default {} public c_b |
499 | | 499 | |
500 o 0 default {} public c_a | 500 o 0 default {} public c_a |
501 | 501 |
502 $ hg rebase -s 'desc("c_f") - obsolete()' -d 'desc("c_e") - obsolete()' | 502 $ hg rebase -s 'desc("c_f") - obsolete()' -d 'desc("c_e") - obsolete()' |
503 rebasing 17:77082e55de88 "c_f" | 503 rebasing 15:77082e55de88 "c_f" |
504 switching to topic foo | 504 switching to topic foo |
505 switching to topic foobar | 505 switching to topic foobar |
506 $ hg rebase -s 'desc("c_g") - obsolete()' -d 'desc("c_D") - obsolete()' | 506 $ hg rebase -s 'desc("c_g") - obsolete()' -d 'desc("c_D") - obsolete()' |
507 rebasing 14:0c3e8aed985d "c_g" | 507 rebasing 12:0c3e8aed985d "c_g" |
508 switching to topic foo | 508 switching to topic foo |
509 rebasing 15:b9e4f3709bc5 "c_h" | 509 rebasing 13:b9e4f3709bc5 "c_h" |
510 rebasing 18:4bc813530301 "c_e" | 510 rebasing 16:4bc813530301 "c_e" |
511 switching to topic foobar | 511 switching to topic foobar |
512 rebasing 20:4406ea4be852 "c_f" (tip) | 512 rebasing 18:4406ea4be852 "c_f" (tip) |
513 switching to topic foo | 513 switching to topic foo |
514 switching to topic foobar | 514 switching to topic foobar |
515 $ hg up | 515 $ hg up |
516 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | 516 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
517 $ hg log --graph | 517 $ hg log --graph |
518 o 24 default {foo} draft c_f | 518 o 22 default {foo} draft c_f |
519 | | 519 | |
520 @ 23 default {foobar} draft c_e | 520 @ 21 default {foobar} draft c_e |
521 | | 521 | |
522 o 22 default {foo} draft c_h | 522 o 20 default {foo} draft c_h |
523 | | 523 | |
524 o 21 default {foo} draft c_g | 524 o 19 default {foo} draft c_g |
525 | | 525 | |
526 o 19 default {foobar} draft c_D | 526 o 17 default {foobar} draft c_D |
527 | | 527 | |
528 o 2 default {foo} draft c_c | 528 o 2 default {foo} draft c_c |
529 | | 529 | |
530 o 1 default {} public c_b | 530 o 1 default {} public c_b |
531 | | 531 | |