diff mercurial/dirstateutils/v2.py @ 49542:fc719967efd0 stable

dirstate-v2: fix edge case where entries aren't sorted See previous commit for more details.
author Rapha?l Gom?s <rgomes@octobus.net>
date Wed, 26 Oct 2022 18:46:56 +0200
parents 318bdd289cf2
children 278af66e6595
line wrap: on
line diff
--- a/mercurial/dirstateutils/v2.py	Wed Oct 26 18:24:34 2022 +0200
+++ b/mercurial/dirstateutils/v2.py	Wed Oct 26 18:46:56 2022 +0200
@@ -272,7 +272,7 @@
         )
         return data, tree_metadata
 
-    sorted_map = sorted(map.items(), key=lambda x: x[0])
+    sorted_map = sorted(map.items(), key=lambda x: x[0].split(b"/"))
 
     # Use a stack to have to only remember the nodes we currently need
     # instead of building the entire tree in memory