[PATCH] censor: rename loop variable to silence pyflakes warning
Yuya Nishihara
yuya at tcha.org
Sat Sep 15 01:50:48 UTC 2018
# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1536975300 -32400
# Sat Sep 15 10:35:00 2018 +0900
# Node ID 3a3364720695f26ceee3cd0a056fda59251f4ca5
# Parent 6ecfd12f09cd4fe185ebbc98d254534ebd995b68
censor: rename loop variable to silence pyflakes warning
hgext/censor.py:92: list comprehension redefines 'c' from line 88
diff --git a/hgext/censor.py b/hgext/censor.py
--- a/hgext/censor.py
+++ b/hgext/censor.py
@@ -85,9 +85,9 @@ def _docensor(ui, repo, path, rev='', to
fnode = fctx.filenode()
heads = []
for headnode in repo.heads():
- c = repo[headnode]
- if path in c and c.filenode(path) == fnode:
- heads.append(c)
+ hc = repo[headnode]
+ if path in hc and hc.filenode(path) == fnode:
+ heads.append(hc)
if heads:
headlist = ', '.join([short(c.node()) for c in heads])
raise error.Abort(_('cannot censor file in heads (%s)') % headlist,
More information about the Mercurial-devel
mailing list