Patchwork [1,of,2] localrepo: use self.wvfs.islink directly

login
register
mail settings
Submitter Pierre-Yves David
Date March 15, 2017, 3:25 p.m.
Message ID <91ac4c04240637400bb3.1489591515@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/19364/
State Accepted
Headers show

Comments

Pierre-Yves David - March 15, 2017, 3:25 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@ens-lyon.org>
# Date 1470399571 -7200
#      Fri Aug 05 14:19:31 2016 +0200
# Node ID 91ac4c04240637400bb3f172fc80ff011acfcfb7
# Parent  fb1b5cd17664218f73ed6ba604973b817932593e
# EXP-Topic vfs.cleanup
# Available At https://www.mercurial-scm.org/repo/users/marmoute/mercurial/
#              hg pull https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ -r 91ac4c042406
localrepo: use self.wvfs.islink directly

We are about to deprecate the helper function.

Patch

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -1028,7 +1028,7 @@  class localrepository(object):
         self._datafilters[name] = filter
 
     def wread(self, filename):
-        if self._link(filename):
+        if self.wvfs.islink(filename):
             data = self.wvfs.readlink(filename)
         else:
             data = self.wvfs.read(filename)