Mercurial > hg-stable
changeset 8459:1e63816ce8a2
hgk: use set instead of dict
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Sun, 17 May 2009 03:25:24 +0200 |
parents | f6c99b1628d7 |
children | d4c545dc6f87 |
files | hgext/hgk.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/hgk.py Sun May 17 03:19:00 2009 +0200 +++ b/hgext/hgk.py Sun May 17 03:25:24 2009 +0200 @@ -231,17 +231,17 @@ # 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