[Request] [+ ] D10874: revlog: fix a typo closing the wrong file

mharbison72 (Matt Harbison) phabricator at mercurial-scm.org
Sat Jun 12 04:57:33 UTC 2021


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

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:



To: mharbison72, indygreg, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20210612/cc4f2d07/attachment.html>


More information about the Mercurial-patches mailing list