# HG changeset patch # User Yuya Nishihara # Date 2019-11-21 13:52:23 # Node ID b5f183eedd980734e239bb42ce31407449e4f552 # Parent 064c9a4ced4aa0d67e016b55082c4a6b60ea802d 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. diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py --- a/mercurial/scmutil.py +++ b/mercurial/scmutil.py @@ -70,13 +70,13 @@ class status(object): 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