Mercurial > hg-stable
changeset 50315:cf6e1d535602 stable
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.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 20 Mar 2023 11:40:18 +0100 |
parents | 6487737e0f00 |
children | 87f0155d68aa |
files | mercurial/store.py |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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: