hgkw/keyword.py
branchkwmap-templates
changeset 112 914455f5959a
parent 111 94315baadcaf
child 113 3412cbc77275
equal deleted inserted replaced
111:94315baadcaf 112:914455f5959a
   125     if not repo.local():
   125     if not repo.local():
   126         return
   126         return
   127 
   127 
   128     # get glob patterns to detect filenames
   128     # get glob patterns to detect filenames
   129     # for inclusion in or exclusion from keyword substitution
   129     # for inclusion in or exclusion from keyword substitution
   130     inc = [pat for pat, opt in ui.configitems('keyword') if opt != 'ignore']
   130     inc, exc = [], []
       
   131     for pat, opt in ui.configitems('keyword'):
       
   132         if opt != 'ignore':
       
   133             inc.append(pat)
       
   134         else:
       
   135             exc.append(pat)
   131     if not inc:
   136     if not inc:
   132         ui.warn(_('keyword: no filename globs for substitution\n'))
   137         ui.warn(_('keyword: no filename globs for substitution\n'))
   133         return
   138         return
   134     exc = [pat for pat, opt in ui.configitems('keyword') if opt == 'ignore']
       
   135 
   139 
   136 
   140 
   137     class kwrepo(repo.__class__):
   141     class kwrepo(repo.__class__):
   138         def file(self, f):
   142         def file(self, f):
   139             if f[0] == '/':
   143             if f[0] == '/':