changeset 19898:3f92e749d381

changelog: use "vfs.rename()" instead of "util.rename()"
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Tue, 15 Oct 2013 00:51:04 +0900
parents 896a4568def7
children 8c3dcbbfb5de
files mercurial/changelog.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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))