Patchwork [5,of,7] context.status: remove now-empty _prestatus()

login
register
mail settings
Submitter Martin von Zweigbergk
Date Nov. 2, 2014, 10:13 p.m.
Message ID <bce37800cf84e5b689e3.1414966429@handduk2.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/6546/
State Accepted
Commit c26073dfbbe63f15adf4970005ec4ac36ad19d4f
Headers show

Comments

Martin von Zweigbergk - Nov. 2, 2014, 10:13 p.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@gmail.com>
# Date 1413097600 25200
#      Sun Oct 12 00:06:40 2014 -0700
# Branch stable
# Node ID bce37800cf84e5b689e3c4bc0417b0e7ab1767a0
# Parent  180d0d685dc5b944b4b28b7e450e21f47397313b
context.status: remove now-empty _prestatus()
Sean Farley - Nov. 3, 2014, 6:42 p.m.
Martin von Zweigbergk writes:

> # HG changeset patch
> # User Martin von Zweigbergk <martinvonz@gmail.com>
> # Date 1413097600 25200
> #      Sun Oct 12 00:06:40 2014 -0700
> # Branch stable
> # Node ID bce37800cf84e5b689e3c4bc0417b0e7ab1767a0
> # Parent  180d0d685dc5b944b4b28b7e450e21f47397313b
> context.status: remove now-empty _prestatus()

As I mentioned before, this makes the design less robust IMHO.

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -93,14 +93,6 @@ 
         """
         return match or matchmod.always(self._repo.root, self._repo.getcwd())
 
-    def _prestatus(self, other):
-        """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.
-        """
-        pass
-
     def _poststatus(self, other, s, match, listignored, listclean, listunknown):
         """provide a hook to allow child objects to postprocess status results
 
@@ -311,7 +303,6 @@ 
             ctx1, ctx2 = ctx2, ctx1
 
         match = ctx2._matchstatus(ctx1, match)
-        ctx2._prestatus(ctx1)
         r = [[], [], [], [], [], [], []]
         r = ctx2._buildstatus(ctx1, r, match, listignored, listclean,
                               listunknown)
@@ -1410,15 +1401,6 @@ 
                 del mf[f]
         return mf
 
-    def _prestatus(self, other):
-        """override the parent hook with a dirstate query
-
-        We use this prestatus hook to populate the status with information from
-        the dirstate.
-        """
-        # doesn't need to call super
-        pass
-
     def _poststatus(self, other, s, match, listignored, listclean, listunknown):
         """override the parent hook with a filter for suspect symlinks