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