histedit: temporarily shorten name of 'constraints' variable
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Fri, 26 Aug 2016 20:42:18 +0200
changeset 29877 1c19d3efe15d
parent 29876 034d38b5f6fb
child 29878 d7de02efa47e
histedit: temporarily shorten name of 'constraints' variable An upcoming changeset will make the line where this variable is used slightly too long. Other later changesets will clean that up further and makes the variable unnecessary, so this is only temporary and it does seems useful to put anything more complicate in place.
hgext/histedit.py
--- a/hgext/histedit.py	Fri Aug 26 20:38:37 2016 +0200
+++ b/hgext/histedit.py	Fri Aug 26 20:42:18 2016 +0200
@@ -1379,25 +1379,25 @@
     for action in actions:
         action.verify(prev)
         prev = action
-        constraints = action.constraints
-        for constraint in constraints:
+        constrs = action.constraints
+        for constraint in constrs:
             if constraint not in _constraints.known():
                 raise error.ParseError(_('unknown constraint "%s"') %
                         constraint)
 
         if action.node is not None:
             ha = node.hex(action.node)
-            if _constraints.noother in constraints and ha not in expected:
+            if _constraints.noother in constrs and ha not in expected:
                 raise error.ParseError(
                     _('%s "%s" changeset was not a candidate')
                      % (action.verb, ha[:12]),
                     hint=_('only use listed changesets'))
-            if _constraints.forceother in constraints and ha in expected:
+            if _constraints.forceother in constrs and ha in expected:
                 raise error.ParseError(
                     _('%s "%s" changeset was not an edited list candidate')
                      % (action.verb, ha[:12]),
                     hint=_('only use listed changesets'))
-            if _constraints.noduplicates in constraints and ha in seen:
+            if _constraints.noduplicates in constrs and ha in seen:
                 raise error.ParseError(_(
                         'duplicated command for changeset %s') %
                         ha[:12])