# HG changeset patch # User Pierre-Yves David # Date 2023-03-20 10:40:18 # Node ID cf6e1d5356029105d4b94c3d170cb213f7e08deb # Parent 6487737e0f009679aa334f4a4cebf7b0fe7286c8 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. diff --git a/mercurial/store.py b/mercurial/store.py --- a/mercurial/store.py +++ b/mercurial/store.py @@ -603,6 +603,7 @@ class fncache: # 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 @@ class fncache: 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: