Mercurial > hg
comparison hgeditor @ 24112:5d5ec4fb7ada
histedit: switch state to store node instead of ctx
Currently, if the node no longer exists, the state object fails to load
and pukes with an exception. Changing the state object to only store the
node allows callers to handle these cases. For instance, in
bootstrapcontinue we can now detect that the node doesn't exist and exit
gracefully.
The alternative is to have the state object store something like None
when the node doesn't exist, but then outside callers won't be able to
access the old node for recovery (unless we store both the node and the
ctx, but why bother).
More importantly it allows us to detect this case when doing hg histedit
--abort. Currently this situation results in both --continue and
--abort being broken and the user has to rm .hg/histedit-state to unwedge
their repo.
(description by Durham Goode)
author | Mateusz Kwapich <mitrandir@fb.com> |
---|---|
date | Thu, 05 Feb 2015 13:10:07 -0800 |
parents | 2b440bb8a66b |
children | 1aee2ab0f902 |
comparison
equal
deleted
inserted
replaced
24111:11d72683f3de | 24112:5d5ec4fb7ada |
---|