287 with ui.configoverride(overrides, b'narrow'): |
288 with ui.configoverride(overrides, b'narrow'): |
288 repair.strip(ui, unfi, tostrip, topic=b'narrow', backup=backup) |
289 repair.strip(ui, unfi, tostrip, topic=b'narrow', backup=backup) |
289 |
290 |
290 todelete = [] |
291 todelete = [] |
291 for entry in repo.store.datafiles(): |
292 for entry in repo.store.datafiles(): |
292 f = entry.unencoded_path |
293 if not entry.is_revlog: |
293 if f.startswith(b'data/'): |
294 continue |
294 file = f[5:-2] |
295 if entry.revlog_type == store.FILEFLAGS_FILELOG: |
295 if not newmatch(file): |
296 if not newmatch(entry.target_id): |
296 for file_ in entry.files(): |
297 for file_ in entry.files(): |
297 todelete.append(file_.unencoded_path) |
298 todelete.append(file_.unencoded_path) |
298 elif f.startswith(b'meta/'): |
299 elif entry.revlog_type == store.FILEFLAGS_MANIFESTLOG: |
299 dir = f[5:-13] |
300 dir = entry.target_id |
300 dirs = sorted(pathutil.dirs({dir})) + [dir] |
301 dirs = sorted(pathutil.dirs({dir})) + [dir] |
301 include = True |
302 include = True |
302 for d in dirs: |
303 for d in dirs: |
303 visit = newmatch.visitdir(d) |
304 visit = newmatch.visitdir(d) |
304 if not visit: |
305 if not visit: |