equal
deleted
inserted
replaced
601 class fncache: |
601 class fncache: |
602 # the filename used to be partially encoded |
602 # the filename used to be partially encoded |
603 # hence the encodedir/decodedir dance |
603 # hence the encodedir/decodedir dance |
604 def __init__(self, vfs): |
604 def __init__(self, vfs): |
605 self.vfs = vfs |
605 self.vfs = vfs |
|
606 self._ignores = set() |
606 self.entries = None |
607 self.entries = None |
607 self._dirty = False |
608 self._dirty = False |
608 # set of new additions to fncache |
609 # set of new additions to fncache |
609 self.addls = set() |
610 self.addls = set() |
610 |
611 |
685 fp.write(encodedir(b'\n'.join(self.addls) + b'\n')) |
686 fp.write(encodedir(b'\n'.join(self.addls) + b'\n')) |
686 fp.close() |
687 fp.close() |
687 self.entries = None |
688 self.entries = None |
688 self.addls = set() |
689 self.addls = set() |
689 |
690 |
|
691 def addignore(self, fn): |
|
692 self._ignores.add(fn) |
|
693 |
690 def add(self, fn): |
694 def add(self, fn): |
|
695 if fn in self._ignores: |
|
696 return |
691 if self.entries is None: |
697 if self.entries is None: |
692 self._load() |
698 self._load() |
693 if fn not in self.entries: |
699 if fn not in self.entries: |
694 self.addls.add(fn) |
700 self.addls.add(fn) |
695 |
701 |