Show More
@@ -7,7 +7,7 b' from mercurial.i18n import _' | |||||
7 | from mercurial.node import nullid |
|
7 | from mercurial.node import nullid | |
8 | from mercurial.lock import release |
|
8 | from mercurial.lock import release | |
9 | from mercurial import cmdutil, hg, scmutil, util |
|
9 | from mercurial import cmdutil, hg, scmutil, util | |
10 | from mercurial import repair, bookmarks |
|
10 | from mercurial import repair, bookmarks, merge | |
11 |
|
11 | |||
12 | cmdtable = {} |
|
12 | cmdtable = {} | |
13 | command = cmdutil.command(cmdtable) |
|
13 | command = cmdutil.command(cmdtable) | |
@@ -205,6 +205,11 b' def stripcmd(ui, repo, *revs, **opts):' | |||||
205 |
|
205 | |||
206 | repo.dirstate.rebuild(urev, uctx.manifest(), changedfiles) |
|
206 | repo.dirstate.rebuild(urev, uctx.manifest(), changedfiles) | |
207 | repo.dirstate.write() |
|
207 | repo.dirstate.write() | |
|
208 | ||||
|
209 | # clear resolve state | |||
|
210 | ms = merge.mergestate(repo) | |||
|
211 | ms.reset(repo['.'].node()) | |||
|
212 | ||||
208 | update = False |
|
213 | update = False | |
209 |
|
214 | |||
210 |
|
215 |
@@ -496,10 +496,11 b' applied patches after stripping ancestor' | |||||
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:7 |
|
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 | |
@@ -510,9 +511,24 b' Verify strip protects against stripping ' | |||||
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] | |
@@ -528,6 +544,16 b' Verify strip protects against stripping ' | |||||
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 |
General Comments 0
You need to be logged in to leave comments.
Login now