Mercurial > hg-stable
changeset 8380:a00a4db76a15
context: replace pseudo-set by real set
author | Simon Heimberg <simohe@besonet.ch> |
---|---|
date | Thu, 14 May 2009 10:59:55 +0200 |
parents | 10fd7fb65110 |
children | f52fcc864df4 |
files | mercurial/context.py |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/context.py Thu May 14 13:21:47 2009 +0200 +++ b/mercurial/context.py Thu May 14 10:59:55 2009 +0200 @@ -155,19 +155,19 @@ return changectx(self._repo, n) def walk(self, match): - fdict = dict.fromkeys(match.files()) + fset = set(match.files()) # for dirstate.walk, files=['.'] means "walk the whole tree". # follow that here, too - fdict.pop('.', None) + fset.discard('.') for fn in self: - for ffn in fdict: + for ffn in fset: # match if the file is the exact name or a directory if ffn == fn or fn.startswith("%s/" % ffn): - del fdict[ffn] + fset.remove(ffn) break if match(fn): yield fn - for fn in sorted(fdict): + for fn in sorted(fset): if match.bad(fn, 'No such file in rev ' + str(self)) and match(fn): yield fn