comparison mercurial/upgrade_utils/engine.py @ 47918: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 6b9ad3a0c348
children bf8837e3d7ce
comparison
equal deleted inserted replaced
47917:517a2c1cb788 47918:2174f54aab18
199 changelogs = {} 199 changelogs = {}
200 filelogs = {} 200 filelogs = {}
201 201
202 # Perform a pass to collect metadata. This validates we can open all 202 # Perform a pass to collect metadata. This validates we can open all
203 # source files and allows a unified progress bar to be displayed. 203 # source files and allows a unified progress bar to be displayed.
204 for rl_type, unencoded, encoded, size in alldatafiles: 204 for rl_type, unencoded, size in alldatafiles:
205 if not rl_type & store.FILEFLAGS_REVLOG_MAIN: 205 if not rl_type & store.FILEFLAGS_REVLOG_MAIN:
206 continue 206 continue
207 207
208 # the store.walk function will wrongly pickup transaction backup and 208 # the store.walk function will wrongly pickup transaction backup and
209 # get confused. As a quick fix for 5.9 release, we ignore those. 209 # get confused. As a quick fix for 5.9 release, we ignore those.