##// END OF EJS Templates
localrepo: refactor filter computation...
Nicolas Dumazet -
r11698:9df481f8 default
parent child Browse files
Show More
@@ -510,7 +510,7 b' class localrepository(repo.repository):'
510 def _link(self, f):
510 def _link(self, f):
511 return os.path.islink(self.wjoin(f))
511 return os.path.islink(self.wjoin(f))
512
512
513 def _filter(self, filter, filename, data):
513 def _loadfilter(self, filter):
514 if filter not in self.filterpats:
514 if filter not in self.filterpats:
515 l = []
515 l = []
516 for pat, cmd in self.ui.configitems(filter):
516 for pat, cmd in self.ui.configitems(filter):
@@ -533,6 +533,9 b' class localrepository(repo.repository):'
533 l.append((mf, fn, params))
533 l.append((mf, fn, params))
534 self.filterpats[filter] = l
534 self.filterpats[filter] = l
535
535
536 def _filter(self, filter, filename, data):
537 self._loadfilter(filter)
538
536 for mf, fn, cmd in self.filterpats[filter]:
539 for mf, fn, cmd in self.filterpats[filter]:
537 if mf(filename):
540 if mf(filename):
538 self.ui.debug("filtering %s through %s\n" % (filename, cmd))
541 self.ui.debug("filtering %s through %s\n" % (filename, cmd))
General Comments 0
You need to be logged in to leave comments. Login now