changeset 40748:df8ed31a8ad8

store: write fncache only once if there are both adds and removes Differential Revision: https://phab.mercurial-scm.org/D5307
author Pulkit Goyal <pulkit@yandex-team.ru>
date Tue, 27 Nov 2018 16:16:13 +0300
parents 380a1f73830f
children ba706e3082bd
files mercurial/store.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/store.py	Tue Nov 20 17:44:24 2018 +0000
+++ b/mercurial/store.py	Tue Nov 27 16:16:13 2018 +0300
@@ -475,6 +475,8 @@
     def write(self, tr):
         if self._dirty:
             assert self.entries is not None
+            self.entries = self.entries | self.addls
+            self.addls = set()
             tr.addbackup('fncache')
             fp = self.vfs('fncache', mode='wb', atomictemp=True)
             if self.entries: