# HG changeset patch # User Benoit Boissinot # Date 1132001227 -3600 # Node ID 487e256ad545f16091ff5e6f0476045deb5e44f6 # Parent d69070c2547a57b83c6ddc4ea725f5ae152152f8 close file before renaming it (since it doesn't work the other way on windows) diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -388,8 +388,8 @@ def opener(base): 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()