Patchwork [3,of,8,cleanup] histedit: drop the 'nodetoverify' local variable

login
register
mail settings
Submitter Pierre-Yves David
Date Aug. 26, 2016, 7:35 p.m.
Message ID <21af9ca4b1bb79bcabd7.1472240128@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/16459/
State Accepted
Headers show

Comments

Pierre-Yves David - Aug. 26, 2016, 7:35 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@ens-lyon.org>
# Date 1472236717 -7200
#      Fri Aug 26 20:38:37 2016 +0200
# Node ID 21af9ca4b1bb79bcabd75556a21083a1ab6bc9a4
# Parent  ad3f66039cf36f09eadd31460009aef9454ad39c
# EXP-Topic histedit.constraint
histedit: drop the 'nodetoverify' local variable

We can just use 'action.node'.

Patch

diff --git a/hgext/histedit.py b/hgext/histedit.py
--- a/hgext/histedit.py
+++ b/hgext/histedit.py
@@ -1385,9 +1385,8 @@  def verifyactions(actions, state, ctxs):
                 raise error.ParseError(_('unknown constraint "%s"') %
                         constraint)
 
-        nodetoverify = action.node
-        if nodetoverify is not None:
-            ha = node.hex(nodetoverify)
+        if action.node is not None:
+            ha = node.hex(action.node)
             if _constraints.noother in constraints and ha not in expected:
                 raise error.ParseError(
                     _('%s "%s" changeset was not a candidate')