Mercurial > hg
changeset 51003:273434748051
revlog: document the `get_streams` method
A small docstring does not hurt.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 19 Sep 2023 23:09:29 +0200 |
parents | 4ea606568f61 |
children | 39fa0b948f5a |
files | mercurial/revlog.py |
diffstat | 1 files changed, 16 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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: