[PATCH] keyword: do not shadow builtin format (detected by pychecker)
Christian Ebert
blacktrash at gmx.net
Tue Nov 25 09:32:45 CST 2008
# HG changeset patch
# User Christian Ebert <blacktrash at gmx.net>
# Date 1227627040 -3600
# Node ID 5692c75ef8cd2306c59b1dd0d0f178b9ffe940cf
# Parent 07cb58b8c843f09fc32ee1da2974fb52d057a146
keyword: do not shadow builtin format (detected by pychecker)
diff --git a/hgext/keyword.py b/hgext/keyword.py
--- a/hgext/keyword.py
+++ b/hgext/keyword.py
@@ -348,8 +348,8 @@
ui.note(_('unhooked all commit hooks\n'))
ui.note('hg -R "%s" ci -m "%s"\n' % (tmpdir, msg))
repo.commit(text=msg)
- format = ui.verbose and ' in %s' % path or ''
- demostatus('%s keywords expanded%s' % (kwstatus, format))
+ fmt = ui.verbose and ' in %s' % path or ''
+ demostatus('%s keywords expanded%s' % (kwstatus, fmt))
ui.write(repo.wread(fn))
ui.debug(_('\nremoving temporary repo %s\n') % tmpdir)
shutil.rmtree(tmpdir, ignore_errors=True)
@@ -382,9 +382,9 @@
if opts.get('all') or opts.get('ignore'):
kwfstats += (('I', [f for f in files if f not in kwfiles]),)
for char, filenames in kwfstats:
- format = (opts.get('all') or ui.verbose) and '%s %%s\n' % char or '%s\n'
+ fmt = (opts.get('all') or ui.verbose) and '%s %%s\n' % char or '%s\n'
for f in filenames:
- ui.write(format % repo.pathto(f, cwd))
+ ui.write(fmt % repo.pathto(f, cwd))
def shrink(ui, repo, *pats, **opts):
'''revert expanded keywords in working directory
More information about the Mercurial-devel
mailing list