Mercurial > hg
comparison hgext/narrow/narrowcommands.py @ 50499:7a1a0a236187
store: use the new boolean property in `narrow`
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 15 May 2023 22:10:04 +0200 |
parents | 17a822d7943e |
children | 862e3a13da44 |
comparison
equal
deleted
inserted
replaced
50498:1b776f25302f | 50499:7a1a0a236187 |
---|---|
29 registrar, | 29 registrar, |
30 repair, | 30 repair, |
31 repoview, | 31 repoview, |
32 requirements, | 32 requirements, |
33 sparse, | 33 sparse, |
34 store, | |
35 util, | 34 util, |
36 wireprototypes, | 35 wireprototypes, |
37 ) | 36 ) |
38 from mercurial.utils import ( | 37 from mercurial.utils import ( |
39 urlutil, | 38 urlutil, |
290 | 289 |
291 todelete = [] | 290 todelete = [] |
292 for entry in repo.store.datafiles(): | 291 for entry in repo.store.datafiles(): |
293 if not entry.is_revlog: | 292 if not entry.is_revlog: |
294 continue | 293 continue |
295 if entry.revlog_type == store.FILEFLAGS_FILELOG: | 294 if entry.is_filelog: |
296 if not newmatch(entry.target_id): | 295 if not newmatch(entry.target_id): |
297 for file_ in entry.files(): | 296 for file_ in entry.files(): |
298 todelete.append(file_.unencoded_path) | 297 todelete.append(file_.unencoded_path) |
299 elif entry.revlog_type == store.FILEFLAGS_MANIFESTLOG: | 298 elif entry.is_manifestlog: |
300 dir = entry.target_id | 299 dir = entry.target_id |
301 dirs = sorted(pathutil.dirs({dir})) + [dir] | 300 dirs = sorted(pathutil.dirs({dir})) + [dir] |
302 include = True | 301 include = True |
303 for d in dirs: | 302 for d in dirs: |
304 visit = newmatch.visitdir(d) | 303 visit = newmatch.visitdir(d) |