manifest: drop the CamelCase name for `manifest.treemanifestctx`
authorMatt Harbison <matt_harbison@yahoo.com>
Wed, 23 Oct 2024 16:48:46 -0400
changeset 52074 33f255bf19d9
parent 52073 569e074894fa
child 52075 ff4562ed9ed7
manifest: drop the CamelCase name for `manifest.treemanifestctx` See 61557734c0ae for the reasoning.
mercurial/manifest.py
--- a/mercurial/manifest.py	Wed Oct 23 16:45:12 2024 -0400
+++ b/mercurial/manifest.py	Wed Oct 23 16:48:46 2024 -0400
@@ -10,7 +10,6 @@
 import heapq
 import itertools
 import struct
-import typing
 import weakref
 
 from typing import (
@@ -47,7 +46,6 @@
 )
 from .interfaces import (
     repository,
-    util as interfaceutil,
 )
 from .revlogutils import (
     constants as revlog_constants,
@@ -2045,7 +2043,8 @@
         self._revlog.opener = value
 
 
-AnyManifestCtx = Union['manifestctx', 'TreeManifestCtx']
+# TODO: drop this in favor of repository.imanifestrevisionstored?
+AnyManifestCtx = Union['manifestctx', 'treemanifestctx']
 # TODO: drop this in favor of repository.imanifestdict
 AnyManifestDict = Union[manifestdict, treemanifest]
 
@@ -2381,7 +2380,7 @@
         )
 
 
-class TreeManifestCtx:
+class treemanifestctx:  # (repository.imanifestrevisionstored)
     _data: Optional[treemanifest]
 
     def __init__(self, manifestlog, dir, node):
@@ -2646,14 +2645,6 @@
         return self.read().find(key)
 
 
-treemanifestctx = interfaceutil.implementer(repository.imanifestrevisionstored)(
-    TreeManifestCtx
-)
-
-if typing.TYPE_CHECKING:
-    treemanifestctx = TreeManifestCtx
-
-
 class excludeddir(treemanifest):
     """Stand-in for a directory that is excluded from the repository.