[PATCH] histedit: remove unused variable state
Augie Fackler
raf at durin42.com
Thu Dec 31 10:56:09 CST 2015
> On Dec 31, 2015, at 10:40 AM, timeless <timeless at mozdev.org> wrote:
>
> # 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
I’ll queue this, but you should split out your errant check-code bits which look righteous as well.
>
> 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'):
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20151231/37b079c8/attachment.pgp>
More information about the Mercurial-devel
mailing list