equal
deleted
inserted
replaced
58 syntax = syntaxes[s] |
58 syntax = syntaxes[s] |
59 except KeyError: |
59 except KeyError: |
60 warn(_("%s: ignoring invalid syntax '%s'\n") % (f, s)) |
60 warn(_("%s: ignoring invalid syntax '%s'\n") % (f, s)) |
61 continue |
61 continue |
62 pat = syntax + line |
62 pat = syntax + line |
63 for s, rels in syntaxes.items(): |
63 for s, rels in syntaxes.iteritems(): |
64 if line.startswith(rels): |
64 if line.startswith(rels): |
65 pat = line |
65 pat = line |
66 break |
66 break |
67 elif line.startswith(s+':'): |
67 elif line.startswith(s+':'): |
68 pat = rels + line[len(s)+1:] |
68 pat = rels + line[len(s)+1:] |
81 try: |
81 try: |
82 files, ignorefunc, anypats = ( |
82 files, ignorefunc, anypats = ( |
83 util.matcher(root, inc=allpats, src='.hgignore')) |
83 util.matcher(root, inc=allpats, src='.hgignore')) |
84 except util.Abort: |
84 except util.Abort: |
85 # Re-raise an exception where the src is the right file |
85 # Re-raise an exception where the src is the right file |
86 for f, patlist in pats.items(): |
86 for f, patlist in pats.iteritems(): |
87 files, ignorefunc, anypats = ( |
87 files, ignorefunc, anypats = ( |
88 util.matcher(root, inc=patlist, src=f)) |
88 util.matcher(root, inc=patlist, src=f)) |
89 |
89 |
90 return ignorefunc |
90 return ignorefunc |