# HG changeset patch # User Pierre-Yves David # Date 2015-08-03 13:13:05 # Node ID b4a85ddadcb97ec8741720383e7490ac90a3be86 # Parent e62839741aaa85516a8b2e99048093a839e519d1 histedit: do not stay on a cleaned nodes on abort There is case where nodes are neither in tmpnodes nor leaf but still get removed. For example, if you used the "edit" action, made a commit and run --abort. The commit you made is not tracked by histedit, yet it will likely be cleaned up with its parent. The commit may not tracked because no replacements computations are done in the --abort case. diff --git a/hgext/histedit.py b/hgext/histedit.py --- a/hgext/histedit.py +++ b/hgext/histedit.py @@ -791,7 +791,7 @@ def _histedit(ui, repo, state, *freeargs os.remove(backupfile) # check whether we should update away - if repo.unfiltered().revs('parents() and (%n or %ln)', + if repo.unfiltered().revs('parents() and (%n or %ln::)', state.parentctxnode, leafs | tmpnodes): hg.clean(repo, state.topmost) cleanupnode(ui, repo, 'created', tmpnodes)