[Updated] D7944: localrepo: handle ValueError during repository opening
indygreg (Gregory Szorc)
phabricator at mercurial-scm.org
Tue Jun 9 11:51:56 UTC 2020
Closed by commit rHG9e5b4dbe8ff2: localrepo: handle ValueError during repository opening (authored by indygreg).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Revision".
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D7944?vs=19448&id=21586
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D7944/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D7944
AFFECTED FILES
mercurial/localrepo.py
CHANGE DETAILS
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -509,6 +509,11 @@
except OSError as e:
if e.errno != errno.ENOENT:
raise
+ except ValueError as e:
+ # Can be raised on Python 3.8 when path is invalid.
+ raise error.Abort(
+ _(b'invalid path %s: %s') % (path, pycompat.bytestr(e))
+ )
raise error.RepoError(_(b'repository %s not found') % path)
To: indygreg, #hg-reviewers, marmoute, baymax, pulkit
Cc: mercurial-patches, marmoute, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20200609/b2d46ced/attachment-0002.html>
More information about the Mercurial-patches
mailing list