revlog: document the `get_streams` method
authorPierre-Yves David <pierre-yves.david@octobus.net>
Tue, 19 Sep 2023 23:09:29 +0200
changeset 51003 273434748051
parent 51002 4ea606568f61
child 51004 39fa0b948f5a
revlog: document the `get_streams` method A small docstring does not hurt.
mercurial/revlog.py
--- a/mercurial/revlog.py	Tue Sep 19 22:52:54 2023 +0200
+++ b/mercurial/revlog.py	Tue Sep 19 23:09:29 2023 +0200
@@ -517,6 +517,22 @@
             return b''
 
     def get_streams(self, max_linkrev, force_inline=False):
+        """return a list of streams that represent this revlog
+
+        This is used by stream-clone to do bytes to bytes copies of a repository.
+
+        This streams data for all revisions that refer to a changelog revision up
+        to `max_linkrev`.
+
+        If `force_inline` is set, it enforces that the stream will represent an inline revlog.
+
+        It returns is a list of three-tuple:
+
+            [
+                (filename, bytes_stream, stream_size),
+                …
+            ]
+        """
         n = len(self)
         index = self.index
         while n > 0: