Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/context.py @ 51829:87a8190e66fe
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!
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 01 Aug 2024 13:42:34 +0200 |
parents | dcbe7fda53e4 |
children | 9844bab33aee |
comparison
equal
deleted
inserted
replaced
51828:e1fd715df257 | 51829:87a8190e66fe |
---|---|
539 def _manifestctx(self): | 539 def _manifestctx(self): |
540 return self._repo.manifestlog[self._changeset.manifest] | 540 return self._repo.manifestlog[self._changeset.manifest] |
541 | 541 |
542 @propertycache | 542 @propertycache |
543 def _manifestdelta(self): | 543 def _manifestdelta(self): |
544 return self._manifestctx.readdelta() | 544 base, delta = self._manifestctx.read_any_fast_delta() |
545 if base is None: | |
546 self._manifest = delta | |
547 return delta | |
545 | 548 |
546 @propertycache | 549 @propertycache |
547 def _parents(self): | 550 def _parents(self): |
548 repo = self._repo | 551 repo = self._repo |
549 if self._maybe_filtered: | 552 if self._maybe_filtered: |