##// END OF EJS Templates
hg: make _local() behave consistently on Python 3.8 (issue6287)...
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

File last commit:

r40013:74da9d99 default
r45061:6a8738dc default
Show More
lib.rs
23 lines | 535 B | application/rls-services+xml | RustLexer
// Copyright 2018 Yuya Nishihara <yuya@tcha.org>
//
// This software may be used and distributed according to the terms of the
// GNU General Public License version 2 or any later version.
extern crate bytes;
#[macro_use]
extern crate futures;
extern crate libc;
extern crate tokio;
extern crate tokio_hglib;
extern crate tokio_process;
mod attachio;
mod clientext;
pub mod locator;
pub mod message;
pub mod procutil;
mod runcommand;
mod uihandler;
pub use clientext::ChgClientExt;
pub use uihandler::{ChgUiHandler, SystemHandler};