Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/interfaces/repository.py @ 52498:2aada52e80d6
interfaces: convert `repository.irevisiondelta` from zope `Attribute` attrs
This is the same transformation as b455dfddfed0 did for dirstate.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Tue, 22 Oct 2024 18:34:54 -0400 |
parents | f968926a4207 |
children | 0d4ead4d88bd |
comparison
equal
deleted
inserted
replaced
52497:4ef6dbc27a99 | 52498:2aada52e80d6 |
---|---|
471 are mutually exclusive. | 471 are mutually exclusive. |
472 | 472 |
473 Typically used for changegroup generation. | 473 Typically used for changegroup generation. |
474 """ | 474 """ |
475 | 475 |
476 node = interfaceutil.Attribute("""20 byte node of this revision.""") | 476 node: bytes |
477 | 477 """20 byte node of this revision.""" |
478 p1node = interfaceutil.Attribute( | 478 |
479 """20 byte node of 1st parent of this revision.""" | 479 p1node: bytes |
480 ) | 480 """20 byte node of 1st parent of this revision.""" |
481 | 481 |
482 p2node = interfaceutil.Attribute( | 482 p2node: bytes |
483 """20 byte node of 2nd parent of this revision.""" | 483 """20 byte node of 2nd parent of this revision.""" |
484 ) | 484 |
485 | 485 # TODO: is this really optional? revlog.revlogrevisiondelta defaults to None |
486 linknode = interfaceutil.Attribute( | 486 linknode: bytes | None |
487 """20 byte node of the changelog revision this node is linked to.""" | 487 """20 byte node of the changelog revision this node is linked to.""" |
488 ) | 488 |
489 | 489 flags: int |
490 flags = interfaceutil.Attribute( | 490 """2 bytes of integer flags that apply to this revision. |
491 """2 bytes of integer flags that apply to this revision. | 491 |
492 | 492 This is a bitwise composition of the ``REVISION_FLAG_*`` constants. |
493 This is a bitwise composition of the ``REVISION_FLAG_*`` constants. | 493 """ |
494 """ | 494 |
495 ) | 495 basenode: bytes |
496 | 496 """20 byte node of the revision this data is a delta against. |
497 basenode = interfaceutil.Attribute( | 497 |
498 """20 byte node of the revision this data is a delta against. | 498 ``nullid`` indicates that the revision is a full revision and not |
499 | 499 a delta. |
500 ``nullid`` indicates that the revision is a full revision and not | 500 """ |
501 a delta. | 501 |
502 """ | 502 baserevisionsize: int | None |
503 ) | 503 """Size of base revision this delta is against. |
504 | 504 |
505 baserevisionsize = interfaceutil.Attribute( | 505 May be ``None`` if ``basenode`` is ``nullid``. |
506 """Size of base revision this delta is against. | 506 """ |
507 | 507 |
508 May be ``None`` if ``basenode`` is ``nullid``. | 508 # TODO: is this really optional? (Seems possible in |
509 """ | 509 # storageutil.emitrevisions()). |
510 ) | 510 revision: bytes | None |
511 | 511 """Raw fulltext of revision data for this node.""" |
512 revision = interfaceutil.Attribute( | 512 |
513 """Raw fulltext of revision data for this node.""" | 513 delta: bytes | None |
514 ) | 514 """Delta between ``basenode`` and ``node``. |
515 | 515 |
516 delta = interfaceutil.Attribute( | 516 Stored in the bdiff delta format. |
517 """Delta between ``basenode`` and ``node``. | 517 """ |
518 | 518 |
519 Stored in the bdiff delta format. | 519 sidedata: bytes | None |
520 """ | 520 """Raw sidedata bytes for the given revision.""" |
521 ) | 521 |
522 | 522 protocol_flags: int |
523 sidedata = interfaceutil.Attribute( | 523 """Single byte of integer flags that can influence the protocol. |
524 """Raw sidedata bytes for the given revision.""" | 524 |
525 ) | 525 This is a bitwise composition of the ``storageutil.CG_FLAG*`` constants. |
526 | 526 """ |
527 protocol_flags = interfaceutil.Attribute( | |
528 """Single byte of integer flags that can influence the protocol. | |
529 | |
530 This is a bitwise composition of the ``storageutil.CG_FLAG*`` constants. | |
531 """ | |
532 ) | |
533 | 527 |
534 | 528 |
535 class ifilerevisionssequence(Protocol): | 529 class ifilerevisionssequence(Protocol): |
536 """Contains index data for all revisions of a file. | 530 """Contains index data for all revisions of a file. |
537 | 531 |