comparison mercurial/typelib.py @ 52116:82e2c99c84f3

cachestat: avoid creating cachestat for http path The statichttprepo repo attemp to create cachestat for content we access through http. We modify the couple of place create cachestat object to detect this situation and avoids it. This is not marvelous, but there is few of them and the freeze is looming. This helps on Windows where calling cachestat on http path might create issues.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sat, 26 Oct 2024 01:38:20 +0200
parents 1c5810ce737e
children
comparison
equal deleted inserted replaced
52115:720d9849dcf9 52116:82e2c99c84f3
31 ) 31 )
32 32
33 from . import ( 33 from . import (
34 node, 34 node,
35 posix, 35 posix,
36 util,
36 windows, 37 windows,
37 ) 38 )
38 39
39 BinaryIO_Proxy = BinaryIO 40 BinaryIO_Proxy = BinaryIO
40 CacheStat = Union[posix.cachestat, windows.cachestat] 41 CacheStat = Union[
42 posix.cachestat,
43 windows.cachestat,
44 util.uncacheable_cachestat,
45 ]
41 NodeConstants = node.sha1nodeconstants 46 NodeConstants = node.sha1nodeconstants
42 else: 47 else:
43 from typing import Any 48 from typing import Any
44 49
45 BinaryIO_Proxy = object 50 BinaryIO_Proxy = object