Patchwork [08,of,12] committablectx: cache _status in _poststatus

login
register
mail settings
Submitter Sean Farley
Date May 19, 2014, 8:32 p.m.
Message ID <86a5c60bb57240bf7af9.1400531535@laptop.local>
Download mbox | patch
Permalink /patch/4810/
State Accepted
Commit b2d6bc6f9c3e6778860d2a9d8ef72003b4c8c78e
Headers show

Comments

Sean Farley - May 19, 2014, 8:32 p.m.
# HG changeset patch
# User Sean Farley <sean.michael.farley@gmail.com>
# Date 1398379373 18000
#      Thu Apr 24 17:42:53 2014 -0500
# Node ID 86a5c60bb57240bf7af9b7cddfb88e354de4cc1f
# Parent  9c5018b621138aba0c272666c3031f3e1279c695
committablectx: cache _status in _poststatus

A future patch will remove the old workingctx.status which caches the status of
the working directory, therefore we now cache this status in the poststatus
hook of committablectx.

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -1311,10 +1311,11 @@  class workingctx(committablectx):
         We use this poststatus hook to filter out symlinks that might have
         accidentally ended up with the entire contents of the file they are
         susposed to be linking to.
         """
         s[0] = self._filtersuspectsymlink(s[0])
+        self._status = s
         return s
 
     def _dirstatestatus(self, match=None, ignored=False, clean=False,
                         unknown=False):
         '''Gets the status from the dirstate -- internal use only.'''