( )⚙ D12100 obsolete: make sure windows tests pass when stat() is given a URL

This is an archive of the discontinued Mercurial Phabricator instance.

obsolete: make sure windows tests pass when stat() is given a URL
ClosedPublic

Authored by av6 on Jan 28 2022, 12:39 PM.

Details

Summary

This is a temporary fix for an issue that's only visible on windows, but exists
on other platforms as well.

The issue is if we're trying to use obsstore from a remote peer and that peer
is a static HTTP repo, vfs tries to os.stat() a remote file using a URL to that
file (e.g. http://localhost/repo/.hg/store/obsstore). The next patch in this
series makes branchcache obsolescence-aware, so in certain situations exchange
process will try os.stat()ing a URL. On windows this will produce an OSError
that is not ENOENT, but EINVAL instead (because of : symbol, for example).

Diff Detail

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

av6 created this revision.Jan 28 2022, 12:39 PM
marmoute accepted this revision.Jan 31 2022, 12:05 PM
marmoute added a subscriber: marmoute.

Shouldn't this be the first revision of the series ? to avoid having windows broken in the middle of the series ?

av6 edited the summary of this revision. (Show Details)Feb 3 2022, 6:54 AM
av6 added a comment.Feb 3 2022, 6:58 AM

Shouldn't this be the first revision of the series ?

It is now.

Alphare accepted this revision.Feb 3 2022, 10:49 AM
This revision is now accepted and ready to land.Feb 3 2022, 10:49 AM