changeset 47171:729668105901

revlog: rename `newversionflags` to `new_header` This make it consistent with the previous changeset. Differential Revision: https://phab.mercurial-scm.org/D10597
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 03 May 2021 12:26:17 +0200
parents 6e0ee1810fbd
children 93c2e6cdbd01
files mercurial/revlog.py
diffstat 1 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revlog.py	Mon May 03 12:26:06 2021 +0200
+++ b/mercurial/revlog.py	Mon May 03 12:26:17 2021 +0200
@@ -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