[PATCH] workingctx: duplicate status list received at _poststatus hook

Yuya Nishihara yuya at tcha.org
Sat May 31 21:16:16 CDT 2014


On Sat, 31 May 2014 11:58:38 -0500, Sean Farley wrote:
> Yuya Nishihara writes:
> > # HG changeset patch
> > # User Yuya Nishihara <yuya at tcha.org>
> > # Date 1401538866 -32400
> > #      Sat May 31 21:21:06 2014 +0900
> > # Node ID 8f3fb97246fe7378aa9b06d93575c68f9e5d95ea
> > # Parent  9c35f3a8cac48b9404ee8dbbda18467f6123b82f
> > workingctx: duplicate status list received at _poststatus hook
> >
> > basectx.status may reorder the list after workingctx._poststatus is called,
> > so workingctx must copy it.  Otherwise, wctx.deleted() would return "unknown"
> > files, for example.
> >
> > diff --git a/mercurial/context.py b/mercurial/context.py
> > --- a/mercurial/context.py
> > +++ b/mercurial/context.py
> > @@ -1375,7 +1375,7 @@ class workingctx(committablectx):
> >          susposed to be linking to.
> >          """
> >          s[0] = self._filtersuspectsymlink(s[0])
> > -        self._status = s
> > +        self._status = s[:]
> >          return s
> >  
> >      def _dirstatestatus(self, match=None, ignored=False, clean=False,
> 
> Ah, that's a good point. I assume you found this in TortoiseHg?

Yes,
https://groups.google.com/d/msg/thg-dev/Kkwxl-RtFrw/tjVmQd6B8S4J


More information about the Mercurial-devel mailing list