comparison hgext/histedit.py @ 25910:b4a85ddadcb9

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.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Mon, 03 Aug 2015 06:13:05 -0700
parents e62839741aaa
children 7617bc7b0c97
comparison
equal deleted inserted replaced
25909:e62839741aaa 25910:b4a85ddadcb9
789 changegroup.addchangegroup(repo, gen, 'histedit', 789 changegroup.addchangegroup(repo, gen, 'histedit',
790 'bundle:' + backupfile) 790 'bundle:' + backupfile)
791 os.remove(backupfile) 791 os.remove(backupfile)
792 792
793 # check whether we should update away 793 # check whether we should update away
794 if repo.unfiltered().revs('parents() and (%n or %ln)', 794 if repo.unfiltered().revs('parents() and (%n or %ln::)',
795 state.parentctxnode, leafs | tmpnodes): 795 state.parentctxnode, leafs | tmpnodes):
796 hg.clean(repo, state.topmost) 796 hg.clean(repo, state.topmost)
797 cleanupnode(ui, repo, 'created', tmpnodes) 797 cleanupnode(ui, repo, 'created', tmpnodes)
798 cleanupnode(ui, repo, 'temp', leafs) 798 cleanupnode(ui, repo, 'temp', leafs)
799 state.clear() 799 state.clear()