mercurial/localrepo.py
changeset 1802 8a7a24b96697
parent 1789 d5248726d22f
child 1806 a2c69737e65e
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -519,6 +519,12 @@ class localrepository(object):
                     del mf[fn]
             return mf
 
+        if node1:
+            # read the manifest from node1 before the manifest from node2,
+            # so that we'll hit the manifest cache if we're going through
+            # all the revisions in parent->child order.
+            mf1 = mfmatches(node1)
+
         # are we comparing the working directory?
         if not node2:
             if not wlock:
@@ -557,8 +563,6 @@ class localrepository(object):
             # flush lists from dirstate before comparing manifests
             modified, added = [], []
 
-            mf1 = mfmatches(node1)
-
             for fn in mf2:
                 if mf1.has_key(fn):
                     if mf1[fn] != mf2[fn] and (mf2[fn] != "" or fcmp(fn, mf1)):