changeset 39677:8bfbb25859f1

censor: rename loop variable to silence pyflakes warning hgext/censor.py:92: list comprehension redefines 'c' from line 88
author Yuya Nishihara <yuya@tcha.org>
date Sat, 15 Sep 2018 10:35:00 +0900
parents a12916cfef9e
children 50f46b771921
files hgext/censor.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/censor.py	Sun Sep 16 20:58:51 2018 +0530
+++ b/hgext/censor.py	Sat Sep 15 10:35:00 2018 +0900
@@ -85,9 +85,9 @@
     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,