Patchwork [06,of,12] localrepo: remove cache code now handled by _prestatus

login
register
mail settings
Submitter Sean Farley
Date May 19, 2014, 8:32 p.m.
Message ID <ede6303f10e4309a6e3d.1400531533@laptop.local>
Download mbox | patch
Permalink /patch/4808/
State Accepted
Commit 660ef8ca8c3c1258087ded07657e6c45aeb03532
Headers show

Comments

Sean Farley - May 19, 2014, 8:32 p.m.
# HG changeset patch
# User Sean Farley <sean.michael.farley@gmail.com>
# Date 1398287300 18000
#      Wed Apr 23 16:08:20 2014 -0500
# Node ID ede6303f10e4309a6e3d2b73fa721c8f583df985
# Parent  4518af73d5c902e6e43ce342849a9240852d98d4
localrepo: remove cache code now handled by _prestatus

This patch removes the last of the 'working' variable that was sprinkled
throughout localrepo.status which paves the way for future patches to use the
object oriented design of contexts to handle calculating the status.

Patch

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -1530,17 +1530,12 @@  class localrepository(object):
         if (not isinstance(ctx1, context.changectx)
             and isinstance(ctx2, context.changectx)):
             reversed = True
             ctx1, ctx2 = ctx2, ctx1
 
-        working = ctx2.rev() is None
         listignored, listclean, listunknown = ignored, clean, unknown
 
-        # load earliest manifest first for caching reasons
-        if not working and ctx2.rev() < ctx1.rev():
-            ctx2.manifest()
-
         r = [[], [], [], [], [], [], []]
         match = ctx2._matchstatus(ctx1, r, match, listignored, listclean,
                                   listunknown)
         r = ctx2._prestatus(ctx1, r, match, listignored, listclean, listunknown)
         r = ctx2._generatestatus(ctx1, r, match, listignored, listclean,