changeset 18950:647e3b0c8751

localrepo: use "vfs.readlink()" instead of "os.readlink()"
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Mon, 15 Apr 2013 01:22:15 +0900
parents 138978f20180
children d13916a00b7e
files mercurial/localrepo.py mercurial/scmutil.py
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/localrepo.py	Mon Apr 15 01:22:15 2013 +0900
+++ b/mercurial/localrepo.py	Mon Apr 15 01:22:15 2013 +0900
@@ -783,7 +783,7 @@
 
     def wread(self, filename):
         if self._link(filename):
-            data = os.readlink(self.wjoin(filename))
+            data = self.wvfs.readlink(filename)
         else:
             data = self.wopener.read(filename)
         return self._filter(self._encodefilterpats, filename, data)
--- a/mercurial/scmutil.py	Mon Apr 15 01:22:15 2013 +0900
+++ b/mercurial/scmutil.py	Mon Apr 15 01:22:15 2013 +0900
@@ -260,6 +260,9 @@
     def rename(self, src, dst):
         return util.rename(self.join(src), self.join(dst))
 
+    def readlink(self, path):
+        return os.readlink(self.join(path))
+
     def stat(self, path=None):
         return os.stat(self.join(path))