##// END OF EJS Templates
verify: use set instead of dict
Benoit Boissinot -
r8466:afb3e504 default
parent child Browse files
Show More
@@ -21,7 +21,7 def _verify(repo):
21 21 filelinkrevs = {}
22 22 filenodes = {}
23 23 revisions = 0
24 badrevs = {}
24 badrevs = set()
25 25 errors = [0]
26 26 warnings = [0]
27 27 ui = repo.ui
@@ -33,7 +33,7 def _verify(repo):
33 33
34 34 def err(linkrev, msg, filename=None):
35 35 if linkrev != None:
36 badrevs[linkrev] = True
36 badrevs.add(linkrev)
37 37 else:
38 38 linkrev = '?'
39 39 msg = "%s: %s" % (linkrev, msg)
@@ -166,12 +166,12 def _verify(repo):
166 166
167 167 ui.status(_("checking files\n"))
168 168
169 storefiles = {}
169 storefiles = set()
170 170 for f, f2, size in repo.store.datafiles():
171 171 if not f:
172 172 err(None, _("cannot decode filename '%s'") % f2)
173 173 elif size > 0:
174 storefiles[f] = True
174 storefiles.add(f)
175 175
176 176 files = sorted(set(filenodes) | set(filelinkrevs))
177 177 for f in files:
@@ -194,7 +194,7 def _verify(repo):
194 194
195 195 for ff in fl.files():
196 196 try:
197 del storefiles[ff]
197 storefiles.remove(ff)
198 198 except KeyError:
199 199 err(lr, _("missing revlog!"), ff)
200 200
General Comments 0
You need to be logged in to leave comments. Login now