Show More
@@ -454,13 +454,17 b' elif cmd == "verify":' | |||||
454 | errors += 1 |
|
454 | errors += 1 | |
455 |
|
455 | |||
456 | try: |
|
456 | try: | |
457 |
|
|
457 | delta = mdiff.patchtext(repo.manifest.delta(n)) | |
|
458 | except KeyboardInterrupt: | |||
|
459 | print "aborted" | |||
|
460 | sys.exit(0) | |||
458 | except Exception, inst: |
|
461 | except Exception, inst: | |
459 | ui.warn("unpacking manifest %s: %s\n" % (hg.short(n), inst)) |
|
462 | ui.warn("unpacking manifest %s: %s\n" % (hg.short(n), inst)) | |
460 | errors += 1 |
|
463 | errors += 1 | |
461 |
|
464 | |||
462 | for f, fn in m.items(): |
|
465 | ff = [ l.split('\0') for l in delta.splitlines() ] | |
463 | filenodes.setdefault(f, {})[fn] = 1 |
|
466 | for f, fn in ff: | |
|
467 | filenodes.setdefault(f, {})[hg.bin(fn)] = 1 | |||
464 |
|
468 | |||
465 | ui.status("crosschecking files in changesets and manifests\n") |
|
469 | ui.status("crosschecking files in changesets and manifests\n") | |
466 | for f in filenodes: |
|
470 | for f in filenodes: | |
@@ -470,11 +474,14 b' elif cmd == "verify":' | |||||
470 |
|
474 | |||
471 | for f in filelinkrevs: |
|
475 | for f in filelinkrevs: | |
472 | if f not in filenodes: |
|
476 | if f not in filenodes: | |
473 | ui.warn("file %s in changeset but not in manifest" % f) |
|
477 | ui.warn("file %s in changeset but not in manifest\n" % f) | |
474 | errors += 1 |
|
478 | errors += 1 | |
475 |
|
479 | |||
476 | ui.status("checking files\n") |
|
480 | ui.status("checking files\n") | |
477 |
f |
|
481 | ff = filenodes.keys() | |
|
482 | ff.sort() | |||
|
483 | for f in ff: | |||
|
484 | if f == "/dev/null": continue | |||
478 | files += 1 |
|
485 | files += 1 | |
479 | fl = repo.file(f) |
|
486 | fl = repo.file(f) | |
480 | nodes = { hg.nullid: 1 } |
|
487 | nodes = { hg.nullid: 1 } | |
@@ -482,7 +489,8 b' elif cmd == "verify":' | |||||
482 | n = fl.node(i) |
|
489 | n = fl.node(i) | |
483 |
|
490 | |||
484 | if n not in filenodes[f]: |
|
491 | if n not in filenodes[f]: | |
485 | ui.warn("%s:%s not in manifests\n" % (f, hg.short(n))) |
|
492 | ui.warn("%s: %d:%s not in manifests\n" % (f, i, hg.short(n))) | |
|
493 | print len(filenodes[f].keys()), fl.count(), f | |||
486 | errors += 1 |
|
494 | errors += 1 | |
487 | else: |
|
495 | else: | |
488 | del filenodes[f][n] |
|
496 | del filenodes[f][n] |
General Comments 0
You need to be logged in to leave comments.
Login now