comparison hgext/keyword.py @ 8566:744d6322b05b

match: change all users of util.matcher to match.match
author Matt Mackall <mpm@selenic.com>
date Sun, 24 May 2009 02:56:14 -0500
parents 223000a687b0
children fea40a677d43
comparison
equal deleted inserted replaced
8565:268d16b2ec25 8566:744d6322b05b
79 like CVS' $Log$, are not supported. A keyword template map 79 like CVS' $Log$, are not supported. A keyword template map
80 "Log = {desc}" expands to the first line of the changeset description. 80 "Log = {desc}" expands to the first line of the changeset description.
81 ''' 81 '''
82 82
83 from mercurial import commands, cmdutil, dispatch, filelog, revlog, extensions 83 from mercurial import commands, cmdutil, dispatch, filelog, revlog, extensions
84 from mercurial import patch, localrepo, templater, templatefilters, util 84 from mercurial import patch, localrepo, templater, templatefilters, util, match
85 from mercurial.hgweb import webcommands 85 from mercurial.hgweb import webcommands
86 from mercurial.lock import release 86 from mercurial.lock import release
87 from mercurial.node import nullid, hex 87 from mercurial.node import nullid, hex
88 from mercurial.i18n import _ 88 from mercurial.i18n import _
89 import re, shutil, tempfile, time 89 import re, shutil, tempfile, time
123 } 123 }
124 124
125 def __init__(self, ui, repo): 125 def __init__(self, ui, repo):
126 self.ui = ui 126 self.ui = ui
127 self.repo = repo 127 self.repo = repo
128 self.matcher = util.matcher(repo.root, 128 self.matcher = match.match(repo.root, '', [],
129 inc=kwtools['inc'], exc=kwtools['exc'])[1] 129 kwtools['inc'], kwtools['exc'], 'glob')
130 self.restrict = kwtools['hgcmd'] in restricted.split() 130 self.restrict = kwtools['hgcmd'] in restricted.split()
131 131
132 kwmaps = self.ui.configitems('keywordmaps') 132 kwmaps = self.ui.configitems('keywordmaps')
133 if kwmaps: # override default templates 133 if kwmaps: # override default templates
134 kwmaps = [(k, templater.parsestring(v, False)) 134 kwmaps = [(k, templater.parsestring(v, False))