# HG changeset patch # User Benoit Boissinot # Date 2009-05-17 01:25:24 # Node ID 1e63816ce8a23ad256e655dec3e613fe3af583c5 # Parent f6c99b1628d76899462c6268f617c153dd3a19e0 hgk: use set instead of dict diff --git a/hgext/hgk.py b/hgext/hgk.py --- a/hgext/hgk.py +++ b/hgext/hgk.py @@ -231,17 +231,17 @@ def revtree(ui, args, repo, full="tree", # calculate the graph for the supplied commits for i in xrange(len(want_sha1)): - reachable.append({}); + reachable.append(set()); n = want_sha1[i]; visit = [n]; - reachable[i][n] = 1 + reachable[i].add(n) while visit: n = visit.pop(0) if n in stop_sha1: continue for p in repo.changelog.parents(n): if p not in reachable[i]: - reachable[i][p] = 1 + reachable[i].add(p) visit.append(p) if p in stop_sha1: continue