# HG changeset patch # User Martin von Zweigbergk # Date 1532553709 25200 # Node ID 038cdaca714580f45f61a6845c8a9304f999d6a5 # Parent 9c4847b93d3cabc6f8a3a0331fa4e4f890472ca9 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. diff -r 9c4847b93d3c -r 038cdaca7145 hgext3rd/evolve/utility.py --- 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()