Mercurial > public > mercurial-scm > hg
comparison mercurial/bundle2.py @ 52919:2787db338b15
bundle2: also expose the `tell` attribute of the underlying chunkbuffer
This make it usable and will make pytype happy.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 29 Jan 2025 15:50:01 +0100 |
parents | f863fc99bef9 |
children |
comparison
equal
deleted
inserted
replaced
52918:e4552f135e35 | 52919:2787db338b15 |
---|---|
1505 b'bundle2-input-part: total payload size %i\n' % self._pos | 1505 b'bundle2-input-part: total payload size %i\n' % self._pos |
1506 ) | 1506 ) |
1507 self.consumed = True | 1507 self.consumed = True |
1508 return data | 1508 return data |
1509 | 1509 |
1510 def tell(self) -> int: | |
1511 """the amount of byte read so far in the part""" | |
1512 return self._payloadstream.tell() | |
1513 | |
1510 | 1514 |
1511 class seekableunbundlepart(unbundlepart): | 1515 class seekableunbundlepart(unbundlepart): |
1512 """A bundle2 part in a bundle that is seekable. | 1516 """A bundle2 part in a bundle that is seekable. |
1513 | 1517 |
1514 Regular ``unbundlepart`` instances can only be read once. This class | 1518 Regular ``unbundlepart`` instances can only be read once. This class |