[PATCH] histedit: don't recreate state object

Augie Fackler raf at durin42.com
Thu Feb 19 14:32:35 CST 2015


On Tue, Feb 17, 2015 at 08:08:21PM -0800, Durham Goode wrote:
> # HG changeset patch
> # User Durham Goode <durham at fb.com>
> # Date 1424231966 28800
> #      Tue Feb 17 19:59:26 2015 -0800
> # Node ID 85b6e8979ba1810cb11dfe149a0099569e0c75d1
> # Parent  e1dbe0b215ae137eec53ceb12440536d570a83d2
> histedit: don't recreate state object

It took some reading and meditation, but I'm convinced that the old
code was buggy anyway, in that it wasn't retaining the locks. Queued.

>
> 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))
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list