revlog: drop `flush` parameter from `_peek_iscensored`
authorPierre-Yves David <pierre-yves.david@octobus.net>
Mon, 03 May 2021 12:25:23 +0200
changeset 47180 c9ae2e7fe154
parent 47179 590f2364d33a
child 47181 88bd08a6830f
revlog: drop `flush` parameter from `_peek_iscensored` This is not used anywhere. Differential Revision: https://phab.mercurial-scm.org/D10592
mercurial/revlog.py
--- a/mercurial/revlog.py	Mon May 03 12:25:12 2021 +0200
+++ b/mercurial/revlog.py	Mon May 03 12:25:23 2021 +0200
@@ -2433,11 +2433,6 @@
             transaction.add(self._datafile, end)
             dfh = self._datafp(b"a+")
 
-        def flush():
-            if dfh:
-                dfh.flush()
-            ifh.flush()
-
         self._writinghandles = (ifh, dfh)
         empty = True
 
@@ -2482,7 +2477,7 @@
                             self.display_id, self.node(baserev)
                         )
 
-                if not flags and self._peek_iscensored(baserev, delta, flush):
+                if not flags and self._peek_iscensored(baserev, delta):
                     flags |= REVIDX_ISCENSORED
 
                 # We assume consumers of addrevisioncb will want to retrieve
@@ -2534,7 +2529,7 @@
 
         return self.flags(rev) & REVIDX_ISCENSORED
 
-    def _peek_iscensored(self, baserev, delta, flush):
+    def _peek_iscensored(self, baserev, delta):
         """Quickly check if a delta produces a censored revision."""
         if not self._censorable:
             return False