# HG changeset patch # User FUJIWARA Katsunori # Date 2013-04-14 16:22:15 # Node ID 138978f2018094a9b51f1c536722dcddc844da06 # Parent 2f05fa16231653494331fc79967d48a9d1db7b03 localrepo: use "vfs.islink()" instead of "os.path.islink()" diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -735,7 +735,7 @@ class localrepository(object): 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 --git a/mercurial/scmutil.py b/mercurial/scmutil.py --- a/mercurial/scmutil.py +++ b/mercurial/scmutil.py @@ -242,6 +242,9 @@ class abstractvfs(object): 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)