Mercurial > public > mercurial-scm > hg
comparison mercurial/revlogutils/deltas.py @ 48946:642e31cb55f0
py3: use class X: instead of class X(object):
The inheritance from object is implied in Python 3. So this should
be equivalent.
This change was generated via an automated search and replace. So there
may have been some accidental changes.
Differential Revision: https://phab.mercurial-scm.org/D12352
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Mon, 21 Feb 2022 13:08:28 -0700 |
parents | 6000f5b25c9b |
children | e6b7c6fbeb48 |
comparison
equal
deleted
inserted
replaced
48945:55d132525155 | 48946:642e31cb55f0 |
---|---|
36 | 36 |
37 # maximum <delta-chain-data>/<revision-text-length> ratio | 37 # maximum <delta-chain-data>/<revision-text-length> ratio |
38 LIMIT_DELTA2TEXT = 2 | 38 LIMIT_DELTA2TEXT = 2 |
39 | 39 |
40 | 40 |
41 class _testrevlog(object): | 41 class _testrevlog: |
42 """minimalist fake revlog to use in doctests""" | 42 """minimalist fake revlog to use in doctests""" |
43 | 43 |
44 def __init__(self, data, density=0.5, mingap=0, snapshot=()): | 44 def __init__(self, data, density=0.5, mingap=0, snapshot=()): |
45 """data is an list of revision payload boundaries""" | 45 """data is an list of revision payload boundaries""" |
46 self._data = data | 46 self._data = data |
542 raise | 542 raise |
543 return fulltext | 543 return fulltext |
544 | 544 |
545 | 545 |
546 @attr.s(slots=True, frozen=True) | 546 @attr.s(slots=True, frozen=True) |
547 class _deltainfo(object): | 547 class _deltainfo: |
548 distance = attr.ib() | 548 distance = attr.ib() |
549 deltalen = attr.ib() | 549 deltalen = attr.ib() |
550 data = attr.ib() | 550 data = attr.ib() |
551 base = attr.ib() | 551 base = attr.ib() |
552 chainbase = attr.ib() | 552 chainbase = attr.ib() |
925 # other approach failed try against prev to hopefully save us a | 925 # other approach failed try against prev to hopefully save us a |
926 # fulltext. | 926 # fulltext. |
927 yield (prev,) | 927 yield (prev,) |
928 | 928 |
929 | 929 |
930 class deltacomputer(object): | 930 class deltacomputer: |
931 def __init__(self, revlog): | 931 def __init__(self, revlog): |
932 self.revlog = revlog | 932 self.revlog = revlog |
933 | 933 |
934 def buildtext(self, revinfo, fh): | 934 def buildtext(self, revinfo, fh): |
935 """Builds a fulltext version of a revision | 935 """Builds a fulltext version of a revision |