diff -r c887bab2dccf -r 5e44936b82be mercurial/revlog.py --- a/mercurial/revlog.py Fri Jun 11 23:57:14 2021 -0400 +++ b/mercurial/revlog.py Sat Jun 12 00:50:03 2021 -0400 @@ -2243,7 +2243,7 @@ if dfh is not None: dfh.close() if sdfh is not None: - dfh.close() + sdfh.close() # closing the index file last to avoid exposing referent to # potential unflushed data content. if ifh is not None: