From patchwork Mon May 19 20:32:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [04, of, 12] basectx: preserve loading the cached manifest in _prestatus From: Sean Farley X-Patchwork-Id: 4806 Message-Id: To: mercurial-devel@selenic.com Date: Mon, 19 May 2014 15:32:11 -0500 # HG changeset patch # User Sean Farley # Date 1398287183 18000 # Wed Apr 23 16:06:23 2014 -0500 # Node ID fc8654d37dd78bc8f79554f06f0b3f141fc9d8b2 # Parent 3fd24754f34c5358e7cd9d1d8d72a59e6c9ae47b basectx: preserve loading the cached manifest in _prestatus This is just a copy from localrepo.status and is a small step to removing that method entirely. The prestatus hook is only called for changectx's, thereby ensuring that the same behavior is guaranteed. diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -91,10 +91,13 @@ class basectx(object): """provide a hook to allow child objects to preprocess status results For example, this allows other contexts, such as workingctx, to query the dirstate before comparing the manifests. """ + # load earliest manifest first for caching reasons + if self.rev() < other.rev(): + self.manifest() return s def _poststatus(self, other, s, match, listignored, listclean, listunknown): """provide a hook to allow child objects to postprocess status results