Mercurial > evolve
comparison tests/test-topic-stack.t @ 4082:185770c10a4e mercurial-4.3
test-compat: merge mercurial-4.4 into mercurial-4.3
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 03 Sep 2018 22:59:20 +0200 |
parents | 9c025ec4af88 |
children | ef49e48da074 |
comparison
equal
deleted
inserted
replaced
4081:20dcc92c285f | 4082:185770c10a4e |
---|---|
266 ------------------------------------ | 266 ------------------------------------ |
267 | 267 |
268 $ echo bbb > ddd | 268 $ echo bbb > ddd |
269 $ hg commit --amend | 269 $ hg commit --amend |
270 $ hg log -G | 270 $ hg log -G |
271 @ 6 default {foo} draft c_d | 271 @ 7 default {foo} draft c_d |
272 | | 272 | |
273 | o 5 default {foo} draft c_f | 273 | o 5 default {foo} draft c_f |
274 | | | 274 | | |
275 | o 4 default {foo} draft c_e | 275 | o 4 default {foo} draft c_e |
276 | | | 276 | | |
313 | 313 |
314 Also test the revset: | 314 Also test the revset: |
315 | 315 |
316 $ hg log -r 'stack()' | 316 $ hg log -r 'stack()' |
317 2 default {foo} draft c_c | 317 2 default {foo} draft c_c |
318 6 default {foo} draft c_d | 318 7 default {foo} draft c_d |
319 4 default {foo} draft c_e | 319 4 default {foo} draft c_e |
320 5 default {foo} draft c_f | 320 5 default {foo} draft c_f |
321 | 321 |
322 $ hg log -r 'stack(foo)' | 322 $ hg log -r 'stack(foo)' |
323 hg: parse error: stack() takes no argument, it works on current topic | 323 hg: parse error: stack() takes no argument, it works on current topic |
331 ------------------------------------- | 331 ------------------------------------- |
332 | 332 |
333 Make things linear again | 333 Make things linear again |
334 | 334 |
335 $ hg rebase -s 'desc(c_e)' -d 'desc(c_d) - obsolete()' | 335 $ hg rebase -s 'desc(c_e)' -d 'desc(c_d) - obsolete()' |
336 rebasing 4:0f9ac936c87d "c_e" (foo) | 336 rebasing 4:0f9ac936c87d "c_e" |
337 rebasing 5:6559e6d93aea "c_f" (foo) | 337 rebasing 5:6559e6d93aea "c_f" |
338 $ hg log -G | 338 $ hg log -G |
339 o 8 default {foo} draft c_f | 339 o 9 default {foo} draft c_f |
340 | | 340 | |
341 o 7 default {foo} draft c_e | 341 o 8 default {foo} draft c_e |
342 | | 342 | |
343 @ 6 default {foo} draft c_d | 343 @ 7 default {foo} draft c_d |
344 | | 344 | |
345 o 2 default {foo} draft c_c | 345 o 2 default {foo} draft c_c |
346 | | 346 | |
347 o 1 default {} public c_b | 347 o 1 default {} public c_b |
348 | | 348 | |
359 $ hg commit -m c_g | 359 $ hg commit -m c_g |
360 $ echo aaa > hhh | 360 $ echo aaa > hhh |
361 $ hg add hhh | 361 $ hg add hhh |
362 $ hg commit -m c_h | 362 $ hg commit -m c_h |
363 $ hg log -G | 363 $ hg log -G |
364 @ 10 default {foo} draft c_h | 364 @ 11 default {foo} draft c_h |
365 | | 365 | |
366 o 9 default {foo} draft c_g | 366 o 10 default {foo} draft c_g |
367 | | 367 | |
368 | o 8 default {foo} draft c_f | 368 | o 9 default {foo} draft c_f |
369 | | | 369 | | |
370 | o 7 default {foo} draft c_e | 370 | o 8 default {foo} draft c_e |
371 |/ | 371 |/ |
372 o 6 default {foo} draft c_d | 372 o 7 default {foo} draft c_d |
373 | | 373 | |
374 o 2 default {foo} draft c_c | 374 o 2 default {foo} draft c_c |
375 | | 375 | |
376 o 1 default {} public c_b | 376 o 1 default {} public c_b |
377 | | 377 | |
381 Test output | 381 Test output |
382 | 382 |
383 $ hg top -l | 383 $ hg top -l |
384 ### topic: foo (2 heads) | 384 ### topic: foo (2 heads) |
385 ### target: default (branch) | 385 ### target: default (branch) |
386 s6@ c_h (current) | 386 s6: c_f |
387 s5: c_g | 387 s5: c_e |
388 s2^ c_d (base) | 388 s2^ c_d (base) |
389 s4: c_f | 389 s4@ c_h (current) |
390 s3: c_e | 390 s3: c_g |
391 s2: c_d | 391 s2: c_d |
392 s1: c_c | 392 s1: c_c |
393 s0^ c_b (base) | 393 s0^ c_b (base) |
394 | 394 |
395 Case with multiple heads on the topic with unstability involved | 395 Case with multiple heads on the topic with unstability involved |
400 $ hg up 'desc(c_d)' | 400 $ hg up 'desc(c_d)' |
401 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | 401 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
402 $ echo ccc > ddd | 402 $ echo ccc > ddd |
403 $ hg commit --amend -m 'c_D' | 403 $ hg commit --amend -m 'c_D' |
404 $ hg rebase -d . -s 'desc(c_g)' | 404 $ hg rebase -d . -s 'desc(c_g)' |
405 rebasing 9:81264ae8a36a "c_g" (foo) | 405 rebasing 10:81264ae8a36a "c_g" |
406 rebasing 10:fde5f5941642 "c_h" (foo) | 406 rebasing 11:fde5f5941642 "c_h" |
407 $ hg log -G | 407 $ hg log -G |
408 o 13 default {foo} draft c_h | 408 o 15 default {foo} draft c_h |
409 | | 409 | |
410 o 12 default {foo} draft c_g | 410 o 14 default {foo} draft c_g |
411 | | 411 | |
412 @ 11 default {foo} draft c_D | 412 @ 13 default {foo} draft c_D |
413 | | 413 | |
414 | o 8 default {foo} draft c_f | 414 | o 9 default {foo} draft c_f |
415 | | | 415 | | |
416 | o 7 default {foo} draft c_e | 416 | o 8 default {foo} draft c_e |
417 | | | 417 | | |
418 | x 6 default {foo} draft c_d | 418 | x 7 default {foo} draft c_d |
419 |/ | 419 |/ |
420 o 2 default {foo} draft c_c | 420 o 2 default {foo} draft c_c |
421 | | 421 | |
422 o 1 default {} public c_b | 422 o 1 default {} public c_b |
423 | | 423 | |
425 | 425 |
426 | 426 |
427 $ hg topic --list | 427 $ hg topic --list |
428 ### topic: foo (2 heads) | 428 ### topic: foo (2 heads) |
429 ### target: default (branch) | 429 ### target: default (branch) |
430 s6: c_h | 430 s6$ c_f (unstable) |
431 s5: c_g | 431 s5$ c_e (unstable) |
432 s2^ c_D (base current) | 432 s2^ c_D (base current) |
433 s4$ c_f (unstable) | 433 s4: c_h |
434 s3$ c_e (unstable) | 434 s3: c_g |
435 s2@ c_D (current) | 435 s2@ c_D (current) |
436 s1: c_c | 436 s1: c_c |
437 s0^ c_b (base) | 437 s0^ c_b (base) |
438 | 438 |
439 Trying to list non existing topic | 439 Trying to list non existing topic |
446 | 446 |
447 Complex cases where commits with same topic are not consecutive but are linear | 447 Complex cases where commits with same topic are not consecutive but are linear |
448 ============================================================================== | 448 ============================================================================== |
449 | 449 |
450 $ hg log --graph | 450 $ hg log --graph |
451 o 13 default {foo} draft c_h | 451 o 15 default {foo} draft c_h |
452 | | 452 | |
453 o 12 default {foo} draft c_g | 453 o 14 default {foo} draft c_g |
454 | | 454 | |
455 @ 11 default {foo} draft c_D | 455 @ 13 default {foo} draft c_D |
456 | | 456 | |
457 | o 8 default {foo} draft c_f | 457 | o 9 default {foo} draft c_f |
458 | | | 458 | | |
459 | o 7 default {foo} draft c_e | 459 | o 8 default {foo} draft c_e |
460 | | | 460 | | |
461 | x 6 default {foo} draft c_d | 461 | x 7 default {foo} draft c_d |
462 |/ | 462 |/ |
463 o 2 default {foo} draft c_c | 463 o 2 default {foo} draft c_c |
464 | | 464 | |
465 o 1 default {} public c_b | 465 o 1 default {} public c_b |
466 | | 466 | |
467 o 0 default {} public c_a | 467 o 0 default {} public c_a |
468 | 468 |
469 Converting into a linear chain | 469 Converting into a linear chain |
470 $ hg rebase -s 'desc("c_e") - obsolete()' -d 'desc("c_h") - obsolete()' | 470 $ hg rebase -s 'desc("c_e") - obsolete()' -d 'desc("c_h") - obsolete()' |
471 rebasing 7:215bc359096a "c_e" (foo) | 471 rebasing 8:215bc359096a "c_e" |
472 rebasing 8:ec9267b3f33f "c_f" (foo) | 472 rebasing 9:ec9267b3f33f "c_f" |
473 | 473 |
474 $ hg log -G | 474 $ hg log -G |
475 o 15 default {foo} draft c_f | 475 o 17 default {foo} draft c_f |
476 | | 476 | |
477 o 14 default {foo} draft c_e | 477 o 16 default {foo} draft c_e |
478 | | 478 | |
479 o 13 default {foo} draft c_h | 479 o 15 default {foo} draft c_h |
480 | | 480 | |
481 o 12 default {foo} draft c_g | 481 o 14 default {foo} draft c_g |
482 | | 482 | |
483 @ 11 default {foo} draft c_D | 483 @ 13 default {foo} draft c_D |
484 | | 484 | |
485 o 2 default {foo} draft c_c | 485 o 2 default {foo} draft c_c |
486 | | 486 | |
487 o 1 default {} public c_b | 487 o 1 default {} public c_b |
488 | | 488 | |
491 Changing topics on some commits in between | 491 Changing topics on some commits in between |
492 $ hg topic foobar -r 'desc(c_e) + desc(c_D)' | 492 $ hg topic foobar -r 'desc(c_e) + desc(c_D)' |
493 switching to topic foobar | 493 switching to topic foobar |
494 changed topic on 2 changes | 494 changed topic on 2 changes |
495 $ hg log -G | 495 $ hg log -G |
496 @ 17 default {foobar} draft c_D | 496 @ 19 default {foobar} draft c_D |
497 | | 497 | |
498 | o 16 default {foobar} draft c_e | 498 | o 18 default {foobar} draft c_e |
499 | | | 499 | | |
500 | | o 15 default {foo} draft c_f | 500 | | o 17 default {foo} draft c_f |
501 | | | | 501 | | | |
502 | | x 14 default {foo} draft c_e | 502 | | x 16 default {foo} draft c_e |
503 | |/ | 503 | |/ |
504 | o 13 default {foo} draft c_h | 504 | o 15 default {foo} draft c_h |
505 | | | 505 | | |
506 | o 12 default {foo} draft c_g | 506 | o 14 default {foo} draft c_g |
507 | | | 507 | | |
508 | x 11 default {foo} draft c_D | 508 | x 13 default {foo} draft c_D |
509 |/ | 509 |/ |
510 o 2 default {foo} draft c_c | 510 o 2 default {foo} draft c_c |
511 | | 511 | |
512 o 1 default {} public c_b | 512 o 1 default {} public c_b |
513 | | 513 | |
514 o 0 default {} public c_a | 514 o 0 default {} public c_a |
515 | 515 |
516 $ hg rebase -s 'desc("c_f") - obsolete()' -d 'desc("c_e") - obsolete()' | 516 $ hg rebase -s 'desc("c_f") - obsolete()' -d 'desc("c_e") - obsolete()' |
517 rebasing 15:77082e55de88 "c_f" (foo) | 517 rebasing 17:77082e55de88 "c_f" |
518 switching to topic foo | 518 switching to topic foo |
519 switching to topic foobar | 519 switching to topic foobar |
520 $ hg rebase -s 'desc("c_g") - obsolete()' -d 'desc("c_D") - obsolete()' | 520 $ hg rebase -s 'desc("c_g") - obsolete()' -d 'desc("c_D") - obsolete()' |
521 rebasing 12:0c3e8aed985d "c_g" (foo) | 521 rebasing 14:0c3e8aed985d "c_g" |
522 switching to topic foo | 522 switching to topic foo |
523 rebasing 13:b9e4f3709bc5 "c_h" (foo) | 523 rebasing 15:b9e4f3709bc5 "c_h" |
524 rebasing 16:4bc813530301 "c_e" (foobar) | 524 rebasing 18:4bc813530301 "c_e" |
525 switching to topic foobar | 525 switching to topic foobar |
526 rebasing 18:4406ea4be852 "c_f" (tip foo) | 526 rebasing 20:4406ea4be852 "c_f" (tip) |
527 switching to topic foo | 527 switching to topic foo |
528 switching to topic foobar | 528 switching to topic foobar |
529 $ hg up | 529 $ hg up |
530 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | 530 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
531 $ hg log --graph | 531 $ hg log --graph |
532 o 22 default {foo} draft c_f | 532 o 24 default {foo} draft c_f |
533 | | 533 | |
534 @ 21 default {foobar} draft c_e | 534 @ 23 default {foobar} draft c_e |
535 | | 535 | |
536 o 20 default {foo} draft c_h | 536 o 22 default {foo} draft c_h |
537 | | 537 | |
538 o 19 default {foo} draft c_g | 538 o 21 default {foo} draft c_g |
539 | | 539 | |
540 o 17 default {foobar} draft c_D | 540 o 19 default {foobar} draft c_D |
541 | | 541 | |
542 o 2 default {foo} draft c_c | 542 o 2 default {foo} draft c_c |
543 | | 543 | |
544 o 1 default {} public c_b | 544 o 1 default {} public c_b |
545 | | 545 | |
803 -------------------------------- | 803 -------------------------------- |
804 | 804 |
805 get things linear again | 805 get things linear again |
806 | 806 |
807 $ hg rebase -r s1 -d default | 807 $ hg rebase -r s1 -d default |
808 rebasing 16:1d84ec948370 "c_D" (tip blue) | 808 rebasing 16:1d84ec948370 "c_D" (tip) |
809 switching to topic blue | 809 switching to topic blue |
810 $ hg rebase -r s2 -d s1 | 810 $ hg rebase -r s2 -d s1 |
811 rebasing 13:3ab2eedae500 "c_G" (blue) | 811 rebasing 13:3ab2eedae500 "c_G" |
812 $ hg rebase -r s3 -d s2 | 812 $ hg rebase -r s3 -d s2 |
813 rebasing 8:3bfe800e0486 "c_I" (blue) | 813 rebasing 8:3bfe800e0486 "c_I" |
814 $ hg stack | 814 $ hg stack |
815 ### topic: blue | 815 ### topic: blue |
816 ### target: default (branch) | 816 ### target: default (branch) |
817 s3: c_I | 817 s3: c_I |
818 s2: c_G | 818 s2: c_G |
861 examine changes to 'ggg'? [Ynesfdaq?] n | 861 examine changes to 'ggg'? [Ynesfdaq?] n |
862 | 862 |
863 Done splitting? [yN] y | 863 Done splitting? [yN] y |
864 | 864 |
865 $ hg --config extensions.evolve= obslog --all | 865 $ hg --config extensions.evolve= obslog --all |
866 o dde94df880e9 (21) c_G | 866 o dde94df880e9 (22) c_G |
867 | | 867 | |
868 | @ e7ea874afbd5 (22) c_G | 868 | @ e7ea874afbd5 (23) c_G |
869 |/ | 869 |/ |
870 x b24bab30ac12 (20) c_G | 870 x b24bab30ac12 (21) c_G |
871 | rewritten(parent, content) as dde94df880e9, e7ea874afbd5 using split by test (Thu Jan 01 00:00:00 1970 +0000) | 871 | rewritten(parent, content) as dde94df880e9, e7ea874afbd5 by test (Thu Jan 01 00:00:00 1970 +0000) |
872 | | 872 | |
873 x 907f7d3c2333 (18) c_G | 873 x 907f7d3c2333 (18) c_G |
874 | rewritten as b24bab30ac12 using amend by test (Thu Jan 01 00:00:00 1970 +0000) | 874 | rewritten as b24bab30ac12 by test (Thu Jan 01 00:00:00 1970 +0000) |
875 | | 875 | |
876 x 3ab2eedae500 (13) c_G | 876 x 3ab2eedae500 (13) c_G |
877 | rewritten as 907f7d3c2333 using rebase by test (Thu Jan 01 00:00:00 1970 +0000) | 877 | rewritten as 907f7d3c2333 by test (Thu Jan 01 00:00:00 1970 +0000) |
878 | | 878 | |
879 x c7d60a180d05 (6) c_G | 879 x c7d60a180d05 (6) c_G |
880 rewritten as 3ab2eedae500 using amend by test (Thu Jan 01 00:00:00 1970 +0000) | 880 rewritten as 3ab2eedae500 by test (Thu Jan 01 00:00:00 1970 +0000) |
881 | 881 |
882 $ hg export . | 882 $ hg export . |
883 # HG changeset patch | 883 # HG changeset patch |
884 # User test3 | 884 # User test3 |
885 # Date 0 0 | 885 # Date 0 0 |