# HG changeset patch # User Christian Ebert # Date 1169087800 -3600 # Node ID 914455f5959a35fe35c4635aa9d1e7fa5bf967ae # Parent 94315baadcaf3b78d56153b99ac80201f116a954 Cycle filename patterns only once diff -r 94315baadcaf -r 914455f5959a hgkw/keyword.py --- a/hgkw/keyword.py Thu Jan 18 02:17:10 2007 +0100 +++ b/hgkw/keyword.py Thu Jan 18 03:36:40 2007 +0100 @@ -127,11 +127,15 @@ # get glob patterns to detect filenames # for inclusion in or exclusion from keyword substitution - inc = [pat for pat, opt in ui.configitems('keyword') if opt != 'ignore'] + inc, exc = [], [] + for pat, opt in ui.configitems('keyword'): + if opt != 'ignore': + inc.append(pat) + else: + exc.append(pat) if not inc: ui.warn(_('keyword: no filename globs for substitution\n')) return - exc = [pat for pat, opt in ui.configitems('keyword') if opt == 'ignore'] class kwrepo(repo.__class__):