Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/revlog.py @ 52499: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 | 98dcbe752dfe |
comparison
equal
deleted
inserted
replaced
52498:2aada52e80d6 | 52499:43d2a2f66434 |
---|---|
187 parsers, 'BaseIndexObject' | 187 parsers, 'BaseIndexObject' |
188 ) | 188 ) |
189 | 189 |
190 | 190 |
191 @attr.s(slots=True) | 191 @attr.s(slots=True) |
192 class revlogrevisiondelta: # (repository.irevisiondelta) | 192 class revlogrevisiondelta(repository.irevisiondelta): |
193 node = attr.ib() | 193 node = attr.ib(type=bytes) |
194 p1node = attr.ib() | 194 p1node = attr.ib(type=bytes) |
195 p2node = attr.ib() | 195 p2node = attr.ib(type=bytes) |
196 basenode = attr.ib() | 196 basenode = attr.ib(type=bytes) |
197 flags = attr.ib() | 197 flags = attr.ib(type=int) |
198 baserevisionsize = attr.ib() | 198 baserevisionsize = attr.ib(type=Optional[int]) |
199 revision = attr.ib() | 199 revision = attr.ib(type=Optional[bytes]) |
200 delta = attr.ib() | 200 delta = attr.ib(type=Optional[bytes]) |
201 sidedata = attr.ib() | 201 sidedata = attr.ib(type=Optional[bytes]) |
202 protocol_flags = attr.ib() | 202 protocol_flags = attr.ib(type=int) |
203 linknode = attr.ib(default=None) | 203 linknode = attr.ib(default=None, type=Optional[bytes]) |
204 | 204 |
205 | 205 |
206 @attr.s(frozen=True) | 206 @attr.s(frozen=True) |
207 class revlogproblem(repository.iverifyproblem): | 207 class revlogproblem(repository.iverifyproblem): |
208 warning = attr.ib(default=None, type=Optional[bytes]) | 208 warning = attr.ib(default=None, type=Optional[bytes]) |