mmap: fix another instance of reverse mmap logic in persistent nodemap
This fix the same kind of issue as
85d96517e650
--- 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)