Mercurial > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
8565:268d16b2ec25 | 8566:744d6322b05b |
---|---|
4 # | 4 # |
5 # This software may be used and distributed according to the terms of the | 5 # This software may be used and distributed according to the terms of the |
6 # GNU General Public License version 2, incorporated herein by reference. | 6 # GNU General Public License version 2, incorporated herein by reference. |
7 | 7 |
8 from i18n import _ | 8 from i18n import _ |
9 import util | 9 import util, match |
10 import re | 10 import re |
11 | 11 |
12 _commentre = None | 12 _commentre = None |
13 | 13 |
14 def _parselines(fp): | 14 def _parselines(fp): |
78 [allpats.extend(patlist) for patlist in pats.values()] | 78 [allpats.extend(patlist) for patlist in pats.values()] |
79 if not allpats: | 79 if not allpats: |
80 return util.never | 80 return util.never |
81 | 81 |
82 try: | 82 try: |
83 files, ignorefunc, anypats = ( | 83 ignorefunc = match.match(root, '', [], allpats, [], 'glob') |
84 util.matcher(root, inc=allpats, src='.hgignore')) | |
85 except util.Abort: | 84 except util.Abort: |
86 # Re-raise an exception where the src is the right file | 85 # Re-raise an exception where the src is the right file |
87 for f, patlist in pats.iteritems(): | 86 for f, patlist in pats.iteritems(): |
88 files, ignorefunc, anypats = ( | 87 try: |
89 util.matcher(root, inc=patlist, src=f)) | 88 match.match(root, '', [], patlist, [], 'glob') |
89 except util.Abort, inst: | |
90 raise util.Abort('%s: %s' % (f, inst[0])) | |
90 | 91 |
91 return ignorefunc | 92 return ignorefunc |