# HG changeset patch # User Matt Harbison # Date 2021-06-12 04:50:03 # Node ID 5e44936b82bee32c1285eb04439cdf9a50a6714d # Parent c887bab2dccfd806e8fd8b5a1839a9249317fe8b revlog: fix a typo closing the wrong file Caught by pytype as possibly being None, but the file is closed in the previous conditional. Differential Revision: https://phab.mercurial-scm.org/D10874 diff --git a/mercurial/revlog.py b/mercurial/revlog.py --- a/mercurial/revlog.py +++ b/mercurial/revlog.py @@ -2243,7 +2243,7 @@ class revlog(object): 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: