Patchwork [6,of,8] localrepo: use "vfs.readlink()" instead of "os.readlink()"

login
register
mail settings
Submitter Katsunori FUJIWARA
Date April 14, 2013, 5:23 p.m.
Message ID <c21cbff6ccec91f9b350.1365960195@feefifofum>
Download mbox | patch
Permalink /patch/1303/
State Accepted, archived
Headers show

Comments

Katsunori FUJIWARA - April 14, 2013, 5:23 p.m.
# HG changeset patch
# User FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
# Date 1365956535 -32400
# Node ID c21cbff6ccec91f9b3508c7cc1ff852189c003ec
# Parent  10782d6f217470883e8e0e61191b45465b066053
localrepo: use "vfs.readlink()" instead of "os.readlink()"

Patch

diff -r 10782d6f2174 -r c21cbff6ccec 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
@@ -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)
diff -r 10782d6f2174 -r c21cbff6ccec 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
@@ -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))