Mercurial > hg
comparison mercurial/context.py @ 30344:362f6f651b2e
context: add manifestctx property on changectx
This allows us to access the manifestctx for a given commit. This will be used
in a later patch to be able to copy the manifestctx when we want to make a new
commit.
author | Durham Goode <durham@fb.com> |
---|---|
date | Tue, 08 Nov 2016 08:03:43 -0800 |
parents | 608ba935e041 |
children | 0298a07f64d9 |
comparison
equal
deleted
inserted
replaced
30343:952e1916ae56 | 30344:362f6f651b2e |
---|---|
176 return self._node | 176 return self._node |
177 def hex(self): | 177 def hex(self): |
178 return hex(self.node()) | 178 return hex(self.node()) |
179 def manifest(self): | 179 def manifest(self): |
180 return self._manifest | 180 return self._manifest |
181 def manifestctx(self): | |
182 return self._manifestctx | |
181 def repo(self): | 183 def repo(self): |
182 return self._repo | 184 return self._repo |
183 def phasestr(self): | 185 def phasestr(self): |
184 return phases.phasenames[self.phase()] | 186 return phases.phasenames[self.phase()] |
185 def mutable(self): | 187 def mutable(self): |
528 def _changeset(self): | 530 def _changeset(self): |
529 return self._repo.changelog.changelogrevision(self.rev()) | 531 return self._repo.changelog.changelogrevision(self.rev()) |
530 | 532 |
531 @propertycache | 533 @propertycache |
532 def _manifest(self): | 534 def _manifest(self): |
533 return self._repo.manifestlog[self._changeset.manifest].read() | 535 return self._manifestctx.read() |
536 | |
537 @propertycache | |
538 def _manifestctx(self): | |
539 return self._repo.manifestlog[self._changeset.manifest] | |
534 | 540 |
535 @propertycache | 541 @propertycache |
536 def _manifestdelta(self): | 542 def _manifestdelta(self): |
537 mfnode = self._changeset.manifest | 543 return self._manifestctx.readdelta() |
538 return self._repo.manifestlog[mfnode].readdelta() | |
539 | 544 |
540 @propertycache | 545 @propertycache |
541 def _parents(self): | 546 def _parents(self): |
542 repo = self._repo | 547 repo = self._repo |
543 p1, p2 = repo.changelog.parentrevs(self._rev) | 548 p1, p2 = repo.changelog.parentrevs(self._rev) |