Patchwork [1,of,4] repofilecache: define a 'join' method

login
register
mail settings
Submitter Pierre-Yves David
Date March 9, 2017, 1:09 a.m.
Message ID <88545f8d66bbbb5a665d.1489021784@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/19045/
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 1470399838 -7200
#      Fri Aug 05 14:23:58 2016 +0200
# Node ID 88545f8d66bbbb5a665df67f77e1cc605bf387a2
# Parent  1871a1ee64ed49172b1568b89cdbab126284b309
# 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 88545f8d66bb
repofilecache: define a 'join' method

We are about to turn the 'join' method of the base class Abstract, so we need
on to be defined in the localrepo. The ultimate goal here is to be able to stop
relying for the 'localrepo' class to have a 'join' methods (there is above one
hundred methods on 'localrepo'. This change make te 'repo' file cache have its
own code so that we can prepare this change to the repostory class.


explicite join

Patch

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -70,6 +70,8 @@  class repofilecache(scmutil.filecache):
     """All filecache usage on repo are done for logic that should be unfiltered
     """
 
+    def join(self, obj, fname):
+        return obj.join(fname)
     def __get__(self, repo, type=None):
         if repo is None:
             return self