Mercurial > public > mercurial-scm > hg
comparison mercurial/context.py @ 32519:6ae068f801e3
context: do not cache manifestctx
This will make sure when ctx.repo.manifestlog changes, a correct new
manifestctx is returned. repo.manifestlog takes care of caching so the
manifestctx won't be reconstructed every time.
author | Jun Wu <quark@fb.com> |
---|---|
date | Thu, 25 May 2017 17:20:43 -0700 |
parents | 1df80eff24cf |
children | c0b16b801687 |
comparison
equal
deleted
inserted
replaced
32518:bb628fc85b0e | 32519:6ae068f801e3 |
---|---|
549 | 549 |
550 @propertycache | 550 @propertycache |
551 def _manifest(self): | 551 def _manifest(self): |
552 return self._manifestctx.read() | 552 return self._manifestctx.read() |
553 | 553 |
554 @propertycache | 554 @property |
555 def _manifestctx(self): | 555 def _manifestctx(self): |
556 return self._repo.manifestlog[self._changeset.manifest] | 556 return self._repo.manifestlog[self._changeset.manifest] |
557 | 557 |
558 @propertycache | 558 @propertycache |
559 def _manifestdelta(self): | 559 def _manifestdelta(self): |
2312 self._repo.savecommitmessage(self._text) | 2312 self._repo.savecommitmessage(self._text) |
2313 | 2313 |
2314 def manifestnode(self): | 2314 def manifestnode(self): |
2315 return self._manifestnode | 2315 return self._manifestnode |
2316 | 2316 |
2317 @propertycache | 2317 @property |
2318 def _manifestctx(self): | 2318 def _manifestctx(self): |
2319 return self._repo.manifestlog[self._manifestnode] | 2319 return self._repo.manifestlog[self._manifestnode] |
2320 | 2320 |
2321 def filectx(self, path, filelog=None): | 2321 def filectx(self, path, filelog=None): |
2322 return self._originalctx.filectx(path, filelog=filelog) | 2322 return self._originalctx.filectx(path, filelog=filelog) |