subrepo: use separate instances of empty lists in status
authorMartin von Zweigbergk <martinvonz@gmail.com>
Sat, 11 Oct 2014 22:43:14 -0700
changeset 22927 7d754b7acd55
parent 22926 2d0b60b5abc0
child 22928 5e5d297ccbd0
subrepo: use separate instances of empty lists in status We do modify the lists that make up the status in several places, so it seems risky to use the same instance of a list for several different status types. Use a separate empty list for each type instead.
mercurial/subrepo.py
--- a/mercurial/subrepo.py	Fri Oct 03 09:29:48 2014 -0700
+++ b/mercurial/subrepo.py	Sat Oct 11 22:43:14 2014 -0700
@@ -1582,7 +1582,7 @@
             elif status == 'D':
                 removed.append(f)
 
-        deleted = unknown = ignored = clean = []
+        deleted, unknown, ignored, clean = [], [], [], []
         return scmutil.status(modified, added, removed, deleted,
                               unknown, ignored, clean)