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

FUJIWARA Katsunori foozy at lares.dti.ne.jp
Fri Jan 9 03:21:01 CST 2015


At Thu, 08 Jan 2015 21:36:00 +0000,
Martin von Zweigbergk wrote:
> 
> [1  <text/plain; UTF-8 (7bit)>]
> 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.

This series looks good to me.

Thank you for brushing my works up !


> 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``
> >
> [2  <text/html; UTF-8 (quoted-printable)>]
> 

----------------------------------------------------------------------
[FUJIWARA Katsunori]                             foozy at lares.dti.ne.jp


More information about the Mercurial-devel mailing list