Mercurial > public > mercurial-scm > hg
comparison mercurial/scmutil.py @ 43775:b5f183eedd98
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.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Thu, 21 Nov 2019 22:52:23 +0900 |
parents | 5b90a050082b |
children | f2de8dc9c52f |
comparison
equal
deleted
inserted
replaced
43774:064c9a4ced4a | 43775:b5f183eedd98 |
---|---|
68 | 68 |
69 The 'deleted', 'unknown' and 'ignored' properties are only | 69 The 'deleted', 'unknown' and 'ignored' properties are only |
70 relevant to the working copy. | 70 relevant to the working copy. |
71 ''' | 71 ''' |
72 | 72 |
73 modified = attr.ib(default=list) | 73 modified = attr.ib(default=attr.Factory(list)) |
74 added = attr.ib(default=list) | 74 added = attr.ib(default=attr.Factory(list)) |
75 removed = attr.ib(default=list) | 75 removed = attr.ib(default=attr.Factory(list)) |
76 deleted = attr.ib(default=list) | 76 deleted = attr.ib(default=attr.Factory(list)) |
77 unknown = attr.ib(default=list) | 77 unknown = attr.ib(default=attr.Factory(list)) |
78 ignored = attr.ib(default=list) | 78 ignored = attr.ib(default=attr.Factory(list)) |
79 clean = attr.ib(default=list) | 79 clean = attr.ib(default=attr.Factory(list)) |
80 | 80 |
81 def __iter__(self): | 81 def __iter__(self): |
82 yield self.modified | 82 yield self.modified |
83 yield self.added | 83 yield self.added |
84 yield self.removed | 84 yield self.removed |