# HG changeset patch # User FUJIWARA Katsunori # Date 1365956535 -32400 # Node ID 2f05fa16231653494331fc79967d48a9d1db7b03 # Parent 9b82f93e3a7aa70d4c414c0d95c9dacff00528f8 localrepo: use "vfs.rename()" instead of "util.rename()" diff -r 9b82f93e3a7a -r 2f05fa162316 mercurial/localrepo.py --- a/mercurial/localrepo.py Mon Apr 15 01:22:15 2013 +0900 +++ b/mercurial/localrepo.py Mon Apr 15 01:22:15 2013 +0900 @@ -904,17 +904,15 @@ self.destroying() transaction.rollback(self.sopener, self.sjoin('undo'), ui.warn) if self.vfs.exists('undo.bookmarks'): - util.rename(self.join('undo.bookmarks'), - self.join('bookmarks')) + self.vfs.rename('undo.bookmarks', 'bookmarks') if self.svfs.exists('undo.phaseroots'): - util.rename(self.sjoin('undo.phaseroots'), - self.sjoin('phaseroots')) + self.svfs.rename('undo.phaseroots', 'phaseroots') self.invalidate() parentgone = (parents[0] not in self.changelog.nodemap or parents[1] not in self.changelog.nodemap) if parentgone: - util.rename(self.join('undo.dirstate'), self.join('dirstate')) + self.vfs.rename('undo.dirstate', 'dirstate') try: branch = self.opener.read('undo.branch') self.dirstate.setbranch(encoding.tolocal(branch)) diff -r 9b82f93e3a7a -r 2f05fa162316 mercurial/scmutil.py --- a/mercurial/scmutil.py Mon Apr 15 01:22:15 2013 +0900 +++ b/mercurial/scmutil.py Mon Apr 15 01:22:15 2013 +0900 @@ -254,6 +254,9 @@ def readdir(self, path=None, stat=None, skip=None): return osutil.listdir(self.join(path), stat, skip) + def rename(self, src, dst): + return util.rename(self.join(src), self.join(dst)) + def stat(self, path=None): return os.stat(self.join(path))