# HG changeset patch # User Pierre-Yves David # Date 1685359741 -7200 # Node ID 309cbd8400ae702d8b64868a904e68ee49434e36 # Parent 3ea3767c23a455d5472b8f2deb6ae95f2c6fd758 store: properly compute the targer_id of manifestlog in no-fncache walk Creating RevlogStoreEntry is good, but we need to drop the final `00manifest` part to create something correct. diff -r 3ea3767c23a4 -r 309cbd8400ae mercurial/store.py --- a/mercurial/store.py Mon May 29 13:28:33 2023 +0200 +++ b/mercurial/store.py Mon May 29 13:29:01 2023 +0200 @@ -680,15 +680,18 @@ be a list and the filenames that can't be decoded are added to it instead. This is very rarely needed.""" dirs = [ - (b'data', FILEFLAGS_FILELOG), - (b'meta', FILEFLAGS_MANIFESTLOG), + (b'data', FILEFLAGS_FILELOG, False), + (b'meta', FILEFLAGS_MANIFESTLOG, True), ] - for base_dir, rl_type in dirs: + for base_dir, rl_type, strip_filename in dirs: files = self._walk(base_dir, True, undecodable=undecodable) files = (f for f in files if f[1][0] is not None) for revlog, details in _gather_revlog(files): file_details = {} revlog_target_id = revlog.split(b'/', 1)[1] + if strip_filename and b'/' in revlog: + revlog_target_id = revlog_target_id.rsplit(b'/', 1)[0] + revlog_target_id += b'/' for ext, (t, s) in sorted(details.items()): file_details[ext] = { 'is_volatile': bool(t & FILEFLAGS_VOLATILE),