Mercurial > hg
changeset 38758:774f92710a81 stable
fileset: suppress EACCES while reading arbitrary paths via filectx API
On Windows, EACCES is raised in place of EISDIR. This patch simply adds
EACCES to the list of errors to be ignored since I think it's okay for
filesets to treat inaccessible working-copy files as not existing.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 29 Jul 2018 16:25:51 +0900 |
parents | d49e490a9e85 |
children | f8cbff2184d7 |
files | mercurial/fileset.py |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/fileset.py Fri Jul 27 14:56:10 2018 +0300 +++ b/mercurial/fileset.py Sun Jul 29 16:25:51 2018 +0900 @@ -592,7 +592,9 @@ try: return predfn(fctx) except (IOError, OSError) as e: - if e.errno in (errno.ENOENT, errno.ENOTDIR, errno.EISDIR): + # open()-ing a directory fails with EACCES on Windows + if e.errno in (errno.ENOENT, errno.EACCES, errno.ENOTDIR, + errno.EISDIR): return False raise else: