hg rebase, histedit, unshelve and other commands may stop in an unfinished state
because of merge conflicts or other reasons. The user then has the ability to
continue or abort. Undoing in this case is slightly tricky as for example
aborting a rebase will perform real strips and so undo will fail with an error.
This change still records these states, but flags them as unfinished and skips
over them when undoing and redoing. Hg undo --absolute does not ignore these
states in the really unlikely situation you want to go to one of them.
Details
- Reviewers
quark - Group Reviewers
Restricted Project - Commits
- rFBHGXa6e1cbdde822: undo: unfinished command handling
Diff Detail
- Repository
- rFBHGX Facebook Mercurial Extensions
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
hgext3rd/undo.py | ||
---|---|---|
81 | I think InterventionRequired is not the only cause of "unfinished" state. We probably want to have a similar check like cmdutil.checkunfinished to mark things as "unfinished". That covers wider cases than just InterventionRequired. | |
90–91 | Maybe add a new state to undolog, like: safelog(repo, command, unfinished=unfinished) | |
179 | Append: 'unfinished': (unfinished and '1' or '0') here. |
hgext3rd/undo.py | ||
---|---|---|
81 | Sure, I can add a checkunfinished, but the exception is still thrown. I need to explicitly catch every exception that causes and unfinished state as otherwise I won't be able to checkunfinished. I guess I could catch all exceptions, but I'm not sure that this would be safe? |
I think InterventionRequired is not the only cause of "unfinished" state. We probably want to have a similar check like cmdutil.checkunfinished to mark things as "unfinished". That covers wider cases than just InterventionRequired.