Show More
@@ -639,18 +639,23 b' class basicstore:' | |||
|
639 | 639 | decoded cause an exception. When it is provided, it should |
|
640 | 640 | be a list and the filenames that can't be decoded are added |
|
641 | 641 | to it instead. This is very rarely needed.""" |
|
642 | files = self._walk(b'data', True) + self._walk(b'meta', True) | |
|
643 | files = (f for f in files if f[1][0] is not None) | |
|
644 | for revlog, details in _gather_revlog(files): | |
|
645 | for ext, (t, s) in sorted(details.items()): | |
|
646 | u = revlog + ext | |
|
647 | yield RevlogStoreEntry( | |
|
648 | unencoded_path=u, | |
|
649 | revlog_type=FILEFLAGS_FILELOG, | |
|
650 | is_revlog_main=bool(t & FILEFLAGS_REVLOG_MAIN), | |
|
651 | is_volatile=bool(t & FILEFLAGS_VOLATILE), | |
|
652 |
|
|
|
653 | ) | |
|
642 | dirs = [ | |
|
643 | (b'data', FILEFLAGS_FILELOG), | |
|
644 | (b'meta', FILEFLAGS_MANIFESTLOG), | |
|
645 | ] | |
|
646 | for base_dir, rl_type in dirs: | |
|
647 | files = self._walk(base_dir, True) | |
|
648 | files = (f for f in files if f[1][0] is not None) | |
|
649 | for revlog, details in _gather_revlog(files): | |
|
650 | for ext, (t, s) in sorted(details.items()): | |
|
651 | u = revlog + ext | |
|
652 | yield RevlogStoreEntry( | |
|
653 | unencoded_path=u, | |
|
654 | revlog_type=rl_type, | |
|
655 | is_revlog_main=bool(t & FILEFLAGS_REVLOG_MAIN), | |
|
656 | is_volatile=bool(t & FILEFLAGS_VOLATILE), | |
|
657 | file_size=s, | |
|
658 | ) | |
|
654 | 659 | |
|
655 | 660 | def topfiles(self) -> Generator[BaseStoreEntry, None, None]: |
|
656 | 661 | files = reversed(self._walk(b'', False)) |
@@ -968,13 +973,20 b' class fncachestore(basicstore):' | |||
|
968 | 973 | files = (f for f in files if f[1] is not None) |
|
969 | 974 | by_revlog = _gather_revlog(files) |
|
970 | 975 | for revlog, details in by_revlog: |
|
976 | if revlog.startswith(b'data/'): | |
|
977 | rl_type = FILEFLAGS_FILELOG | |
|
978 | elif revlog.startswith(b'meta/'): | |
|
979 | rl_type = FILEFLAGS_MANIFESTLOG | |
|
980 | else: | |
|
981 | # unreachable | |
|
982 | assert False, revlog | |
|
971 | 983 | for ext, t in sorted(details.items()): |
|
972 | 984 | f = revlog + ext |
|
973 | 985 | if not _matchtrackedpath(f, matcher): |
|
974 | 986 | continue |
|
975 | 987 | yield RevlogStoreEntry( |
|
976 | 988 | unencoded_path=f, |
|
977 |
revlog_type= |
|
|
989 | revlog_type=rl_type, | |
|
978 | 990 | is_revlog_main=bool(t & FILEFLAGS_REVLOG_MAIN), |
|
979 | 991 | is_volatile=bool(t & FILEFLAGS_VOLATILE), |
|
980 | 992 | ) |
General Comments 0
You need to be logged in to leave comments.
Login now