# HG changeset patch # User Pierre-Yves David # Date 2024-07-03 10:47:08 # Node ID 8e24f4f86ba87db6cb462e24f285321fb474b41d # Parent c0e30a019ce14dedf4cee41146ee85a7e82e8c9b mmap: fix another instance of reverse mmap logic in persistent nodemap This fix the same kind of issue as 85d96517e650 diff --git a/mercurial/revlogutils/nodemap.py b/mercurial/revlogutils/nodemap.py --- a/mercurial/revlogutils/nodemap.py +++ b/mercurial/revlogutils/nodemap.py @@ -239,10 +239,10 @@ def persist_nodemap(tr, revlog, pending= 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)