dirstate-v2: update constant that wasn't kept in sync stable
authorRaphaël Gomès <rgomes@octobus.net>
Fri, 04 Nov 2022 14:52:16 -0400
branchstable
changeset 49546 5743e19bb8b0
parent 49545 3556f0392808
child 49547 07b9ca52a378
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.
mercurial/dirstateutils/v2.py
--- 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):