store: write fncache only once if there are both adds and removes
authorPulkit Goyal <pulkit@yandex-team.ru>
Tue, 27 Nov 2018 16:16:13 +0300
changeset 40748 df8ed31a8ad8
parent 40747 380a1f73830f
child 40749 ba706e3082bd
store: write fncache only once if there are both adds and removes Differential Revision: https://phab.mercurial-scm.org/D5307
mercurial/store.py
--- 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: