equal
deleted
inserted
replaced
502 bigpat = [] |
502 bigpat = [] |
503 try: |
503 try: |
504 l = file(self.wjoin(".hgignore")) |
504 l = file(self.wjoin(".hgignore")) |
505 for pat in l: |
505 for pat in l: |
506 if pat != "\n": |
506 if pat != "\n": |
507 bigpat.append(util.pconvert(pat[:-1])) |
507 p = util.pconvert(pat[:-1]) |
|
508 try: |
|
509 r = re.compile(p) |
|
510 except: |
|
511 self.ui.warn("ignoring invalid ignore" |
|
512 + " regular expression '%s'\n" % p) |
|
513 else: |
|
514 bigpat.append(util.pconvert(pat[:-1])) |
508 except IOError: pass |
515 except IOError: pass |
509 if bigpat: |
516 if bigpat: |
510 s = "(?:%s)" % (")|(?:".join(bigpat)) |
517 s = "(?:%s)" % (")|(?:".join(bigpat)) |
511 r = re.compile(s) |
518 r = re.compile(s) |
512 self.ignorefunc = r.search |
519 self.ignorefunc = r.search |