Commits

André Sintzoff committed f5b0b14

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

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
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.