##// END OF EJS Templates
hgk: use set instead of dict
Benoit Boissinot -
r8459:1e63816c default
parent child Browse files
Show More
@@ -231,17 +231,17 b' def revtree(ui, args, repo, full="tree",'
231
231
232 # calculate the graph for the supplied commits
232 # calculate the graph for the supplied commits
233 for i in xrange(len(want_sha1)):
233 for i in xrange(len(want_sha1)):
234 reachable.append({});
234 reachable.append(set());
235 n = want_sha1[i];
235 n = want_sha1[i];
236 visit = [n];
236 visit = [n];
237 reachable[i][n] = 1
237 reachable[i].add(n)
238 while visit:
238 while visit:
239 n = visit.pop(0)
239 n = visit.pop(0)
240 if n in stop_sha1:
240 if n in stop_sha1:
241 continue
241 continue
242 for p in repo.changelog.parents(n):
242 for p in repo.changelog.parents(n):
243 if p not in reachable[i]:
243 if p not in reachable[i]:
244 reachable[i][p] = 1
244 reachable[i].add(p)
245 visit.append(p)
245 visit.append(p)
246 if p in stop_sha1:
246 if p in stop_sha1:
247 continue
247 continue
General Comments 0
You need to be logged in to leave comments. Login now