##// END OF EJS Templates
interfaces: convert `repository.imanifeststorage` from zope `Attribute` attrs...
Matt Harbison -
r53375:d01af74e default
parent child Browse files
Show More
@@ -28,10 +28,16 if typing.TYPE_CHECKING:
28 28 urlutil,
29 29 )
30 30
31 # TODO: make a protocol class for this
32 NodeConstants = Any
33
31 34 # TODO: create a Protocol class, since importing uimod here causes a cycle
32 35 # that confuses pytype.
33 36 Ui = Any
34 37
38 # TODO: make a protocol class for this
39 Vfs = Any
40
35 41 # Local repository feature string.
36 42
37 43 # Revlogs are being used for file storage.
@@ -1297,34 +1303,30 class imanifestrevisionwritable(imanifes
1297 1303 class imanifeststorage(Protocol):
1298 1304 """Storage interface for manifest data."""
1299 1305
1300 nodeconstants = interfaceutil.Attribute(
1301 """nodeconstants used by the current repository."""
1302 )
1303
1304 tree = interfaceutil.Attribute(
1305 """The path to the directory this manifest tracks.
1306
1307 The empty bytestring represents the root manifest.
1308 """
1309 )
1310
1311 index = interfaceutil.Attribute(
1312 """An ``ifilerevisionssequence`` instance."""
1313 )
1314
1315 opener = interfaceutil.Attribute(
1316 """VFS opener to use to access underlying files used for storage.
1317
1318 TODO this is revlog specific and should not be exposed.
1319 """
1320 )
1321
1322 fulltextcache = interfaceutil.Attribute(
1323 """Dict with cache of fulltexts.
1324
1325 TODO this doesn't feel appropriate for the storage interface.
1326 """
1327 )
1306 nodeconstants: NodeConstants
1307 """nodeconstants used by the current repository."""
1308
1309 tree: bytes
1310 """The path to the directory this manifest tracks.
1311
1312 The empty bytestring represents the root manifest.
1313 """
1314
1315 index: ifilerevisionssequence
1316 """An ``ifilerevisionssequence`` instance."""
1317
1318 opener: Vfs
1319 """VFS opener to use to access underlying files used for storage.
1320
1321 TODO this is revlog specific and should not be exposed.
1322 """
1323
1324 # TODO: finish type hints
1325 fulltextcache: dict
1326 """Dict with cache of fulltexts.
1327
1328 TODO this doesn't feel appropriate for the storage interface.
1329 """
1328 1330
1329 1331 def __len__(self):
1330 1332 """Obtain the number of revisions stored for this manifest."""
General Comments 0
You need to be logged in to leave comments. Login now