Show More
@@ -455,6 +455,9 def histedit(ui, repo, *parent, **opts): | |||
|
455 | 455 | |
|
456 | 456 | keep = opts.get('keep', False) |
|
457 | 457 | revs = between(repo, parent, topmost, keep) |
|
458 | if not revs: | |
|
459 | ui.warn(_('nothing to edit\n')) | |
|
460 | return 1 | |
|
458 | 461 | |
|
459 | 462 | ctxs = [repo[r] for r in revs] |
|
460 | 463 | rules = opts.get('commands', '') |
@@ -588,7 +591,7 def between(repo, old, new, keep): | |||
|
588 | 591 | |
|
589 | 592 | When keep is false, the specified set can't have children.""" |
|
590 | 593 | ctxs = list(repo.set('%n::%n', old, new)) |
|
591 | if not keep: | |
|
594 | if ctxs and not keep: | |
|
592 | 595 | if repo.revs('(%ld::) - (%ld + hidden())', ctxs, ctxs): |
|
593 | 596 | raise util.Abort(_('cannot edit history that would orphan nodes')) |
|
594 | 597 | root = min(ctxs) |
@@ -60,3 +60,10 Run a dummy edit to make sure we get tip | |||
|
60 | 60 | # |
|
61 | 61 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
62 | 62 | |
|
63 | Run on a revision not ancestors of the current working directory. | |
|
64 | ||
|
65 | $ hg up 2 | |
|
66 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
67 | $ hg histedit -r 4 | |
|
68 | nothing to edit | |
|
69 | [1] |
General Comments 0
You need to be logged in to leave comments.
Login now