Patchwork [04,of,12] basectx: preserve loading the cached manifest in _prestatus

login
register
mail settings
Submitter Sean Farley
Date May 19, 2014, 8:32 p.m.
Message ID <fc8654d37dd78bc8f795.1400531531@laptop.local>
Download mbox | patch
Permalink /patch/4806/
State Accepted
Commit 2945fdc38aad2d95e29ff956d0af3696ee97fd2b
Headers show

Comments

Sean Farley - May 19, 2014, 8:32 p.m.
# HG changeset patch
# User Sean Farley <sean.michael.farley@gmail.com>
# 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.

Patch

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