From patchwork Wed Feb 18 04:08:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: histedit: don't recreate state object From: Durham Goode X-Patchwork-Id: 7806 Message-Id: <85b6e8979ba1810cb11d.1424232501@dev2000.prn2.facebook.com> To: Date: Tue, 17 Feb 2015 20:08:21 -0800 # HG changeset patch # User Durham Goode # Date 1424231966 28800 # Tue Feb 17 19:59:26 2015 -0800 # Node ID 85b6e8979ba1810cb11dfe149a0099569e0c75d1 # Parent e1dbe0b215ae137eec53ceb12440536d570a83d2 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. diff --git a/hgext/histedit.py b/hgext/histedit.py --- a/hgext/histedit.py +++ b/hgext/histedit.py @@ -593,11 +593,9 @@ def _histedit(ui, repo, state, *freeargs # rebuild state if goal == 'continue': - state = histeditstate(repo) state.read() state = bootstrapcontinue(ui, state, opts) elif goal == 'abort': - state = histeditstate(repo) state.read() mapping, tmpnodes, leafs, _ntm = processreplacement(state) ui.debug('restore wc to old parent %s\n' % node.short(state.topmost))