From patchwork Sat Jun 12 04:57:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D10874: revlog: fix a typo closing the wrong file From: phabricator X-Patchwork-Id: 49194 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Sat, 12 Jun 2021 04:57:33 +0000 mharbison72 created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Caught by pytype as possibly being None, but the file is closed in the previous conditional. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10874 AFFECTED FILES mercurial/revlog.py CHANGE DETAILS To: mharbison72, indygreg, #hg-reviewers Cc: mercurial-patches, mercurial-devel diff --git a/mercurial/revlog.py b/mercurial/revlog.py --- a/mercurial/revlog.py +++ b/mercurial/revlog.py @@ -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: