fncache: make it possible to ignore some file
In the next changeset, we need to able to ignore some temporary file. This
changeset teach the fncache about that.
--- a/mercurial/store.py Mon Mar 20 11:09:03 2023 +0100
+++ b/mercurial/store.py Mon Mar 20 11:40:18 2023 +0100
@@ -603,6 +603,7 @@
# hence the encodedir/decodedir dance
def __init__(self, vfs):
self.vfs = vfs
+ self._ignores = set()
self.entries = None
self._dirty = False
# set of new additions to fncache
@@ -687,7 +688,12 @@
self.entries = None
self.addls = set()
+ def addignore(self, fn):
+ self._ignores.add(fn)
+
def add(self, fn):
+ if fn in self._ignores:
+ return
if self.entries is None:
self._load()
if fn not in self.entries: