##// END OF EJS Templates
use atomictemp files to write the dirstate
Alexis S. L. Carvalho -
r4330:1b9fc3f4 default
parent child Browse files
Show More
@@ -315,7 +315,7 b' class dirstate(object):'
315 315 def write(self):
316 316 if not self.dirty:
317 317 return
318 st = self.opener("dirstate", "w", atomic=True)
318 st = self.opener("dirstate", "w", atomictemp=True)
319 319 st.write("".join(self.pl))
320 320 for f, e in self.map.items():
321 321 c = self.copied(f)
@@ -323,6 +323,7 b' class dirstate(object):'
323 323 f = f + "\0" + c
324 324 e = struct.pack(self.format, e[0], e[1], e[2], e[3], len(f))
325 325 st.write(e + f)
326 st.rename()
326 327 self.dirty = 0
327 328
328 329 def filterfiles(self, files):
General Comments 0
You need to be logged in to leave comments. Login now