[PATCH 08 of 12] committablectx: cache _status in _poststatus

Sean Farley sean.michael.farley at gmail.com
Mon May 19 15:32:15 CDT 2014


# HG changeset patch
# User Sean Farley <sean.michael.farley at 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.

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.'''


More information about the Mercurial-devel mailing list