changeset 21473:ef9b2bea9709

context: add a no-op _prestatus method This patch adds a private _prestatus method so that certain contexts, such as workingctx, can add custom pre-processing to status.
author Sean Farley <sean.michael.farley@gmail.com>
date Mon, 21 Apr 2014 21:39:10 -0500
parents 77dbd05471cd
children 6d7dcabb843f
files mercurial/context.py
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/context.py	Mon Apr 21 21:36:14 2014 -0500
+++ b/mercurial/context.py	Mon Apr 21 21:39:10 2014 -0500
@@ -78,6 +78,14 @@
                 del mf[fn]
         return mf
 
+    def _prestatus(self, other, s, match, listignored, listclean, listunknown):
+        """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.
+        """
+        return s
+
     def _buildstatus(self, other, s, match, listignored, listclean,
                         listunknown):
         """build a status with respect to another context"""