Patchwork D10597: revlog: rename `newversionflags` to `new_header`

login
register
mail settings
Submitter phabricator
Date May 3, 2021, 12:07 p.m.
Message ID <differential-rev-PHID-DREV-gvbtgzph3rvxj7ll22el-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48917/
State Superseded
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
  This make it consistent with the previous changeset.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

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
@@ -385,15 +385,15 @@ 
         opts = self.opener.options
 
         if b'revlogv2' in opts:
-            newversionflags = REVLOGV2 | FLAG_INLINE_DATA
+            new_header = REVLOGV2 | FLAG_INLINE_DATA
         elif b'revlogv1' in opts:
-            newversionflags = REVLOGV1 | FLAG_INLINE_DATA
+            new_header = REVLOGV1 | FLAG_INLINE_DATA
             if b'generaldelta' in opts:
-                newversionflags |= FLAG_GENERALDELTA
+                new_header |= FLAG_GENERALDELTA
         elif b'revlogv0' in self.opener.options:
-            newversionflags = REVLOGV0
+            new_header = REVLOGV0
         else:
-            newversionflags = REVLOG_DEFAULT_VERSION
+            new_header = REVLOG_DEFAULT_VERSION
 
         if b'chunkcachesize' in opts:
             self._chunkcachesize = opts[b'chunkcachesize']
@@ -444,7 +444,7 @@ 
                 % self._chunkcachesize
             )
         force_nodemap = opts.get(b'devel-force-nodemap', False)
-        return newversionflags, mmapindexthreshold, force_nodemap
+        return new_header, mmapindexthreshold, force_nodemap
 
     def _get_data(self, filepath, mmap_threshold):
         """return a file content with or without mmap
@@ -466,7 +466,7 @@ 
 
     def _loadindex(self):
 
-        newversionflags, mmapindexthreshold, force_nodemap = self._init_opts()
+        new_header, mmapindexthreshold, force_nodemap = self._init_opts()
 
         if self.postfix is None:
             index_file = b'%s.i' % self.radix
@@ -488,7 +488,7 @@ 
             header = INDEX_HEADER.unpack(indexdata[:4])[0]
             self._initempty = False
         else:
-            header = newversionflags
+            header = new_header
 
         flags = self._format_flags = header & ~0xFFFF
         fmt = self._format_version = header & 0xFFFF