fncache: make it possible to ignore some file stable
authorPierre-Yves David <pierre-yves.david@octobus.net>
Mon, 20 Mar 2023 11:40:18 +0100
branchstable
changeset 50315 cf6e1d535602
parent 50314 6487737e0f00
child 50316 87f0155d68aa
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.
mercurial/store.py
--- 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: