Show More
@@ -141,7 +141,6 b' class verifier(object):' | |||||
141 | badrevs = self.badrevs |
|
141 | badrevs = self.badrevs | |
142 | ui = repo.ui |
|
142 | ui = repo.ui | |
143 | cl = repo.changelog |
|
143 | cl = repo.changelog | |
144 | mf = repo.manifest |
|
|||
145 |
|
144 | |||
146 | if not repo.url().startswith('file:'): |
|
145 | if not repo.url().startswith('file:'): | |
147 | raise error.Abort(_("cannot verify bundle or remote repos")) |
|
146 | raise error.Abort(_("cannot verify bundle or remote repos")) | |
@@ -176,6 +175,32 b' class verifier(object):' | |||||
176 | self.exc(i, _("unpacking changeset %s") % short(n), inst) |
|
175 | self.exc(i, _("unpacking changeset %s") % short(n), inst) | |
177 | ui.progress(_('checking'), None) |
|
176 | ui.progress(_('checking'), None) | |
178 |
|
177 | |||
|
178 | self._verifymanifest(mflinkrevs, filenodes) | |||
|
179 | ||||
|
180 | self._crosscheckfiles(mflinkrevs, filelinkrevs, filenodes) | |||
|
181 | ||||
|
182 | totalfiles, filerevisions = self._verifyfiles(filenodes, filelinkrevs) | |||
|
183 | revisions += filerevisions | |||
|
184 | ||||
|
185 | ui.status(_("%d files, %d changesets, %d total revisions\n") % | |||
|
186 | (totalfiles, len(cl), revisions)) | |||
|
187 | if self.warnings: | |||
|
188 | ui.warn(_("%d warnings encountered!\n") % self.warnings) | |||
|
189 | if self.fncachewarned: | |||
|
190 | ui.warn(_('hint: run "hg debugrebuildfncache" to recover from ' | |||
|
191 | 'corrupt fncache\n')) | |||
|
192 | if self.errors: | |||
|
193 | ui.warn(_("%d integrity errors encountered!\n") % self.errors) | |||
|
194 | if badrevs: | |||
|
195 | ui.warn(_("(first damaged changeset appears to be %d)\n") | |||
|
196 | % min(badrevs)) | |||
|
197 | return 1 | |||
|
198 | ||||
|
199 | def _verifymanifest(self, mflinkrevs, filenodes): | |||
|
200 | repo = self.repo | |||
|
201 | ui = self.ui | |||
|
202 | mf = self.repo.manifest | |||
|
203 | ||||
179 | ui.status(_("checking manifests\n")) |
|
204 | ui.status(_("checking manifests\n")) | |
180 | seen = {} |
|
205 | seen = {} | |
181 | if self.refersmf: |
|
206 | if self.refersmf: | |
@@ -205,24 +230,7 b' class verifier(object):' | |||||
205 | self.exc(lr, _("reading manifest delta %s") % short(n), inst) |
|
230 | self.exc(lr, _("reading manifest delta %s") % short(n), inst) | |
206 | ui.progress(_('checking'), None) |
|
231 | ui.progress(_('checking'), None) | |
207 |
|
232 | |||
208 | self._crosscheckfiles(mflinkrevs, filelinkrevs, filenodes) |
|
233 | return mflinkrevs | |
209 |
|
||||
210 | totalfiles, filerevisions = self._verifyfiles(filenodes, filelinkrevs) |
|
|||
211 | revisions += filerevisions |
|
|||
212 |
|
||||
213 | ui.status(_("%d files, %d changesets, %d total revisions\n") % |
|
|||
214 | (totalfiles, len(cl), revisions)) |
|
|||
215 | if self.warnings: |
|
|||
216 | ui.warn(_("%d warnings encountered!\n") % self.warnings) |
|
|||
217 | if self.fncachewarned: |
|
|||
218 | ui.warn(_('hint: run "hg debugrebuildfncache" to recover from ' |
|
|||
219 | 'corrupt fncache\n')) |
|
|||
220 | if self.errors: |
|
|||
221 | ui.warn(_("%d integrity errors encountered!\n") % self.errors) |
|
|||
222 | if badrevs: |
|
|||
223 | ui.warn(_("(first damaged changeset appears to be %d)\n") |
|
|||
224 | % min(badrevs)) |
|
|||
225 | return 1 |
|
|||
226 |
|
234 | |||
227 | def _crosscheckfiles(self, mflinkrevs, filelinkrevs, filenodes): |
|
235 | def _crosscheckfiles(self, mflinkrevs, filelinkrevs, filenodes): | |
228 | repo = self.repo |
|
236 | repo = self.repo |
General Comments 0
You need to be logged in to leave comments.
Login now