> @@ -479,32 +481,45 @@ > fp.write(encodedir('\n'.join(self.entries) + '\n')) > fp.close() > self._dirty = False > + if self.addls: > + # if we have just new entries, let's append them to the fncache > + tr.addbackup('fncache') > + fp = self.vfs('fncache', mode='ab', atomictemp=True) > + if self.addls: > + fp.write(encodedir('\n'.join(self.addls) + '\n')) > + fp.close() > + self.entries = None > + self.addls = set()
It's probably better to write `entries | addls` at once if there are both adds and removes. Appending to an `atomictemp` file means the entire file is copied first. _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel