changeset 1547:487e256ad545

close file before renaming it (since it doesn't work the other way on windows)
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Mon, 14 Nov 2005 21:47:07 +0100
parents d69070c2547a
children 4dea10839201
files mercurial/util.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/util.py	Mon Nov 14 16:10:59 2005 +0100
+++ b/mercurial/util.py	Mon Nov 14 21:47:07 2005 +0100
@@ -388,8 +388,8 @@
             file.__init__(self, self.temp, mode)
         def close(self):
             if not self.closed:
+                file.close(self)
                 rename(self.temp, self.__name)
-            file.close(self)
         def __del__(self):
             self.close()