comparison mercurial/revlog.py @ 52089:9e94f9dbbbe8

revlog: drop the CamelCase name for `revlog.revlogproblem` See 61557734c0ae for the reasoning.
author Matt Harbison <matt_harbison@yahoo.com>
date Wed, 23 Oct 2024 16:22:21 -0400
parents 61557734c0ae
children 13815c9decd4
comparison
equal deleted inserted replaced
52088:61557734c0ae 52089:9e94f9dbbbe8
96 util, 96 util,
97 vfs as vfsmod, 97 vfs as vfsmod,
98 ) 98 )
99 from .interfaces import ( 99 from .interfaces import (
100 repository, 100 repository,
101 util as interfaceutil,
102 ) 101 )
103 from .revlogutils import ( 102 from .revlogutils import (
104 deltas as deltautil, 103 deltas as deltautil,
105 docket as docketutil, 104 docket as docketutil,
106 flagutil, 105 flagutil,
203 protocol_flags = attr.ib() 202 protocol_flags = attr.ib()
204 linknode = attr.ib(default=None) 203 linknode = attr.ib(default=None)
205 204
206 205
207 @attr.s(frozen=True) 206 @attr.s(frozen=True)
208 class RevLogProblem: 207 class revlogproblem: # (repository.iverifyproblem)
209 warning = attr.ib(default=None, type=Optional[bytes]) 208 warning = attr.ib(default=None, type=Optional[bytes])
210 error = attr.ib(default=None, type=Optional[bytes]) 209 error = attr.ib(default=None, type=Optional[bytes])
211 node = attr.ib(default=None, type=Optional[bytes]) 210 node = attr.ib(default=None, type=Optional[bytes])
212
213
214 revlogproblem = interfaceutil.implementer(repository.iverifyproblem)(
215 RevLogProblem
216 )
217
218 if typing.TYPE_CHECKING:
219 revlogproblem = RevLogProblem
220 211
221 212
222 def parse_index_v1(data, inline): 213 def parse_index_v1(data, inline):
223 # call the C implementation to parse the index data 214 # call the C implementation to parse the index data
224 index, cache = parsers.parse_index2(data, inline) 215 index, cache = parsers.parse_index2(data, inline)
3882 elif self._format_version == REVLOGV1: 3873 elif self._format_version == REVLOGV1:
3883 rewrite.v1_censor(self, tr, censor_nodes, tombstone) 3874 rewrite.v1_censor(self, tr, censor_nodes, tombstone)
3884 else: 3875 else:
3885 rewrite.v2_censor(self, tr, censor_nodes, tombstone) 3876 rewrite.v2_censor(self, tr, censor_nodes, tombstone)
3886 3877
3887 def verifyintegrity(self, state) -> Iterable[RevLogProblem]: 3878 def verifyintegrity(self, state) -> Iterable[revlogproblem]:
3888 """Verifies the integrity of the revlog. 3879 """Verifies the integrity of the revlog.
3889 3880
3890 Yields ``revlogproblem`` instances describing problems that are 3881 Yields ``revlogproblem`` instances describing problems that are
3891 found. 3882 found.
3892 """ 3883 """