On Sat, Jul 8, 2017 at 4:51 PM, Jun Wu <qu...@fb.com> wrote:
> diff --git a/hgext/histedit.py b/hgext/histedit.py
> --- a/hgext/histedit.py
> +++ b/hgext/histedit.py
> @@ -1182,5 +1182,9 @@ def _finishhistedit(ui, repo, state):
>          mapping[n] = ()
>
> -    safecleanupnode(ui, repo, mapping)
> +    # remove entries about unknown nodes
> +    nodemap = repo.unfiltered().changelog.nodemap
> +    mapping = {k: v for k, v in mapping.items()
> +               if k in nodemap and all(n in nodemap for n in v)}

I suppose these few lines could potentially move into cleanupnodes?
IIUC, it's to prevent crashing if you had stripped nodes during
histedit. The same can be done during rebase (while stopped to resolve
conflicts) and

> +    scmutil.cleanupnodes(repo, mapping, 'histedit')
>
>      state.clear()
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to