Mercurial > hg > mercurial-crew-with-dirclash
comparison mercurial/util.py @ 2308:cb520d961d6a
Use platform path for renaming file in util.atomictempfile.rename()
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Thu, 18 May 2006 21:01:38 +0200 |
parents | d6392a7c03dd |
children | e9b5749e4de3 |
comparison
equal
deleted
inserted
replaced
2307:5b3a3e35f084 | 2308:cb520d961d6a |
---|---|
732 self.temp = mktempcopy(name) | 732 self.temp = mktempcopy(name) |
733 posixfile.__init__(self, self.temp, mode) | 733 posixfile.__init__(self, self.temp, mode) |
734 def rename(self): | 734 def rename(self): |
735 if not self.closed: | 735 if not self.closed: |
736 posixfile.close(self) | 736 posixfile.close(self) |
737 rename(self.temp, self.__name) | 737 rename(self.temp, localpath(self.__name)) |
738 def __del__(self): | 738 def __del__(self): |
739 if not self.closed: | 739 if not self.closed: |
740 try: | 740 try: |
741 os.unlink(self.temp) | 741 os.unlink(self.temp) |
742 except: pass | 742 except: pass |