Mercurial > hg > mercurial-crew-with-dirclash
comparison mercurial/dirstate.py @ 1610:84e9b3484ff6
if hgignore contains errors, print message that is not confusing.
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Mon, 02 Jan 2006 15:48:16 -0800 |
parents | 34579a67fa71 |
children | ece5d785e87a |
comparison
equal
deleted
inserted
replaced
1609:c50bddfbc812 | 1610:84e9b3484ff6 |
---|---|
66 if line.startswith('syntax:'): | 66 if line.startswith('syntax:'): |
67 s = line[7:].strip() | 67 s = line[7:].strip() |
68 try: | 68 try: |
69 syntax = syntaxes[s] | 69 syntax = syntaxes[s] |
70 except KeyError: | 70 except KeyError: |
71 self.ui.warn(_("ignoring invalid syntax '%s'\n") % s) | 71 self.ui.warn(_(".hgignore: ignoring invalid " |
72 "syntax '%s'\n") % s) | |
72 continue | 73 continue |
73 pat = syntax + line | 74 pat = syntax + line |
74 for s in syntaxes.values(): | 75 for s in syntaxes.values(): |
75 if line.startswith(s): | 76 if line.startswith(s): |
76 pat = line | 77 pat = line |
86 return False | 87 return False |
87 if not self.ignorefunc: | 88 if not self.ignorefunc: |
88 ignore = self.hgignore() | 89 ignore = self.hgignore() |
89 if ignore: | 90 if ignore: |
90 files, self.ignorefunc, anypats = util.matcher(self.root, | 91 files, self.ignorefunc, anypats = util.matcher(self.root, |
91 inc=ignore) | 92 inc=ignore, |
93 src='.hgignore') | |
92 else: | 94 else: |
93 self.ignorefunc = util.never | 95 self.ignorefunc = util.never |
94 return self.ignorefunc(fn) | 96 return self.ignorefunc(fn) |
95 | 97 |
96 def __del__(self): | 98 def __del__(self): |