Patchwork D10598: revlog: use `_format_flags` to access flags instead of `header`

login
register
mail settings
Submitter phabricator
Date May 3, 2021, 12:07 p.m.
Message ID <differential-rev-PHID-DREV-k5vwols4aunmfmojhczd-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48916/
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
  It seems better to reuse the variable we carefully extracted
  
  This also open the way to more flexible way to retrieve these flags.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

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
@@ -510,8 +510,8 @@ 
                     % (flags >> 16, fmt, self.display_id)
                 )
 
-            self._inline = header & FLAG_INLINE_DATA
-            self._generaldelta = header & FLAG_GENERALDELTA
+            self._inline = self._format_flags & FLAG_INLINE_DATA
+            self._generaldelta = self._format_flags & FLAG_GENERALDELTA
 
         elif fmt == REVLOGV2:
             if flags & ~REVLOGV2_FLAGS: