# HG changeset patch # User Pierre-Yves David # Date 1679308818 -3600 # 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 -r 6487737e0f00 -r cf6e1d535602 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: