comparison mercurial/context.py @ 29926:be16091ac14d

manifest: change manifestctx to not inherit from manifestdict If manifestctx inherits from manifestdict, it requires some weird logic to lazily load the dict if a piece of information is asked for. This ended up being complicated and unintuitive to use. Let's move the dict creation to .read(). This will make even more sense once we start adding readdelta() and other similar methods to manifestctx.
author Durham Goode <durham@fb.com>
date Mon, 12 Sep 2016 10:55:43 -0700
parents 548fa75cdb07
children 2c302c654451
comparison
equal deleted inserted replaced
29925:1619efcde9a4 29926:be16091ac14d
526 def _changeset(self): 526 def _changeset(self):
527 return self._repo.changelog.changelogrevision(self.rev()) 527 return self._repo.changelog.changelogrevision(self.rev())
528 528
529 @propertycache 529 @propertycache
530 def _manifest(self): 530 def _manifest(self):
531 return self._repo.manifestlog[self._changeset.manifest] 531 return self._repo.manifestlog[self._changeset.manifest].read()
532 532
533 @propertycache 533 @propertycache
534 def _manifestdelta(self): 534 def _manifestdelta(self):
535 return self._repo.manifest.readdelta(self._changeset.manifest) 535 return self._repo.manifest.readdelta(self._changeset.manifest)
536 536