changeset 52506:d37d8dfe65bd

manifest: subclass the new `repository.imanifestrevisionstored` Protocol class This is the same transformation as 3a90a6fd710d did for dirstate, but the CamelCase naming was already cleaned up here. See 4ef6dbc27a99 for the benefits of explicit subclassing.
author Matt Harbison <matt_harbison@yahoo.com>
date Tue, 22 Oct 2024 22:35:54 -0400
parents 0c60be5e021a
children d01af74e67b4
files hgext/git/manifest.py mercurial/manifest.py
diffstat 2 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/git/manifest.py	Tue Dec 10 21:38:34 2024 -0500
+++ b/hgext/git/manifest.py	Tue Oct 22 22:35:54 2024 -0400
@@ -259,8 +259,7 @@
         return iter(sorted((baseline | pend) - deleted))
 
 
-@interfaceutil.implementer(repository.imanifestrevisionstored)
-class gittreemanifestctx:
+class gittreemanifestctx(repository.imanifestrevisionstored):
     def __init__(self, repo, gittree):
         self._repo = repo
         self._tree = gittree
--- a/mercurial/manifest.py	Tue Dec 10 21:38:34 2024 -0500
+++ b/mercurial/manifest.py	Tue Oct 22 22:35:54 2024 -0400
@@ -2190,7 +2190,7 @@
         )
 
 
-class manifestctx:  # (repository.imanifestrevisionstored)
+class manifestctx(repository.imanifestrevisionstored):
     """A class representing a single revision of a manifest, including its
     contents, its parent revs, and its linkrev.
     """
@@ -2386,7 +2386,7 @@
         )
 
 
-class treemanifestctx:  # (repository.imanifestrevisionstored)
+class treemanifestctx(repository.imanifestrevisionstored):
     _data: Optional[treemanifest]
 
     def __init__(self, manifestlog, dir, node):