mercurial/hg.py
changeset 735 3433b228bbb3
parent 730 d2dc7663d512
child 737 8db4d406b3d3
equal deleted inserted replaced
734:d4e161d60f61 735:3433b228bbb3
   297                                          + " regular expression '%s'\n" % p)
   297                                          + " regular expression '%s'\n" % p)
   298                         else:
   298                         else:
   299                             bigpat.append(util.pconvert(pat[:-1]))
   299                             bigpat.append(util.pconvert(pat[:-1]))
   300             except IOError: pass
   300             except IOError: pass
   301 
   301 
   302             s = "(?:%s)" % (")|(?:".join(bigpat))
   302             if bigpat:
   303             r = re.compile(s)
   303                 s = "(?:%s)" % (")|(?:".join(bigpat))
   304             self.ignorefunc = r.search
   304                 r = re.compile(s)
       
   305                 self.ignorefunc = r.search
       
   306             else:
       
   307                 self.ignorefunc = util.never
   305 
   308 
   306         return self.ignorefunc(f)
   309         return self.ignorefunc(f)
   307 
   310 
   308     def __del__(self):
   311     def __del__(self):
   309         if self.dirty:
   312         if self.dirty: