[PATCH 5 of 8] localrepo: use "vfs.islink()" instead of "os.path.islink()"

FUJIWARA Katsunori foozy at lares.dti.ne.jp
Sun Apr 14 12:23:14 CDT 2013


# HG changeset patch
# User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
# Date 1365956535 -32400
# Node ID 10782d6f217470883e8e0e61191b45465b066053
# Parent  377ae29bfbc64406fff3a6b8d2cb9a1b4efcfd70
localrepo: use "vfs.islink()" instead of "os.path.islink()"

diff -r 377ae29bfbc6 -r 10782d6f2174 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
@@ -735,7 +735,7 @@
         return self.wopener(f, mode)
 
     def _link(self, f):
-        return os.path.islink(self.wjoin(f))
+        return self.wvfs.islink(f)
 
     def _loadfilter(self, filter):
         if filter not in self.filterpats:
diff -r 377ae29bfbc6 -r 10782d6f2174 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
@@ -242,6 +242,9 @@
     def isdir(self, path=None):
         return os.path.isdir(self.join(path))
 
+    def islink(self, path=None):
+        return os.path.islink(self.join(path))
+
     def makedir(self, path=None, notindexed=True):
         return util.makedir(self.join(path), notindexed)
 


More information about the Mercurial-devel mailing list