manifest: use read_any_fast_delta in changectx
authorPierre-Yves David <pierre-yves.david@octobus.net>
Thu, 01 Aug 2024 13:42:34 +0200
changeset 51777 87a8190e66fe
parent 51776 e1fd715df257
child 51778 7e5ea2a0c3ef
manifest: use read_any_fast_delta in changectx The new API is clearer but also more expressive. It allow to detect case where we did return a full read and populated the associated cache. Saving time!
mercurial/context.py
--- a/mercurial/context.py	Thu Aug 01 13:40:46 2024 +0200
+++ b/mercurial/context.py	Thu Aug 01 13:42:34 2024 +0200
@@ -541,7 +541,10 @@
 
     @propertycache
     def _manifestdelta(self):
-        return self._manifestctx.readdelta()
+        base, delta = self._manifestctx.read_any_fast_delta()
+        if base is None:
+            self._manifest = delta
+        return delta
 
     @propertycache
     def _parents(self):