[PATCH] histedit: remove unused variable state
timeless
timeless at mozdev.org
Thu Dec 31 15:40:56 UTC 2015
# HG changeset patch
# User timeless <timeless at mozdev.org>
# Date 1451576378 0
# Thu Dec 31 15:39:38 2015 +0000
# Node ID 5f94f7753cf06bc1c85209e97aa6591d0c1b0b49
# Parent 44f717c879033f28d3f7e7dc9f34aa394d2fea3f
histedit: remove unused variable state
diff --git a/contrib/check-code.py b/contrib/check-code.py
--- a/contrib/check-code.py
+++ b/contrib/check-code.py
@@ -127,6 +127,7 @@
(r'seq ', "don't use 'seq', use $TESTDIR/seq.py"),
(r'\butil\.Abort\b', "directly use error.Abort"),
(r'\|&', "don't use |&, use 2>&1"),
+ (r'\w = \w', "don't use two spaces after equals"),
],
# warnings
[
@@ -220,6 +221,7 @@
(r'(\w|\)),\w', "missing whitespace after ,"),
(r'(\w|\))[+/*\-<>]\w', "missing whitespace in expression"),
(r'^\s+(\w|\.)+=\w[^,()\n]*$', "missing whitespace in assignment"),
+ (r'\w\s=\s\s\w', "superfluous whitespace in assignment"),
(r'.{81}', "line too long"),
(r' x+[xo][\'"]\n\s+[\'"]x', 'string join across lines with no space'),
(r'[^\n]\Z', "no trailing newline"),
@@ -337,6 +339,7 @@
(r'\w+ (\+\+|--)', "use foo++, not foo ++"),
(r'\w,\w', "missing whitespace after ,"),
(r'^[^#]\w[+/*]\w', "missing whitespace in expression"),
+ (r'\w\s=\s\s\w', "superfluous whitespace in assignment"),
(r'^#\s+\w', "use #foo, not # foo"),
(r'[^\n]\Z', "no trailing newline"),
(r'^\s*#import\b', "use only #include in standard C code"),
diff --git a/hgext/histedit.py b/hgext/histedit.py
--- a/hgext/histedit.py
+++ b/hgext/histedit.py
@@ -629,7 +629,6 @@
""" Verifies semantic correctness of the fold rule"""
super(fold, self).verify(prev)
repo = self.repo
- state = self.state
if not prev:
c = repo[self.node].parents()[0]
elif not prev.verb in ('pick', 'base'):
More information about the Mercurial-devel
mailing list