comparison mercurial/manifest.py @ 52068:ca080c4d93e0

manifest: drop the CamelCase name for `manifest.manifestctx` See 61557734c0ae for the reasoning.
author Matt Harbison <matt_harbison@yahoo.com>
date Wed, 23 Oct 2024 16:43:22 -0400
parents 3f47f0d92b4a
children 569e074894fa
comparison
equal deleted inserted replaced
52067:3f47f0d92b4a 52068:ca080c4d93e0
2043 @opener.setter 2043 @opener.setter
2044 def opener(self, value): 2044 def opener(self, value):
2045 self._revlog.opener = value 2045 self._revlog.opener = value
2046 2046
2047 2047
2048 AnyManifestCtx = Union['ManifestCtx', 'TreeManifestCtx'] 2048 AnyManifestCtx = Union['manifestctx', 'TreeManifestCtx']
2049 # TODO: drop this in favor of repository.imanifestdict 2049 # TODO: drop this in favor of repository.imanifestdict
2050 AnyManifestDict = Union[manifestdict, treemanifest] 2050 AnyManifestDict = Union[manifestdict, treemanifest]
2051 2051
2052 2052
2053 class manifestlog: # (repository.imanifestlog) 2053 class manifestlog: # (repository.imanifestlog)
2183 removed, 2183 removed,
2184 match=match, 2184 match=match,
2185 ) 2185 )
2186 2186
2187 2187
2188 class ManifestCtx: 2188 class manifestctx: # (repository.imanifestrevisionstored)
2189 """A class representing a single revision of a manifest, including its 2189 """A class representing a single revision of a manifest, including its
2190 contents, its parent revs, and its linkrev. 2190 contents, its parent revs, and its linkrev.
2191 """ 2191 """
2192 2192
2193 _data: Optional[manifestdict] 2193 _data: Optional[manifestdict]
2341 d = mdiff.patchtext(store.revdiff(store.deltaparent(r), r)) 2341 d = mdiff.patchtext(store.revdiff(store.deltaparent(r), r))
2342 return manifestdict(store.nodeconstants.nodelen, d) 2342 return manifestdict(store.nodeconstants.nodelen, d)
2343 2343
2344 def find(self, key: bytes) -> Tuple[bytes, bytes]: 2344 def find(self, key: bytes) -> Tuple[bytes, bytes]:
2345 return self.read().find(key) 2345 return self.read().find(key)
2346
2347
2348 manifestctx = interfaceutil.implementer(repository.imanifestrevisionstored)(
2349 ManifestCtx
2350 )
2351
2352 if typing.TYPE_CHECKING:
2353 manifestctx = ManifestCtx
2354 2346
2355 2347
2356 class MemTreeManifestCtx: 2348 class MemTreeManifestCtx:
2357 _treemanifest: treemanifest 2349 _treemanifest: treemanifest
2358 2350