workingctx: duplicate status list received at _poststatus hook
authorYuya Nishihara <yuya@tcha.org>
Sat, 31 May 2014 21:21:06 +0900
changeset 21718 bc773e9505e3
parent 21717 2a095d3442e0
child 21719 28ecdf3fa1db
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.
mercurial/context.py
--- a/mercurial/context.py	Thu Jun 05 15:24:29 2014 +0530
+++ b/mercurial/context.py	Sat May 31 21:21:06 2014 +0900
@@ -1375,7 +1375,7 @@
         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,