Show More
@@ -33,7 +33,7 b" parsers = policy.importmod('parsers')" | |||
|
33 | 33 | fncache_chunksize = 10 ** 6 |
|
34 | 34 | |
|
35 | 35 | |
|
36 |
def _matchtracked |
|
|
36 | def _match_tracked_entry(entry, matcher): | |
|
37 | 37 | """parses a fncache entry and returns whether the entry is tracking a path |
|
38 | 38 | matched by matcher or not. |
|
39 | 39 | |
@@ -41,13 +41,11 b' def _matchtrackedpath(path, matcher):' | |||
|
41 | 41 | |
|
42 | 42 | if matcher is None: |
|
43 | 43 | return True |
|
44 | path = decodedir(path) | |
|
45 | if path.startswith(b'data/'): | |
|
46 | return matcher(path[len(b'data/') : -len(b'.i')]) | |
|
47 | elif path.startswith(b'meta/'): | |
|
48 | return matcher.visitdir(path[len(b'meta/') : -len(b'/00manifest.i')]) | |
|
49 | ||
|
50 | raise error.ProgrammingError(b"cannot decode path %s" % path) | |
|
44 | if entry.revlog_type == FILEFLAGS_FILELOG: | |
|
45 | return matcher(entry.target_id) | |
|
46 | elif entry.revlog_type == FILEFLAGS_MANIFESTLOG: | |
|
47 | return matcher.visitdir(entry.target_id.rstrip(b'/')) | |
|
48 | raise error.ProgrammingError(b"cannot process entry %r" % entry) | |
|
51 | 49 | |
|
52 | 50 | |
|
53 | 51 | # This avoids a collision between a file named foo and a dir named |
@@ -776,7 +774,7 b' class encodedstore(basicstore):' | |||
|
776 | 774 | ) -> Generator[BaseStoreEntry, None, None]: |
|
777 | 775 | entries = super(encodedstore, self).datafiles(undecodable=undecodable) |
|
778 | 776 | for entry in entries: |
|
779 |
if _matchtracked |
|
|
777 | if _match_tracked_entry(entry, matcher): | |
|
780 | 778 | yield entry |
|
781 | 779 | |
|
782 | 780 | def join(self, f): |
@@ -996,15 +994,15 b' class fncachestore(basicstore):' | |||
|
996 | 994 | assert False, revlog |
|
997 | 995 | for ext, t in sorted(details.items()): |
|
998 | 996 | f = revlog + ext |
|
999 | if not _matchtrackedpath(f, matcher): | |
|
1000 | continue | |
|
1001 | yield RevlogStoreEntry( | |
|
997 | entry = RevlogStoreEntry( | |
|
1002 | 998 | unencoded_path=f, |
|
1003 | 999 | revlog_type=rl_type, |
|
1004 | 1000 | target_id=revlog_target_id, |
|
1005 | 1001 | is_revlog_main=bool(t & FILEFLAGS_REVLOG_MAIN), |
|
1006 | 1002 | is_volatile=bool(t & FILEFLAGS_VOLATILE), |
|
1007 | 1003 | ) |
|
1004 | if _match_tracked_entry(entry, matcher): | |
|
1005 | yield entry | |
|
1008 | 1006 | |
|
1009 | 1007 | def copylist(self): |
|
1010 | 1008 | d = ( |
General Comments 0
You need to be logged in to leave comments.
Login now