# HG changeset patch # User Alexis S. L. Carvalho # Date 1176103457 10800 # Node ID 1b9fc3f48861d00d867728768ef6162dc143f751 # Parent cea5ba038a1d7c24cae6f5e84e0d1a94acf71b2e use atomictemp files to write the dirstate diff -r cea5ba038a1d -r 1b9fc3f48861 mercurial/dirstate.py --- a/mercurial/dirstate.py Mon Apr 09 04:24:17 2007 -0300 +++ b/mercurial/dirstate.py Mon Apr 09 04:24:17 2007 -0300 @@ -315,7 +315,7 @@ def write(self): if not self.dirty: return - st = self.opener("dirstate", "w", atomic=True) + st = self.opener("dirstate", "w", atomictemp=True) st.write("".join(self.pl)) for f, e in self.map.items(): c = self.copied(f) @@ -323,6 +323,7 @@ f = f + "\0" + c e = struct.pack(self.format, e[0], e[1], e[2], e[3], len(f)) st.write(e + f) + st.rename() self.dirty = 0 def filterfiles(self, files):