Show More
@@ -564,9 +564,10 b' class basicstore:' | |||||
564 | rl_type = is_revlog(f, kind, st) |
|
564 | rl_type = is_revlog(f, kind, st) | |
565 | if rl_type is not None: |
|
565 | if rl_type is not None: | |
566 | n = util.pconvert(fp[striplen:]) |
|
566 | n = util.pconvert(fp[striplen:]) | |
567 |
l.append(( |
|
567 | l.append((decodedir(n), (rl_type, st.st_size))) | |
568 | elif kind == stat.S_IFDIR and recurse: |
|
568 | elif kind == stat.S_IFDIR and recurse: | |
569 | visit.append(fp) |
|
569 | visit.append(fp) | |
|
570 | ||||
570 | l.sort() |
|
571 | l.sort() | |
571 | return l |
|
572 | return l | |
572 |
|
573 | |||
@@ -591,7 +592,7 b' class basicstore:' | |||||
591 | be a list and the filenames that can't be decoded are added |
|
592 | be a list and the filenames that can't be decoded are added | |
592 | to it instead. This is very rarely needed.""" |
|
593 | to it instead. This is very rarely needed.""" | |
593 | files = self._walk(b'data', True) + self._walk(b'meta', True) |
|
594 | files = self._walk(b'data', True) + self._walk(b'meta', True) | |
594 |
for (t |
|
595 | for u, (t, s) in files: | |
595 | if t is not None: |
|
596 | if t is not None: | |
596 | yield RevlogStoreEntry( |
|
597 | yield RevlogStoreEntry( | |
597 | unencoded_path=u, |
|
598 | unencoded_path=u, | |
@@ -603,8 +604,11 b' class basicstore:' | |||||
603 |
|
604 | |||
604 | def topfiles(self) -> Generator[BaseStoreEntry, None, None]: |
|
605 | def topfiles(self) -> Generator[BaseStoreEntry, None, None]: | |
605 | # yield manifest before changelog |
|
606 | # yield manifest before changelog | |
606 |
files = |
|
607 | files = self._walk(b'', False) | |
607 | for (t, u, s) in files: |
|
608 | # key is (type, path) (keeping ordering so we get 00changelog.i last) | |
|
609 | type_key = lambda x: (x[1][0], x[0]) | |||
|
610 | files = sorted(files, reverse=True, key=type_key) | |||
|
611 | for u, (t, s) in files: | |||
608 | if u.startswith(b'00changelog'): |
|
612 | if u.startswith(b'00changelog'): | |
609 | yield RevlogStoreEntry( |
|
613 | yield RevlogStoreEntry( | |
610 | unencoded_path=u, |
|
614 | unencoded_path=u, |
General Comments 0
You need to be logged in to leave comments.
Login now