[PATCH 4 of 9] changelog: use "vfs.rename()" instead of "util.rename()"
FUJIWARA Katsunori
foozy at lares.dti.ne.jp
Mon Oct 14 16:16:04 UTC 2013
# HG changeset patch
# User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
# Date 1381765864 -32400
# Tue Oct 15 00:51:04 2013 +0900
# Node ID 2be31b7a1e81f9b6ce8f20c1fd221e1eea3117a7
# Parent 2e396a54482df124d5d4cb58be2398a143edefe7
changelog: use "vfs.rename()" instead of "util.rename()"
diff --git a/mercurial/changelog.py b/mercurial/changelog.py
--- a/mercurial/changelog.py
+++ b/mercurial/changelog.py
@@ -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))
More information about the Mercurial-devel
mailing list