This is an archive of the discontinued Mercurial Phabricator instance.

localrepo: handle ValueError during repository opening
ClosedPublic

Authored by indygreg on Jan 18 2020, 4:18 PM.

Details

Summary

Python 3.8 can raise ValueError on attempt of an I/O operation
against an illegal path. This was causing test-remotefilelog-gc.t
to fail on Python 3.8.

This commit teaches repository opening to handle ValueError
and re-raise an Abort on failure.

An arguably better solution would be to implement this logic
in the vfs layer. But that seems like a bag of worms and I don't
want to go down that rabbit hole. Until users report uncaught
ValueError exceptions in the wild, I think it is fine to patch
this at the only occurrence our test harness is finding it.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

indygreg created this revision.Jan 18 2020, 4:18 PM
marmoute accepted this revision.Feb 5 2020, 6:10 PM
marmoute added a subscriber: marmoute.

urg…

baymax requested changes to this revision.Jun 8 2020, 1:34 PM

There seems to have been no activities on this Diff for the past 3 Months.

By policy, we are automatically moving it out of the need-review state.

Please, move it back to need-review without hesitation if this diff should still be discussed.

:baymax:need-review-idle:

This revision now requires changes to proceed.Jun 8 2020, 1:34 PM

This patch is still correct, not sure why it is not it yet.

pulkit accepted this revision.Jun 9 2020, 7:17 AM
This revision was not accepted when it landed; it landed in state Needs Revision.
This revision was automatically updated to reflect the committed changes.