diff mercurial/revlog.py @ 35974:9ba1d0c724e2

revlog: rename 'self.checkinlinesize' into '_enforceinlinesize' The name change has two motivations: 1) The function has no external caller, so we move it to protected space. 2) the function does more than checking it also split the data if we have more data than 'inline' supports.
author Boris Feld <boris.feld@octobus.net>
date Mon, 05 Feb 2018 18:04:40 +0100
parents 4d66993bdcff
children f574cc00831a
line wrap: on
line diff
--- a/mercurial/revlog.py	Mon Feb 05 17:57:29 2018 +0100
+++ b/mercurial/revlog.py	Mon Feb 05 18:04:40 2018 +0100
@@ -1834,7 +1834,7 @@
             raise RevlogError(_("integrity check failed on %s:%s")
                 % (self.indexfile, pycompat.bytestr(revornode)))
 
-    def checkinlinesize(self, tr, fp=None):
+    def _enforceinlinesize(self, tr, fp=None):
         """Check if the revlog is too big for inline and convert if so.
 
         This should be called after revisions are added to the revlog. If the
@@ -2145,7 +2145,7 @@
             ifh.write(entry)
             ifh.write(data[0])
             ifh.write(data[1])
-            self.checkinlinesize(transaction, ifh)
+            self._enforceinlinesize(transaction, ifh)
 
     def addgroup(self, deltas, linkmapper, transaction, addrevisioncb=None):
         """