Mercurial > public > mercurial-scm > hg-stable
diff mercurial/commands.py @ 9391:2705e6816d33
use 'x in dict' instead of 'dict.has_key(x)'
"in" is faster, and has_key will be removed in py3k
author | Nicolas Dumazet <nicdumz.commits@gmail.com> |
---|---|
date | Mon, 24 Aug 2009 21:00:34 +0200 |
parents | b34184c046ac |
children | c8e4dc218aaf |
line wrap: on
line diff
--- a/mercurial/commands.py Wed Aug 26 13:07:27 2009 +0200 +++ b/mercurial/commands.py Mon Aug 24 21:00:34 2009 +0200 @@ -1323,11 +1323,11 @@ continue files.append(fn) - if not matches[rev].has_key(fn): + if fn not in matches[rev]: grepbody(fn, rev, flog.read(fnode)) pfn = copy or fn - if not matches[parent].has_key(pfn): + if pfn not in matches[parent]: try: fnode = pctx.filenode(pfn) grepbody(pfn, parent, flog.read(fnode))