diff mercurial/repair.py @ 45872:ec73a6a75985

transaction: split new files into a separate set Journal entries with size 0 are common as they represent new revlog files. Move them from the dictionary into a set as the former is more dense. This reduces peak RSS by 70MB for the NetBSD test repository with around 450k files under .hg/store. Differential Revision: https://phab.mercurial-scm.org/D9278
author Joerg Sonnenberger <joerg@bec.de>
date Sat, 07 Nov 2020 22:31:29 +0100
parents a985c4fb23ca
children beaa233e81f7
line wrap: on
line diff
--- a/mercurial/repair.py	Sat Nov 07 21:34:09 2020 +0100
+++ b/mercurial/repair.py	Sat Nov 07 22:31:29 2020 +0100
@@ -210,6 +210,7 @@
                 # using append-only files. We'll need some kind of storage
                 # API to handle stripping for us.
                 oldfiles = set(tr._offsetmap.keys())
+                oldfiles.update(tr._newfiles)
 
                 tr.startgroup()
                 cl.strip(striprev, tr)