[Updated] D10573: filelog: drop `indexfile` from `filelog`

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Tue May 11 16:49:16 UTC 2021


Closed by commit rHG8a1a51d31e85: filelog: drop `indexfile` from `filelog` (authored by marmoute).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D10573?vs=27488&id=27819

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D10573/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D10573

AFFECTED FILES
  mercurial/bundlerepo.py
  mercurial/filelog.py
  mercurial/unionrepo.py

CHANGE DETAILS

diff --git a/mercurial/unionrepo.py b/mercurial/unionrepo.py
--- a/mercurial/unionrepo.py
+++ b/mercurial/unionrepo.py
@@ -183,7 +183,7 @@
         filelog.filelog.__init__(self, opener, path)
         filelog2 = filelog.filelog(opener2, path)
         self._revlog = unionrevlog(
-            opener, self.indexfile, filelog2._revlog, linkmapper
+            opener, self._revlog.indexfile, filelog2._revlog, linkmapper
         )
         self._repo = repo
         self.repotiprev = self._revlog.repotiprev
diff --git a/mercurial/filelog.py b/mercurial/filelog.py
--- a/mercurial/filelog.py
+++ b/mercurial/filelog.py
@@ -228,18 +228,6 @@
             storedsize=storedsize,
         )
 
-    # TODO these aren't part of the interface and aren't internal methods.
-    # Callers should be fixed to not use them.
-
-    # Used by bundlefilelog, unionfilelog.
-    @property
-    def indexfile(self):
-        return self._revlog.indexfile
-
-    @indexfile.setter
-    def indexfile(self, value):
-        self._revlog.indexfile = value
-
     # Used by repo upgrade.
     def clone(self, tr, destrevlog, **kwargs):
         if not isinstance(destrevlog, filelog):
diff --git a/mercurial/bundlerepo.py b/mercurial/bundlerepo.py
--- a/mercurial/bundlerepo.py
+++ b/mercurial/bundlerepo.py
@@ -233,7 +233,7 @@
             opener,
             # XXX should use the unencoded path
             target=(revlog_constants.KIND_FILELOG, path),
-            indexfile=self.indexfile,
+            indexfile=self._revlog.indexfile,
             cgunpacker=cgunpacker,
             linkmapper=linkmapper,
         )



To: marmoute, #hg-reviewers, Alphare
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210511/b2771918/attachment-0002.html>


More information about the Mercurial-patches mailing list