changeset 47167:88bd08a6830f

revlog: simplify a conditionnal in _enforceinlinesize This is a gratuitous change to make things a bit easier to read. Differential Revision: https://phab.mercurial-scm.org/D10593
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 03 May 2021 12:25:34 +0200
parents c9ae2e7fe154
children cacb08f357ed
files mercurial/revlog.py
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revlog.py	Mon May 03 12:25:23 2021 +0200
+++ b/mercurial/revlog.py	Mon May 03 12:25:34 2021 +0200
@@ -1956,10 +1956,8 @@
         to use multiple index and data files.
         """
         tiprev = len(self) - 1
-        if (
-            not self._inline
-            or (self.start(tiprev) + self.length(tiprev)) < _maxinline
-        ):
+        total_size = self.start(tiprev) + self.length(tiprev)
+        if not self._inline or total_size < _maxinline:
             return
 
         troffset = tr.findoffset(self._indexfile)