equal
deleted
inserted
replaced
826 with context(): |
826 with context(): |
827 files = list( |
827 files = list( |
828 entry |
828 entry |
829 for entry in repo.store.datafiles() |
829 for entry in repo.store.datafiles() |
830 if ( |
830 if ( |
831 entry.unencoded_path.endswith(b'.i') |
831 entry.is_revlog |
832 and entry.is_revlog |
832 and entry.is_revlog_main |
833 and entry.revlog_type == store.FILEFLAGS_FILELOG |
833 and entry.revlog_type == store.FILEFLAGS_FILELOG |
834 ) |
834 ) |
835 ) |
835 ) |
836 |
836 |
837 progress = ui.makeprogress( |
837 progress = ui.makeprogress( |
840 total=len(files), |
840 total=len(files), |
841 ) |
841 ) |
842 found_nothing = True |
842 found_nothing = True |
843 |
843 |
844 for entry in files: |
844 for entry in files: |
845 path = entry.unencoded_path |
|
846 progress.increment() |
845 progress.increment() |
847 filename = _get_filename_from_filelog_index(path) |
846 filename = entry.target_id |
848 fl = _filelog_from_filename(repo, filename) |
847 fl = _filelog_from_filename(repo, entry.target_id) |
849 |
848 |
850 # Set of filerevs (or hex filenodes if `to_report`) that need fixing |
849 # Set of filerevs (or hex filenodes if `to_report`) that need fixing |
851 to_fix = set() |
850 to_fix = set() |
852 metadata_cache = {} |
851 metadata_cache = {} |
853 for filerev in fl.revs(): |
852 for filerev in fl.revs(): |
859 if slow != affected: |
858 if slow != affected: |
860 msg = _(b"paranoid check failed for '%s' at node %s") |
859 msg = _(b"paranoid check failed for '%s' at node %s") |
861 node = binascii.hexlify(fl.node(filerev)) |
860 node = binascii.hexlify(fl.node(filerev)) |
862 raise error.Abort(msg % (filename, node)) |
861 raise error.Abort(msg % (filename, node)) |
863 if affected: |
862 if affected: |
864 msg = b"found affected revision %d for filelog '%s'\n" |
863 msg = b"found affected revision %d for file '%s'\n" |
865 ui.warn(msg % (filerev, path)) |
864 ui.warn(msg % (filerev, filename)) |
866 found_nothing = False |
865 found_nothing = False |
867 if not dry_run: |
866 if not dry_run: |
868 if to_report: |
867 if to_report: |
869 to_fix.add(binascii.hexlify(fl.node(filerev))) |
868 to_fix.add(binascii.hexlify(fl.node(filerev))) |
870 else: |
869 else: |