Mercurial > public > mercurial-scm > hg-stable
diff mercurial/dirstateutils/v2.py @ 48275:bb240915f69f
dirstate-v2: adjust the meaning of directory flags
Tracking directory "explicitly" give use the opportunity to distinct between
entry that are untracked because they are part of the directory structure and
entry that are ignored/unknown files on the files system.
The help is adjusted to the new semantic and the code now comply to it for both
read and write.
Differential Revision: https://phab.mercurial-scm.org/D11694
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 19 Oct 2021 18:18:05 +0200 |
parents | 83d0bd45b662 |
children | 46d12f7762e4 434de12918fd |
line wrap: on
line diff
--- a/mercurial/dirstateutils/v2.py Wed Oct 13 15:58:14 2021 +0200 +++ b/mercurial/dirstateutils/v2.py Tue Oct 19 18:18:05 2021 +0200 @@ -56,6 +56,9 @@ assert TREE_METADATA_SIZE == TREE_METADATA.size assert NODE_SIZE == NODE.size +# match constant in mercurial/pure/parsers.py +DIRSTATE_V2_DIRECTORY = 1 << 5 + def parse_dirstate(map, copy_map, data, tree_metadata): """parse a full v2-dirstate from a binary data into dictionnaries: @@ -83,7 +86,7 @@ This is used by parse_dirstate to recursively fill `map` and `copy_map`. All directory specific information is ignored and do not need any - processing (HAS_DIRECTORY_MTIME, ALL_UNKNOWN_RECORDED, ALL_IGNORED_RECORDED) + processing (DIRECTORY, ALL_UNKNOWN_RECORDED, ALL_IGNORED_RECORDED) """ for i in range(len): node_start = start + NODE_SIZE * i @@ -150,7 +153,7 @@ flags, size, mtime_s, mtime_ns = entry.v2_data() else: # There are no mtime-cached directories in the Python implementation - flags = 0 + flags = DIRSTATE_V2_DIRECTORY size = 0 mtime_s = 0 mtime_ns = 0