##// END OF EJS Templates
verify: call ui.progress()
Augie Fackler -
r10433:767fbacb default
parent child Browse files
Show More
@@ -120,7 +120,9 b' def _verify(repo):'
120 120 ui.status(_("checking changesets\n"))
121 121 seen = {}
122 122 checklog(cl, "changelog", 0)
123 total = len(repo)
123 124 for i in repo:
125 ui.progress('changelog', i, total=total)
124 126 n = cl.node(i)
125 127 checkentry(cl, i, n, seen, [i], "changelog")
126 128
@@ -131,11 +133,14 b' def _verify(repo):'
131 133 filelinkrevs.setdefault(f, []).append(i)
132 134 except Exception, inst:
133 135 exc(i, _("unpacking changeset %s") % short(n), inst)
136 ui.progress('changelog', None)
134 137
135 138 ui.status(_("checking manifests\n"))
136 139 seen = {}
137 140 checklog(mf, "manifest", 0)
141 total = len(mf)
138 142 for i in mf:
143 ui.progress('manifests', i, total=total)
139 144 n = mf.node(i)
140 145 lr = checkentry(mf, i, n, seen, mflinkrevs.get(n, []), "manifest")
141 146 if n in mflinkrevs:
@@ -151,22 +156,31 b' def _verify(repo):'
151 156 filenodes.setdefault(f, {}).setdefault(fn, lr)
152 157 except Exception, inst:
153 158 exc(lr, _("reading manifest delta %s") % short(n), inst)
159 ui.progress('manifests', None)
154 160
155 161 ui.status(_("crosschecking files in changesets and manifests\n"))
156 162
163 total = len(mflinkrevs) + len(filelinkrevs) + len(filenodes)
164 count = 0
157 165 if havemf:
158 166 for c, m in sorted([(c, m) for m in mflinkrevs
159 167 for c in mflinkrevs[m]]):
168 count += 1
169 ui.progress('crosscheck', count, total=total)
160 170 err(c, _("changeset refers to unknown manifest %s") % short(m))
161 171 mflinkrevs = None # del is bad here due to scope issues
162 172
163 173 for f in sorted(filelinkrevs):
174 count += 1
175 ui.progress('crosscheck', count, total=total)
164 176 if f not in filenodes:
165 177 lr = filelinkrevs[f][0]
166 178 err(lr, _("in changeset but not in manifest"), f)
167 179
168 180 if havecl:
169 181 for f in sorted(filenodes):
182 count += 1
183 ui.progress('crosscheck', count, total=total)
170 184 if f not in filelinkrevs:
171 185 try:
172 186 fl = repo.file(f)
@@ -175,6 +189,8 b' def _verify(repo):'
175 189 lr = None
176 190 err(lr, _("in manifest but not in changeset"), f)
177 191
192 ui.progress('crosscheck', None)
193
178 194 ui.status(_("checking files\n"))
179 195
180 196 storefiles = set()
@@ -185,7 +201,9 b' def _verify(repo):'
185 201 storefiles.add(f)
186 202
187 203 files = sorted(set(filenodes) | set(filelinkrevs))
188 for f in files:
204 total = len(files)
205 for i, f in enumerate(files):
206 ui.progress('files', i, item=f, total=total)
189 207 try:
190 208 linkrevs = filelinkrevs[f]
191 209 except KeyError:
@@ -263,6 +281,7 b' def _verify(repo):'
263 281 fns = [(lr, n) for n, lr in filenodes[f].iteritems()]
264 282 for lr, node in sorted(fns):
265 283 err(lr, _("%s in manifests not found") % short(node), f)
284 ui.progress('files', None)
266 285
267 286 for f in storefiles:
268 287 warn(_("warning: orphan revlog '%s'") % f)
General Comments 0
You need to be logged in to leave comments. Login now