status: fix default value of status struct
The default argument isn't overloaded. Before, the default constructor would
create a struct having 7 list type objects.
--- a/mercurial/scmutil.py Tue Nov 19 23:53:12 2019 +0900
+++ b/mercurial/scmutil.py Thu Nov 21 22:52:23 2019 +0900
@@ -70,13 +70,13 @@
relevant to the working copy.
'''
- modified = attr.ib(default=list)
- added = attr.ib(default=list)
- removed = attr.ib(default=list)
- deleted = attr.ib(default=list)
- unknown = attr.ib(default=list)
- ignored = attr.ib(default=list)
- clean = attr.ib(default=list)
+ modified = attr.ib(default=attr.Factory(list))
+ added = attr.ib(default=attr.Factory(list))
+ removed = attr.ib(default=attr.Factory(list))
+ deleted = attr.ib(default=attr.Factory(list))
+ unknown = attr.ib(default=attr.Factory(list))
+ ignored = attr.ib(default=attr.Factory(list))
+ clean = attr.ib(default=attr.Factory(list))
def __iter__(self):
yield self.modified