--- a/hgkw/keyword.py Mon Jan 08 18:32:46 2007 +0100
+++ b/hgkw/keyword.py Tue Jan 09 16:17:30 2007 +0100
@@ -68,11 +68,10 @@
if not files:
return []
candidates = []
- fmatchers = [util.matcher(repo.root, '', [pat], [], [])[1]
- for pat, opt in ui.configitems('keyword')
- if opt == 'expand']
+ kwfmatchers = [util.matcher(repo.root, '', [pat], [], [])[1]
+ for pat, opt in ui.configitems('keyword') if opt == 'expand']
for f in files:
- for mf in fmatchers:
+ for mf in kwfmatchers:
if mf(f):
candidates.append(f)
break
@@ -159,8 +158,7 @@
data = repo.wfile(f).read()
if not util.binary(data):
data, kwct = re_kw.subn(lambda m:
- kwexpand(m, repo, f, changeid=args['node']),
- data)
+ kwexpand(m, repo, f, changeid=args['node']), data)
if kwct:
ui.debug(_('overwriting %s expanding keywords\n' % f))
repo.wfile(f, 'w').write(data)