changeset 51652:8e24f4f86ba8 stable

mmap: fix another instance of reverse mmap logic in persistent nodemap This fix the same kind of issue as 85d96517e650
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 03 Jul 2024 12:47:08 +0200
parents c0e30a019ce1
children 21442f87f7fa
files mercurial/revlogutils/nodemap.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revlogutils/nodemap.py	Wed Jul 03 12:31:21 2024 +0200
+++ b/mercurial/revlogutils/nodemap.py	Wed Jul 03 12:47:08 2024 +0200
@@ -239,10 +239,10 @@
             fd.write(data)
             if feed_data:
                 if use_mmap:
-                    new_data = data
-                else:
                     fd.flush()
                     new_data = util.buffer(util.mmapread(fd, len(data)))
+                else:
+                    new_data = data
         target_docket.data_length = len(data)
     target_docket.tip_rev = revlog.tiprev()
     target_docket.tip_node = revlog.node(target_docket.tip_rev)