Mercurial > hg
comparison tests/test-strip.t @ 24709:69154e0ae384
strip: properly clear resolve state with --keep (issue4593)
Normal updates automatically clean up the resolve state, but strip
--keep does a "manual" update that bypasses the normal machinery. This
adds a mergestate reset.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 13 Apr 2015 07:42:25 -0500 |
parents | e0e28e910fa3 |
children | 1ef96a3b8b89 af5b2f4ed594 |
comparison
equal
deleted
inserted
replaced
24708:fb47816e1a9c | 24709:69154e0ae384 |
---|---|
494 $ hg qapplied | 494 $ hg qapplied |
495 | 495 |
496 Verify strip protects against stripping wc parent when there are uncommitted mods | 496 Verify strip protects against stripping wc parent when there are uncommitted mods |
497 | 497 |
498 $ echo b > b | 498 $ echo b > b |
499 $ echo bb > bar | |
499 $ hg add b | 500 $ hg add b |
500 $ hg ci -m 'b' | 501 $ hg ci -m 'b' |
501 $ hg log --graph | 502 $ hg log --graph |
502 @ changeset: 1:7519abd79d14 | 503 @ changeset: 1:76dcf9fab855 |
503 | tag: tip | 504 | tag: tip |
504 | user: test | 505 | user: test |
505 | date: Thu Jan 01 00:00:00 1970 +0000 | 506 | date: Thu Jan 01 00:00:00 1970 +0000 |
506 | summary: b | 507 | summary: b |
507 | | 508 | |
508 o changeset: 0:9ab35a2d17cb | 509 o changeset: 0:9ab35a2d17cb |
509 user: test | 510 user: test |
510 date: Thu Jan 01 00:00:00 1970 +0000 | 511 date: Thu Jan 01 00:00:00 1970 +0000 |
511 summary: a | 512 summary: a |
512 | 513 |
514 $ hg up 0 | |
515 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
516 $ echo c > bar | |
517 $ hg up -t false | |
518 merging bar | |
519 merging bar failed! | |
520 1 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
521 use 'hg resolve' to retry unresolved file merges | |
522 [1] | |
523 $ hg sum | |
524 parent: 1:76dcf9fab855 tip | |
525 b | |
526 branch: default | |
527 commit: 1 modified, 1 unknown, 1 unresolved | |
528 update: (current) | |
529 mq: 3 unapplied | |
513 | 530 |
514 $ echo c > b | 531 $ echo c > b |
515 $ echo c > bar | |
516 $ hg strip tip | 532 $ hg strip tip |
517 abort: local changes found | 533 abort: local changes found |
518 [255] | 534 [255] |
519 $ hg strip tip --keep | 535 $ hg strip tip --keep |
520 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | 536 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
526 summary: a | 542 summary: a |
527 | 543 |
528 $ hg status | 544 $ hg status |
529 M bar | 545 M bar |
530 ? b | 546 ? b |
547 ? bar.orig | |
548 | |
549 $ rm bar.orig | |
550 $ hg sum | |
551 parent: 0:9ab35a2d17cb tip | |
552 a | |
553 branch: default | |
554 commit: 1 modified, 1 unknown | |
555 update: (current) | |
556 mq: 3 unapplied | |
531 | 557 |
532 Strip adds, removes, modifies with --keep | 558 Strip adds, removes, modifies with --keep |
533 | 559 |
534 $ touch b | 560 $ touch b |
535 $ hg add b | 561 $ hg add b |