comparison hgext/narrow/narrowcommands.py @ 46895:6085b7f1536d

store: also return some information about the type of file `walk` found We start returning of 4th information in the `store.walk` return tuple: the type of the file. This will make it easier for caller to determine which kind of file they are looking at. This should especically help with the `upgrade-repo` code that has to do a lot of fragile index's file name comparison. Differential Revision: https://phab.mercurial-scm.org/D10315
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 06 Apr 2021 10:38:03 +0200
parents a4c19a162615
children ffd3e823a7e5
comparison
equal deleted inserted replaced
46894:fe34c75f62ab 46895:6085b7f1536d
274 overrides = {(b'devel', b'strip-obsmarkers'): False} 274 overrides = {(b'devel', b'strip-obsmarkers'): False}
275 with ui.configoverride(overrides, b'narrow'): 275 with ui.configoverride(overrides, b'narrow'):
276 repair.strip(ui, unfi, tostrip, topic=b'narrow', backup=backup) 276 repair.strip(ui, unfi, tostrip, topic=b'narrow', backup=backup)
277 277
278 todelete = [] 278 todelete = []
279 for f, f2, size in repo.store.datafiles(): 279 for t, f, f2, size in repo.store.datafiles():
280 if f.startswith(b'data/'): 280 if f.startswith(b'data/'):
281 file = f[5:-2] 281 file = f[5:-2]
282 if not newmatch(file): 282 if not newmatch(file):
283 todelete.append(f) 283 todelete.append(f)
284 elif f.startswith(b'meta/'): 284 elif f.startswith(b'meta/'):