bundle2: also expose the `tell` attribute of the underlying chunkbuffer
authorPierre-Yves David <pierre-yves.david@octobus.net>
Wed, 29 Jan 2025 15:50:01 +0100
changeset 52919 2787db338b15
parent 52918 e4552f135e35
child 52920 aee193b1c784
bundle2: also expose the `tell` attribute of the underlying chunkbuffer This make it usable and will make pytype happy.
mercurial/bundle2.py
--- a/mercurial/bundle2.py	Mon Jan 27 18:18:57 2025 +0100
+++ b/mercurial/bundle2.py	Wed Jan 29 15:50:01 2025 +0100
@@ -1507,6 +1507,10 @@
             self.consumed = True
         return data
 
+    def tell(self) -> int:
+        """the amount of byte read so far in the part"""
+        return self._payloadstream.tell()
+
 
 class seekableunbundlepart(unbundlepart):
     """A bundle2 part in a bundle that is seekable.