Patchwork D10561: revlog: explicitely pass the "indexfile" parameter

login
register
mail settings
Submitter phabricator
Date May 3, 2021, 11:47 a.m.
Message ID <differential-rev-PHID-DREV-bn7sf5p777bhxov4ke7t-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48880/
State New
Headers show

Comments

phabricator - May 3, 2021, 11:47 a.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  Most of this was already done when introducing the `target` parameter, but some
  remained. Having "indexfile" passed explicitely will help us to change the way
  we address a revlog later in the stack. With the introduction of more generic
  `docket`, the entry point will not necessarly be `xxx.i` file, and the actual
  index files will have a variable name.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  hgext/remotefilelog/contentstore.py

CHANGE DETAILS




To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/hgext/remotefilelog/contentstore.py b/hgext/remotefilelog/contentstore.py
--- a/hgext/remotefilelog/contentstore.py
+++ b/hgext/remotefilelog/contentstore.py
@@ -281,7 +281,7 @@ 
         self._store = repo.store
         self._svfs = repo.svfs
         self._revlogs = dict()
-        self._cl = revlog.revlog(self._svfs, b'00changelog.i')
+        self._cl = revlog.revlog(self._svfs, indexfile=b'00changelog.i')
         self._repackstartlinkrev = 0
 
     def get(self, name, node):
@@ -344,7 +344,7 @@ 
             revlogname = b'00manifesttree.i'
             if name != b'':
                 revlogname = b'meta/%s/00manifest.i' % name
-            rl = revlog.revlog(self._svfs, revlogname)
+            rl = revlog.revlog(self._svfs, indexfile=revlogname)
             self._revlogs[name] = rl
         return rl
 
@@ -365,7 +365,7 @@ 
         if options and options.get(constants.OPTION_PACKSONLY):
             return
         treename = b''
-        rl = revlog.revlog(self._svfs, b'00manifesttree.i')
+        rl = revlog.revlog(self._svfs, indexfile=b'00manifesttree.i')
         startlinkrev = self._repackstartlinkrev
         endlinkrev = self._repackendlinkrev
         for rev in pycompat.xrange(len(rl) - 1, -1, -1):
@@ -384,7 +384,7 @@ 
 
             treename = path[5 : -len(b'/00manifest.i')]
 
-            rl = revlog.revlog(self._svfs, path)
+            rl = revlog.revlog(self._svfs, indexfile=path)
             for rev in pycompat.xrange(len(rl) - 1, -1, -1):
                 linkrev = rl.linkrev(rev)
                 if linkrev < startlinkrev: