##// END OF EJS Templates
store: use StoreEntry API instead of parsing filename in narrow...
marmoute -
r51762:17a822d7 default
parent child Browse files
Show More
@@ -31,6 +31,7 b' from mercurial import ('
31 repoview,
31 repoview,
32 requirements,
32 requirements,
33 sparse,
33 sparse,
34 store,
34 util,
35 util,
35 wireprototypes,
36 wireprototypes,
36 )
37 )
@@ -289,14 +290,14 b' def _narrow('
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:
General Comments 0
You need to be logged in to leave comments. Login now