Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/context.py @ 23257:37c57a7cf160
context.status: explain "caching reasons" more fully
Where we "load earliest manifest first for caching reasons", elaborate
on what "caching reasons" refers to. Text provided by Matt in
http://thread.gmane.org/gmane.comp.version-control.mercurial.devel/73235/focus=73578.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 11 Nov 2014 10:16:54 -0800 |
parents | 18168938e1c1 |
children | c10dc5568069 |
comparison
equal
deleted
inserted
replaced
23256:1c11393d5dfb | 23257:37c57a7cf160 |
---|---|
94 return match or matchmod.always(self._repo.root, self._repo.getcwd()) | 94 return match or matchmod.always(self._repo.root, self._repo.getcwd()) |
95 | 95 |
96 def _buildstatus(self, other, s, match, listignored, listclean, | 96 def _buildstatus(self, other, s, match, listignored, listclean, |
97 listunknown): | 97 listunknown): |
98 """build a status with respect to another context""" | 98 """build a status with respect to another context""" |
99 # load earliest manifest first for caching reasons | 99 # Load earliest manifest first for caching reasons. More specifically, |
100 # if you have revisions 1000 and 1001, 1001 is probably stored as a | |
101 # delta against 1000. Thus, if you read 1000 first, we'll reconstruct | |
102 # 1000 and cache it so that when you read 1001, we just need to apply a | |
103 # delta to what's in the cache. So that's one full reconstruction + one | |
104 # delta application. | |
100 if self.rev() is not None and self.rev() < other.rev(): | 105 if self.rev() is not None and self.rev() < other.rev(): |
101 self.manifest() | 106 self.manifest() |
102 mf1 = other._manifestmatches(match, s) | 107 mf1 = other._manifestmatches(match, s) |
103 mf2 = self._manifestmatches(match, s) | 108 mf2 = self._manifestmatches(match, s) |
104 | 109 |