[PATCH] histedit: avoid converting nodeid to context and back again

Augie Fackler raf at durin42.com
Wed Sep 28 20:04:43 EDT 2016


On Wed, Sep 28, 2016 at 08:55:39AM -0700, Martin von Zweigbergk via Mercurial-devel wrote:
> # HG changeset patch
> # User Martin von Zweigbergk <martinvonz at google.com>
> # Date 1475039368 25200
> #      Tue Sep 27 22:09:28 2016 -0700
> # Node ID 88027470b95adb4f0a67496f85de18e4cbe05083
> # Parent  e83f89d3b1f733d0ee5f23f6a2293279a17fbbfb
> histedit: avoid converting nodeid to context and back again

Cool. Queued, thanks.

>
> It looks like this became unnecessary in e767f5aba810 (histedit: fix
> preventing strips during histedit, 2015-04-04).
>
> diff -r e83f89d3b1f7 -r 88027470b95a hgext/histedit.py
> --- a/hgext/histedit.py	Fri Sep 23 08:15:05 2016 +0000
> +++ b/hgext/histedit.py	Tue Sep 27 22:09:28 2016 -0700
> @@ -1572,8 +1572,7 @@
>          state.read()
>          histedit_nodes = set([action.node for action
>                               in state.actions if action.node])
> -        strip_nodes = set([repo[n].node() for n in nodelist])
> -        common_nodes = histedit_nodes & strip_nodes
> +        common_nodes = histedit_nodes & set(nodelist)
>          if common_nodes:
>              raise error.Abort(_("histedit in progress, can't strip %s")
>                               % ', '.join(node.short(x) for x in common_nodes))
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list