Mercurial > public > mercurial-scm > hg
comparison mercurial/revlogutils/rewrite.py @ 47877:2174f54aab18
store: return just one filename in walk functions
Various walk functions return `(revlog_type, decoded, encoded)` where
decoded could be None. But no-one cares about `encoded` and expects
`unencoded` to be present, except verify (because this can only happen
with old repo formats).
Simplify all this by either failing outright if a decoding a filename
fails (instead of almost certainly failing with a type error due to
treating None as a bytes), or skipping the filename but providing in
an out argument for hg verify.
Differential Revision: https://phab.mercurial-scm.org/D11248
author | Valentin Gatien-Baron <valentin.gatienbaron@gmail.com> |
---|---|
date | Mon, 02 Aug 2021 08:05:13 -0400 |
parents | c30ca163b45e |
children | 96aa3a68d3b5 |
comparison
equal
deleted
inserted
replaced
47876:517a2c1cb788 | 47877:2174f54aab18 |
---|---|
822 report_entries = [] | 822 report_entries = [] |
823 | 823 |
824 with context(): | 824 with context(): |
825 files = list( | 825 files = list( |
826 (file_type, path) | 826 (file_type, path) |
827 for (file_type, path, _e, _s) in repo.store.datafiles() | 827 for (file_type, path, _s) in repo.store.datafiles() |
828 if path.endswith(b'.i') and file_type & store.FILEFLAGS_FILELOG | 828 if path.endswith(b'.i') and file_type & store.FILEFLAGS_FILELOG |
829 ) | 829 ) |
830 | 830 |
831 progress = ui.makeprogress( | 831 progress = ui.makeprogress( |
832 _(b"looking for affected revisions"), | 832 _(b"looking for affected revisions"), |