[PATCH 2 of 2] status: don't override _buildstatus() in workingcommitctx

Martin von Zweigbergk martinvonz at google.com
Thu Jan 8 15:36:00 CST 2015


I didn't quite understand your patches that introduced workingcommitctx, so
I may very well have missed something. Tests pass and it does simplify a
bit, so hopefully it makes sense.

On Thu Jan 08 2015 at 1:32:46 PM Martin von Zweigbergk <
martinvonz at google.com> wrote:

> # HG changeset patch
> # User Martin von Zweigbergk <martinvonz at google.com>
> # Date 1420752546 28800
> #      Thu Jan 08 13:29:06 2015 -0800
> # Node ID d3d00e14eb176871e4cc45093827d00b36b63aec
> # Parent  f6dfcd963a13b9559445ea2c67d33bc06e58cbb6
> status: don't override _buildstatus() in workingcommitctx
>
> Now that the caching into _status is done in
> workingctx._dirstatestatus(), which workingcommitctx._dirstatestatus()
> does not call, there is no caching to prevent in _buildstatus(), so
> stop overriding it.
>
> diff --git a/mercurial/context.py b/mercurial/context.py
> --- a/mercurial/context.py
> +++ b/mercurial/context.py
> @@ -1648,18 +1648,6 @@
>          super(workingctx, self).__init__(repo, text, user, date, extra,
>                                           changes)
>
> -    def _buildstatus(self, other, s, match,
> -                     listignored, listclean, listunknown):
> -        """Prevent ``workingctx._buildstatus`` from changing
> ``self._status``
> -        """
> -        s = self._dirstatestatus(match, listignored, listclean,
> listunknown)
> -        if other != self._repo['.']:
> -            # workingctx._buildstatus doesn't change self._status in this
> case
> -            superself = super(workingcommitctx, self)
> -            s = superself._buildstatus(other, s, match,
> -                                       listignored, listclean,
> listunknown)
> -        return s
> -
>      def _dirstatestatus(self, match=None, ignored=False, clean=False,
>                          unknown=False):
>          """Return matched files only in ``self._status``
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20150108/771c1c20/attachment.html>


More information about the Mercurial-devel mailing list