changelog: use "vfs.rename()" instead of "util.rename()"
authorFUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Tue, 15 Oct 2013 00:51:04 +0900
changeset 19898 3f92e749d381
parent 19897 896a4568def7
child 19899 8c3dcbbfb5de
changelog: use "vfs.rename()" instead of "util.rename()"
mercurial/changelog.py
--- a/mercurial/changelog.py	Tue Oct 15 00:51:04 2013 +0900
+++ b/mercurial/changelog.py	Tue Oct 15 00:51:04 2013 +0900
@@ -224,10 +224,10 @@
         self.opener = self._realopener
         # move redirected index data back into place
         if self._divert:
-            nfile = self.opener(self.indexfile + ".a")
-            n = nfile.name
+            tmpname = self.indexfile + ".a"
+            nfile = self.opener.open(tmpname)
             nfile.close()
-            util.rename(n, n[:-2])
+            self.opener.rename(tmpname, self.indexfile)
         elif self._delaybuf:
             fp = self.opener(self.indexfile, 'a')
             fp.write("".join(self._delaybuf))