changeset 49538:5743e19bb8b0 stable

dirstate-v2: update constant that wasn't kept in sync Despite the best efforts of the comment, this constant wasn't kept in sync when the flags were being rewritten. The fact that this doesn't actually break anything in the Rust implementation too much (which does use directories) relies on the fact that all nodes can have children and that dirstate traversal is not based on that flag, but for metadata in optimizations. However the bug could become more serious should we start encoding stronger guarantees using a combination of flags including this one.
author Raphaël Gomès <rgomes@octobus.net>
date Fri, 04 Nov 2022 14:52:16 -0400
parents 3556f0392808
children 07b9ca52a378
files mercurial/dirstateutils/v2.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/dirstateutils/v2.py	Tue Oct 18 13:56:45 2022 -0400
+++ b/mercurial/dirstateutils/v2.py	Fri Nov 04 14:52:16 2022 -0400
@@ -56,7 +56,7 @@
 assert NODE_SIZE == NODE.size
 
 # match constant in mercurial/pure/parsers.py
-DIRSTATE_V2_DIRECTORY = 1 << 5
+DIRSTATE_V2_DIRECTORY = 1 << 13
 
 
 def parse_dirstate(map, copy_map, data, tree_metadata):