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

login
register
mail settings
Submitter Katsunori FUJIWARA
Date April 14, 2013, 5:23 p.m.
Message ID <10782d6f217470883e8e.1365960194@feefifofum>
Download mbox | patch
Permalink /patch/1297/
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 10782d6f217470883e8e0e61191b45465b066053
# Parent  377ae29bfbc64406fff3a6b8d2cb9a1b4efcfd70
localrepo: use "vfs.islink()" instead of "os.path.islink()"

Patch

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)