changeset 51004:39fa0b948f5a

revlog: make the `candelta` method private It is only used internally, so lets make it clear.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 19 Sep 2023 23:10:05 +0200
parents 273434748051
children 569eb5d0420d
files mercurial/revlog.py tests/test-revlog-raw.py
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revlog.py	Tue Sep 19 23:09:29 2023 +0200
+++ b/mercurial/revlog.py	Tue Sep 19 23:10:05 2023 +0200
@@ -894,7 +894,7 @@
         except KeyError:
             return False
 
-    def candelta(self, baserev, rev):
+    def _candelta(self, baserev, rev):
         """whether two revisions (baserev, rev) can be delta-ed or not"""
         # Disable delta if either rev requires a content-changing flag
         # processor (ex. LFS). This is because such flag processor can alter
@@ -3105,7 +3105,7 @@
             nodesorder,
             revlogrevisiondelta,
             deltaparentfn=self.deltaparent,
-            candeltafn=self.candelta,
+            candeltafn=self._candelta,
             rawsizefn=self.rawsize,
             revdifffn=self.revdiff,
             flagsfn=self.flags,
--- a/tests/test-revlog-raw.py	Tue Sep 19 23:09:29 2023 +0200
+++ b/tests/test-revlog-raw.py	Tue Sep 19 23:10:05 2023 +0200
@@ -158,7 +158,7 @@
             else:
                 # suboptimal deltaparent
                 deltaparent = min(0, parentrev)
-            if not rlog.candelta(deltaparent, r):
+            if not rlog._candelta(deltaparent, r):
                 deltaparent = -1
             return {
                 b'node': rlog.node(r),