[PATCH 2 of 4] repofilecache: directly use 'repo.vfs.join'

Pierre-Yves David pierre-yves.david at ens-lyon.org
Wed Mar 8 20:09:45 EST 2017


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
# Date 1470399921 -7200
#      Fri Aug 05 14:25:21 2016 +0200
# Node ID 2c6f8f2c745ba6ab4889d1cf8f277b0e7dfb179c
# Parent  88545f8d66bbbb5a665df67f77e1cc605bf387a2
# 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 2c6f8f2c745b
repofilecache: directly use 'repo.vfs.join'

The 'vfs' attribute already have all methods we need, the value of going
through the repository for this is low. so we removes it.

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -71,7 +71,7 @@ class repofilecache(scmutil.filecache):
     """
 
     def join(self, obj, fname):
-        return obj.join(fname)
+        return obj.vfs.join(fname)
     def __get__(self, repo, type=None):
         if repo is None:
             return self


More information about the Mercurial-devel mailing list