comparison hgext/censor.py @ 39661: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 a658f97c1ce4
children a6b3c4c1019f
comparison
equal deleted inserted replaced
39660:a12916cfef9e 39661:8bfbb25859f1
83 raise error.Abort(_('file does not exist at revision %s') % rev) 83 raise error.Abort(_('file does not exist at revision %s') % rev)
84 84
85 fnode = fctx.filenode() 85 fnode = fctx.filenode()
86 heads = [] 86 heads = []
87 for headnode in repo.heads(): 87 for headnode in repo.heads():
88 c = repo[headnode] 88 hc = repo[headnode]
89 if path in c and c.filenode(path) == fnode: 89 if path in hc and hc.filenode(path) == fnode:
90 heads.append(c) 90 heads.append(hc)
91 if heads: 91 if heads:
92 headlist = ', '.join([short(c.node()) for c in heads]) 92 headlist = ', '.join([short(c.node()) for c in heads])
93 raise error.Abort(_('cannot censor file in heads (%s)') % headlist, 93 raise error.Abort(_('cannot censor file in heads (%s)') % headlist,
94 hint=_('clean/delete and commit first')) 94 hint=_('clean/delete and commit first'))
95 95