diff tests/simplestorerepo.py @ 52470:43d2a2f66434

revlog: subclass the new `repository.irevisiondelta` 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 18:45:09 -0400
parents 4ef6dbc27a99
children 4a332b233194
line wrap: on
line diff
--- a/tests/simplestorerepo.py	Tue Oct 22 18:34:54 2024 -0400
+++ b/tests/simplestorerepo.py	Tue Oct 22 18:45:09 2024 -0400
@@ -72,18 +72,17 @@
     pass
 
 
-@interfaceutil.implementer(repository.irevisiondelta)
 @attr.s(slots=True)
-class simplestorerevisiondelta:
-    node = attr.ib()
-    p1node = attr.ib()
-    p2node = attr.ib()
-    basenode = attr.ib()
-    flags = attr.ib()
-    baserevisionsize = attr.ib()
-    revision = attr.ib()
-    delta = attr.ib()
-    linknode = attr.ib(default=None)
+class simplestorerevisiondelta(repository.irevisiondelta):
+    node = attr.ib(type=bytes)
+    p1node = attr.ib(type=bytes)
+    p2node = attr.ib(type=bytes)
+    basenode = attr.ib(type=bytes)
+    flags = attr.ib(type=int)
+    baserevisionsize = attr.ib(type=Optional[int])
+    revision = attr.ib(type=Optional[bytes])
+    delta = attr.ib(type=Optional[bytes])
+    linknode = attr.ib(default=None, type=Optional[bytes])
 
 
 @attr.s(frozen=True)