mercurial/scmutil.py
changeset 52098 82e2c99c84f3
parent 51859 f4733654f144
child 52451 f5d134e57f51
child 52668 1fef0d25dcde
--- a/mercurial/scmutil.py	Sat Oct 26 02:03:54 2024 +0200
+++ b/mercurial/scmutil.py	Sat Oct 26 01:38:20 2024 +0200
@@ -1764,10 +1764,13 @@
 
     @staticmethod
     def stat(path: bytes) -> Optional[typelib.CacheStat]:
+        # TODO have a cleaner approach on httpstaticrepo side
+        if path.startswith(b'https://') or path.startswith(b'http://'):
+            return util.uncacheable_cachestat()
         try:
             return util.cachestat(path)
         except FileNotFoundError:
-            pass
+            return None
 
 
 class filecacheentry: