revlog: simplify a conditionnal in _enforceinlinesize
authorPierre-Yves David <pierre-yves.david@octobus.net>
Mon, 03 May 2021 12:25:34 +0200
changeset 47167 88bd08a6830f
parent 47166 c9ae2e7fe154
child 47168 cacb08f357ed
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
mercurial/revlog.py
--- 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)