Patchwork D10592: revlog: drop `flush` parameter from `_peek_iscensored`

login
register
mail settings
Submitter phabricator
Date May 3, 2021, 12:07 p.m.
Message ID <differential-rev-PHID-DREV-v6rz4z7zlkf2cijfxlad-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48910/
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
  This is not used anywhere.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

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
@@ -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