Mercurial > hg
changeset 8466:afb3e504b558
verify: use set instead of dict
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Sun, 17 May 2009 04:14:15 +0200 |
parents | 23429ebd3f9d |
children | 9890151a7f30 |
files | mercurial/verify.py |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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)