# HG changeset patch # User Benoit Boissinot # Date 1242526455 -7200 # Node ID afb3e504b5581f069096f76fc8bda21e86cc3b02 # Parent 23429ebd3f9dc2d3ab4f4a45e3b2330f8f40127c verify: use set instead of dict diff -r 23429ebd3f9d -r afb3e504b558 mercurial/verify.py --- a/mercurial/verify.py Sun May 17 03:53:13 2009 +0200 +++ b/mercurial/verify.py Sun May 17 04:14:15 2009 +0200 @@ -21,7 +21,7 @@ filelinkrevs = {} filenodes = {} revisions = 0 - badrevs = {} + badrevs = set() errors = [0] warnings = [0] ui = repo.ui @@ -33,7 +33,7 @@ def err(linkrev, msg, filename=None): if linkrev != None: - badrevs[linkrev] = True + badrevs.add(linkrev) else: linkrev = '?' msg = "%s: %s" % (linkrev, msg) @@ -166,12 +166,12 @@ ui.status(_("checking files\n")) - storefiles = {} + storefiles = set() for f, f2, size in repo.store.datafiles(): if not f: err(None, _("cannot decode filename '%s'") % f2) elif size > 0: - storefiles[f] = True + storefiles.add(f) files = sorted(set(filenodes) | set(filelinkrevs)) for f in files: @@ -194,7 +194,7 @@ for ff in fl.files(): try: - del storefiles[ff] + storefiles.remove(ff) except KeyError: err(lr, _("missing revlog!"), ff)