Commits

André Sintzoff committed f5b0b14

util.atomictempfile: use close() instead of rename() (see hg 774da7121fc9)

  • Participants
  • Parent commits e0f9f9a

Comments (0)

Files changed (4)

tortoisehg/hgqt/chunks.py

                         for chunk in ctx._files[wfile]:
                             chunk.write(buf)
                 fp.write(buf.getvalue())
-                fp.rename()
+                fp.close()
             finally:
                 del fp
             ctx.invalidate()
                 for file in ctx._fileorder:
                     for chunk in ctx._files[file]:
                         chunk.write(fp)
-                fp.rename()
+                fp.close()
                 ctx.invalidate()
                 self.fileModified.emit()
                 return True
                         continue
                     for chunk in ctx._files[file]:
                         chunk.write(fp)
-                fp.rename()
+                fp.close()
             finally:
                 del fp
             ctx.invalidate()

tortoisehg/hgqt/hgignore.py

         try:
             f = util.atomictempfile(self.ignorefile, 'wb', createmode=None)
             f.write(out)
-            f.rename()
+            f.close()
             shlib.shell_notify([self.ignorefile])
             self.ignoreFilterUpdated.emit()
         except EnvironmentError, e:

tortoisehg/util/settings.py

         f = util.atomictempfile(appname, 'wb', None)
         f.write(s)
         try:
-            f.rename()
+            f.close()
         except OSError:
             pass # silently ignore these errors
 

tortoisehg/util/wconfig.py

         # normalize line endings
         for line in buf.getvalue().splitlines():
             f.write(line + '\n')
-        f.rename()
+        f.close()
     finally:
         del f  # unlink temp file