branchcache: rename `load` to `_load_heads`
authorPierre-Yves David <pierre-yves.david@octobus.net>
Mon, 26 Feb 2024 15:12:20 +0100
changeset 51461 47752632b4fc
parent 51460 cebd96dee99a
child 51462 de1bc7db9f61
branchcache: rename `load` to `_load_heads` We are about to have more similar function, we rename the existing one to a more meaningful name and mark it private in the process.
mercurial/branchmap.py
--- a/mercurial/branchmap.py	Sun Feb 25 20:40:37 2024 +0100
+++ b/mercurial/branchmap.py	Mon Feb 26 15:12:20 2024 +0100
@@ -489,7 +489,7 @@
             if not bcache.validfor(repo):
                 # invalidate the cache
                 raise ValueError('tip differs')
-            bcache.load(repo, lineiter)
+            bcache._load_heads(repo, lineiter)
         except (IOError, OSError):
             return None
 
@@ -511,7 +511,7 @@
 
         return bcache
 
-    def load(self, repo, lineiter):
+    def _load_heads(self, repo, lineiter):
         """fully loads the branchcache by reading from the file using the line
         iterator passed"""
         for line in lineiter: