Show More
@@ -1310,12 +1310,17 b' class localrepository:' | |||||
1310 | filenodes = {} |
|
1310 | filenodes = {} | |
1311 | changesets = revisions = files = 0 |
|
1311 | changesets = revisions = files = 0 | |
1312 | errors = 0 |
|
1312 | errors = 0 | |
|
1313 | neededmanifests = {} | |||
1313 |
|
1314 | |||
1314 | seen = {} |
|
1315 | seen = {} | |
1315 | self.ui.status("checking changesets\n") |
|
1316 | self.ui.status("checking changesets\n") | |
1316 | for i in range(self.changelog.count()): |
|
1317 | for i in range(self.changelog.count()): | |
1317 | changesets += 1 |
|
1318 | changesets += 1 | |
1318 | n = self.changelog.node(i) |
|
1319 | n = self.changelog.node(i) | |
|
1320 | l = self.changelog.linkrev(n) | |||
|
1321 | if l != i: | |||
|
1322 | self.ui.warn("incorrect linkrev (%d) for changeset revision %d" | |||
|
1323 | % (l, i)) | |||
1319 | if n in seen: |
|
1324 | if n in seen: | |
1320 | self.ui.warn("duplicate changeset at revision %d\n" % i) |
|
1325 | self.ui.warn("duplicate changeset at revision %d\n" % i) | |
1321 | errors += 1 |
|
1326 | errors += 1 | |
@@ -1332,6 +1337,8 b' class localrepository:' | |||||
1332 | self.ui.warn("unpacking changeset %s: %s\n" % (short(n), inst)) |
|
1337 | self.ui.warn("unpacking changeset %s: %s\n" % (short(n), inst)) | |
1333 | errors += 1 |
|
1338 | errors += 1 | |
1334 |
|
1339 | |||
|
1340 | neededmanifests[changes[0]] = n | |||
|
1341 | ||||
1335 | for f in changes[3]: |
|
1342 | for f in changes[3]: | |
1336 | filelinkrevs.setdefault(f, []).append(i) |
|
1343 | filelinkrevs.setdefault(f, []).append(i) | |
1337 |
|
1344 | |||
@@ -1339,6 +1346,16 b' class localrepository:' | |||||
1339 | self.ui.status("checking manifests\n") |
|
1346 | self.ui.status("checking manifests\n") | |
1340 | for i in range(self.manifest.count()): |
|
1347 | for i in range(self.manifest.count()): | |
1341 | n = self.manifest.node(i) |
|
1348 | n = self.manifest.node(i) | |
|
1349 | l = self.manifest.linkrev(n) | |||
|
1350 | ||||
|
1351 | if l < 0 or l >= self.changelog.count(): | |||
|
1352 | self.ui.warn("bad manifest link (%d) at revision %d\n" % | |||
|
1353 | (l, i)) | |||
|
1354 | errors += 1 | |||
|
1355 | ||||
|
1356 | if n in neededmanifests: | |||
|
1357 | del neededmanifests[n] | |||
|
1358 | ||||
1342 | if n in seen: |
|
1359 | if n in seen: | |
1343 | self.ui.warn("duplicate manifest at revision %d\n" % i) |
|
1360 | self.ui.warn("duplicate manifest at revision %d\n" % i) | |
1344 | errors += 1 |
|
1361 | errors += 1 | |
@@ -1365,6 +1382,13 b' class localrepository:' | |||||
1365 | filenodes.setdefault(f, {})[bin(fn[:40])] = 1 |
|
1382 | filenodes.setdefault(f, {})[bin(fn[:40])] = 1 | |
1366 |
|
1383 | |||
1367 | self.ui.status("crosschecking files in changesets and manifests\n") |
|
1384 | self.ui.status("crosschecking files in changesets and manifests\n") | |
|
1385 | ||||
|
1386 | for m,c in neededmanifests.items(): | |||
|
1387 | self.ui.warn("Changeset %s refers to unknown manifest %s\n" | |||
|
1388 | % (m, c)) | |||
|
1389 | errors += 1 | |||
|
1390 | del neededmanifests | |||
|
1391 | ||||
1368 | for f in filenodes: |
|
1392 | for f in filenodes: | |
1369 | if f not in filelinkrevs: |
|
1393 | if f not in filelinkrevs: | |
1370 | self.ui.warn("file %s in manifest but not in changesets\n" % f) |
|
1394 | self.ui.warn("file %s in manifest but not in changesets\n" % f) |
General Comments 0
You need to be logged in to leave comments.
Login now