Show More
@@ -65,9 +65,10 class dirstate(object): | |||
|
65 | 65 | repoignore = self.wjoin('.hgignore') |
|
66 | 66 | files = [repoignore] |
|
67 | 67 | files.extend(self.ui.hgignorefiles()) |
|
68 |
pats = |
|
|
68 | pats = {} | |
|
69 | 69 | for f in files: |
|
70 | 70 | try: |
|
71 | pats[f] = [] | |
|
71 | 72 | fp = open(f) |
|
72 | 73 | syntax = 'relre:' |
|
73 | 74 | for line in parselines(fp): |
@@ -84,7 +85,7 class dirstate(object): | |||
|
84 | 85 | if line.startswith(s): |
|
85 | 86 | pat = line |
|
86 | 87 | break |
|
87 | pats.append(pat) | |
|
88 | pats[f].append(pat) | |
|
88 | 89 | except IOError: |
|
89 | 90 | if f != repoignore: |
|
90 | 91 | self.ui.warn(_("ignore file %s not found\n") % f) |
@@ -99,13 +100,16 class dirstate(object): | |||
|
99 | 100 | if not self.ignorefunc: |
|
100 | 101 | ignore = self.hgignore() |
|
101 | 102 | if ignore: |
|
102 | # FIXME: if there are errors in patterns, matcher will | |
|
103 | # print out an error containing src ('.hgignore'); | |
|
104 | # really, we want the original source file to be | |
|
105 | # printed instead. | |
|
106 | files, self.ignorefunc, anypats = util.matcher(self.root, | |
|
107 | inc=ignore, | |
|
108 | src='.hgignore') | |
|
103 | try: | |
|
104 | allpats = [] | |
|
105 | [allpats.extend(patlist) for patlist in ignore.values()] | |
|
106 | files, self.ignorefunc, anypats = ( | |
|
107 | util.matcher(self.root, inc=allpats, src='.hgignore')) | |
|
108 | except util.Abort: | |
|
109 | # Re-raise an exception where the src is the right file | |
|
110 | for f, patlist in ignore.items(): | |
|
111 | files, self.ignorefunc, anypats = ( | |
|
112 | util.matcher(self.root, inc=patlist, src=f)) | |
|
109 | 113 | else: |
|
110 | 114 | self.ignorefunc = util.never |
|
111 | 115 | return self.ignorefunc(fn) |
General Comments 0
You need to be logged in to leave comments.
Login now