Skip to content
Snippets Groups Projects
Commit 6a8738dc4a01 authored by Augie Fackler's avatar Augie Fackler
Browse files

hg: make _local() behave consistently on Python 3.8 (issue6287)

Python 3.8 makes os.path.isfile quietly eat "path invalid" errors and
return False instead of allowing the exception to propagate. Given
that this is a change from 2018 (sigh) and it's mentioned in the
release notes (double sigh) we're definitely too late to complain to
Python about the behavior change, so open-code part of
os.path.isfile() in this method so we can catch invalid-path errors
and handle them appropriately. I confirmed that posixpath and ntpath
both delegate to genericpath, which uses os.stat() under the covers.

Differential Revision: https://phab.mercurial-scm.org/D8302
parent 9e63108123a4
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment