Patchwork D10602: revlog: rename `indexdata` to entry_data

login
register
mail settings
Submitter phabricator
Date May 3, 2021, 12:07 p.m.
Message ID <differential-rev-PHID-DREV-yybat4pnld6itmflx52q-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48920/
State New
Headers show

Comments

phabricator - May 3, 2021, 12:07 p.m.
marmoute created this revision.
Herald added a reviewer: indygreg.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  Same reasoning as the previous changeset, we might not be looking at index data
  here.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/revlog.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/revlog.py b/mercurial/revlog.py
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -473,11 +473,11 @@ 
         else:
             entry_point = b'%s.i.%s' % (self.radix, self.postfix)
 
-        indexdata = b''
+        entry_data = b''
         self._initempty = True
-        indexdata = self._get_data(entry_point, mmapindexthreshold)
-        if len(indexdata) > 0:
-            header = INDEX_HEADER.unpack(indexdata[:4])[0]
+        entry_data = self._get_data(entry_point, mmapindexthreshold)
+        if len(entry_data) > 0:
+            header = INDEX_HEADER.unpack(entry_data[:4])[0]
             self._initempty = False
         else:
             header = new_header
@@ -525,6 +525,7 @@ 
             msg %= (self._format_version, self.display_id)
             raise error.RevlogError(msg)
 
+        index_data = entry_data
         self._indexfile = entry_point
 
         if self.postfix is None or self.postfix == b'a':
@@ -564,7 +565,7 @@ 
         elif use_rust_index:
             self._parse_index = parse_index_v1_mixed
         try:
-            d = self._parse_index(indexdata, self._inline)
+            d = self._parse_index(index_data, self._inline)
             index, _chunkcache = d
             use_nodemap = (
                 not self._inline