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

login
register
mail settings
Submitter Pierre-Yves David
Date March 9, 2017, 1:09 a.m.
Message ID <2c6f8f2c745ba6ab4889.1489021785@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/19046/
State Accepted
Headers show

Comments

Pierre-Yves David - March 9, 2017, 1:09 a.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@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.

Patch

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