Show More
@@ -557,13 +557,16 b' def restorestatus(repo):' | |||||
557 |
|
557 | |||
558 | def abort(repo, originalwd, target, state): |
|
558 | def abort(repo, originalwd, target, state): | |
559 | 'Restore the repository to its original state' |
|
559 | 'Restore the repository to its original state' | |
560 | descendants = repo.changelog.descendants |
|
560 | dstates = [s for s in state.values() if s != nullrev] | |
561 | ispublic = lambda r: repo._phaserev[r] == phases.public |
|
561 | if [d for d in dstates if not repo[d].mutable()]: | |
562 | if filter(ispublic, descendants(target)): |
|
|||
563 | repo.ui.warn(_("warning: immutable rebased changeset detected, " |
|
562 | repo.ui.warn(_("warning: immutable rebased changeset detected, " | |
564 | "can't abort\n")) |
|
563 | "can't abort\n")) | |
565 | return -1 |
|
564 | return -1 | |
566 | elif set(descendants(target)) - set(state.values()): |
|
565 | ||
|
566 | descendants = set() | |||
|
567 | if dstates: | |||
|
568 | descendants = set(repo.changelog.descendants(*dstates)) | |||
|
569 | if descendants - set(dstates): | |||
567 | repo.ui.warn(_("warning: new changesets detected on target branch, " |
|
570 | repo.ui.warn(_("warning: new changesets detected on target branch, " | |
568 |
|
|
571 | "can't abort\n")) | |
569 | return -1 |
|
572 | return -1 |
General Comments 0
You need to be logged in to leave comments.
Login now