Mercurial > hg
comparison hgext/narrow/narrowcommands.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 | 090fc6a95e50 |
children | 6000f5b25c9b |
comparison
equal
deleted
inserted
replaced
47876:517a2c1cb788 | 47877:2174f54aab18 |
---|---|
287 ui.status(_(b'deleting unwanted changesets\n')) | 287 ui.status(_(b'deleting unwanted changesets\n')) |
288 with ui.configoverride(overrides, b'narrow'): | 288 with ui.configoverride(overrides, b'narrow'): |
289 repair.strip(ui, unfi, tostrip, topic=b'narrow', backup=backup) | 289 repair.strip(ui, unfi, tostrip, topic=b'narrow', backup=backup) |
290 | 290 |
291 todelete = [] | 291 todelete = [] |
292 for t, f, f2, size in repo.store.datafiles(): | 292 for t, f, size in repo.store.datafiles(): |
293 if f.startswith(b'data/'): | 293 if f.startswith(b'data/'): |
294 file = f[5:-2] | 294 file = f[5:-2] |
295 if not newmatch(file): | 295 if not newmatch(file): |
296 todelete.append(f) | 296 todelete.append(f) |
297 elif f.startswith(b'meta/'): | 297 elif f.startswith(b'meta/'): |