Mercurial > public > mercurial-scm > hg
comparison mercurial/subrepo.py @ 22927:7d754b7acd55
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.
author | Martin von Zweigbergk <martinvonz@gmail.com> |
---|---|
date | Sat, 11 Oct 2014 22:43:14 -0700 |
parents | c95db3208a33 |
children | 4165cfd67519 |
comparison
equal
deleted
inserted
replaced
22926:2d0b60b5abc0 | 22927:7d754b7acd55 |
---|---|
1580 elif status == 'A': | 1580 elif status == 'A': |
1581 added.append(f) | 1581 added.append(f) |
1582 elif status == 'D': | 1582 elif status == 'D': |
1583 removed.append(f) | 1583 removed.append(f) |
1584 | 1584 |
1585 deleted = unknown = ignored = clean = [] | 1585 deleted, unknown, ignored, clean = [], [], [], [] |
1586 return scmutil.status(modified, added, removed, deleted, | 1586 return scmutil.status(modified, added, removed, deleted, |
1587 unknown, ignored, clean) | 1587 unknown, ignored, clean) |
1588 | 1588 |
1589 def shortid(self, revid): | 1589 def shortid(self, revid): |
1590 return revid[:7] | 1590 return revid[:7] |