D12100: obsolete: make sure windows tests pass when stat() is given a URL
av6 (Anton Shestakov)
phabricator at mercurial-scm.org
Fri Jan 28 17:39:45 UTC 2022
av6 created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REVISION SUMMARY
This is a band-aid for test-static-http.t breakage on windows.
On windows this exception is not ENOENT, but EINVAL (because of `:` symbol, for
example).
The real issue here is not using statichttpvfs for accessing obsstore, but I
didn't find the root cause of that yet.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D12100
AFFECTED FILES
mercurial/obsolete.py
CHANGE DETAILS
diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py
--- a/mercurial/obsolete.py
+++ b/mercurial/obsolete.py
@@ -583,7 +583,7 @@
try:
return self.svfs.stat(b'obsstore').st_size > 1
except OSError as inst:
- if inst.errno != errno.ENOENT:
+ if inst.errno not in (errno.ENOENT, errno.EINVAL):
raise
# just build an empty _all list if no obsstore exists, which
# avoids further stat() syscalls
To: av6, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
More information about the Mercurial-devel
mailing list