comparison hgext/histedit.py @ 24131:a2d869e22b5e

histedit: don't recreate state object Previously, the histedit state object was being recreated during continue/abort. This meant that the locks that were held on the original state object were not available to actions, which meant actions could not release the lock on the repository (like an 'exec' action would need to do). This affected our internal extension that added the 'exec' action.
author Durham Goode <durham@fb.com>
date Tue, 17 Feb 2015 19:59:26 -0800
parents 5d5ec4fb7ada
children 5a64b676c5d3
comparison
equal deleted inserted replaced
24130:03f692eee31d 24131:a2d869e22b5e
597 replacements = [] 597 replacements = []
598 keep = opts.get('keep', False) 598 keep = opts.get('keep', False)
599 599
600 # rebuild state 600 # rebuild state
601 if goal == 'continue': 601 if goal == 'continue':
602 state = histeditstate(repo)
603 state.read() 602 state.read()
604 state = bootstrapcontinue(ui, state, opts) 603 state = bootstrapcontinue(ui, state, opts)
605 elif goal == 'abort': 604 elif goal == 'abort':
606 state = histeditstate(repo)
607 state.read() 605 state.read()
608 mapping, tmpnodes, leafs, _ntm = processreplacement(state) 606 mapping, tmpnodes, leafs, _ntm = processreplacement(state)
609 ui.debug('restore wc to old parent %s\n' % node.short(state.topmost)) 607 ui.debug('restore wc to old parent %s\n' % node.short(state.topmost))
610 # check whether we should update away 608 # check whether we should update away
611 parentnodes = [c.node() for c in repo[None].parents()] 609 parentnodes = [c.node() for c in repo[None].parents()]