Show More
@@ -829,6 +829,11 b' def histedit(ui, repo, *freeargs, **opts' | |||||
829 | state.wlock = repo.wlock() |
|
829 | state.wlock = repo.wlock() | |
830 | state.lock = repo.lock() |
|
830 | state.lock = repo.lock() | |
831 | _histedit(ui, repo, state, *freeargs, **opts) |
|
831 | _histedit(ui, repo, state, *freeargs, **opts) | |
|
832 | except error.Abort: | |||
|
833 | if repo.vfs.exists('histedit-last-edit.txt'): | |||
|
834 | ui.warn(_('warning: histedit rules saved ' | |||
|
835 | 'to: .hg/histedit-last-edit.txt\n')) | |||
|
836 | raise | |||
832 | finally: |
|
837 | finally: | |
833 | release(state.lock, state.wlock) |
|
838 | release(state.lock, state.wlock) | |
834 |
|
839 | |||
@@ -957,6 +962,8 b' def _histedit(ui, repo, state, *freeargs' | |||||
957 | cmdutil.checkunfinished(repo) |
|
962 | cmdutil.checkunfinished(repo) | |
958 | cmdutil.bailifchanged(repo) |
|
963 | cmdutil.bailifchanged(repo) | |
959 |
|
964 | |||
|
965 | if repo.vfs.exists('histedit-last-edit.txt'): | |||
|
966 | repo.vfs.unlink('histedit-last-edit.txt') | |||
960 | topmost, empty = repo.dirstate.parents() |
|
967 | topmost, empty = repo.dirstate.parents() | |
961 | if outg: |
|
968 | if outg: | |
962 | if freeargs: |
|
969 | if freeargs: |
@@ -460,8 +460,24 b' Attempting to fold a change into a publi' | |||||
460 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
460 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
461 | reverting a |
|
461 | reverting a | |
462 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
462 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
|
463 | warning: histedit rules saved to: .hg/histedit-last-edit.txt | |||
463 | abort: cannot fold into public change 18aa70c8ad22 |
|
464 | abort: cannot fold into public change 18aa70c8ad22 | |
464 | [255] |
|
465 | [255] | |
|
466 | $ cat .hg/histedit-last-edit.txt | |||
|
467 | fold 0012be4a27ea 2 extend a | |||
|
468 | ||||
|
469 | # Edit history between 0012be4a27ea and 0012be4a27ea | |||
|
470 | # | |||
|
471 | # Commits are listed from least to most recent | |||
|
472 | # | |||
|
473 | # Commands: | |||
|
474 | # p, fold = use commit | |||
|
475 | # e, edit = use commit, but stop for amending | |||
|
476 | # f, fold = use commit, but combine it with the one above | |||
|
477 | # r, roll = like fold, but discard this commit's description | |||
|
478 | # d, drop = remove commit from history | |||
|
479 | # m, mess = edit commit message without changing commit content | |||
|
480 | # | |||
465 | TODO: this abort shouldn't be required, but it is for now to leave the repo in |
|
481 | TODO: this abort shouldn't be required, but it is for now to leave the repo in | |
466 | a clean state. |
|
482 | a clean state. | |
467 | $ hg histedit --abort |
|
483 | $ hg histedit --abort |
General Comments 0
You need to be logged in to leave comments.
Login now