diff mercurial/ignore.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 b87a50b7125c
children fea40a677d43
line wrap: on
line diff
--- a/mercurial/ignore.py	Sat May 23 17:04:41 2009 +0200
+++ b/mercurial/ignore.py	Sun May 24 02:56:14 2009 -0500
@@ -6,7 +6,7 @@
 # GNU General Public License version 2, incorporated herein by reference.
 
 from i18n import _
-import util
+import util, match
 import re
 
 _commentre = None
@@ -80,12 +80,13 @@
         return util.never
 
     try:
-        files, ignorefunc, anypats = (
-            util.matcher(root, inc=allpats, src='.hgignore'))
+        ignorefunc = match.match(root, '', [], allpats, [], 'glob')
     except util.Abort:
         # Re-raise an exception where the src is the right file
         for f, patlist in pats.iteritems():
-            files, ignorefunc, anypats = (
-                util.matcher(root, inc=patlist, src=f))
+            try:
+                match.match(root, '', [], patlist, [], 'glob')
+            except util.Abort, inst:
+                raise util.Abort('%s: %s' % (f, inst[0]))
 
     return ignorefunc