Mercurial > evolve
changeset 3903:038cdaca7145
builddependencies: remove a use of defaultdict
I don't see much reason to make "rdependencies" be a defaultdict when
"dependencies" is not. It's easy to initialize each entry ourselves.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Wed, 25 Jul 2018 14:21:49 -0700 |
parents | 9c4847b93d3c |
children | d2d03df3956f |
files | hgext3rd/evolve/utility.py |
diffstat | 1 files changed, 1 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/evolve/utility.py Tue Jul 31 09:03:35 2018 +0200 +++ b/hgext3rd/evolve/utility.py Wed Jul 25 14:21:49 2018 -0700 @@ -5,8 +5,6 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. -import collections - from mercurial import ( obsutil, ) @@ -95,7 +93,7 @@ # Means that: 6 has no dependency, 3 depends on 6 to be solved dependencies = {} # rdependencies is the inverted dict of dependencies - rdependencies = collections.defaultdict(set) + rdependencies = {r: set() for r in revs} for r in revs: dependencies[r] = set()