stream-clone: use `revlog.reading` in `revlog.get_streams`
authorPierre-Yves David <pierre-yves.david@octobus.net>
Mon, 25 Sep 2023 17:18:40 +0200
changeset 51018 720e5a5f2b95
parent 51017 edc44ab7437a
child 51019 66c139d33cfe
stream-clone: use `revlog.reading` in `revlog.get_streams` We can get the same result while using more standard method, so we do.
mercurial/revlog.py
--- a/mercurial/revlog.py	Mon Sep 25 16:57:53 2023 +0200
+++ b/mercurial/revlog.py	Mon Sep 25 17:18:40 2023 +0200
@@ -576,7 +576,7 @@
         elif force_inline:
 
             def get_stream():
-                with self._datafp() as fp_d:
+                with self.reading():
                     yield None
 
                     for rev in range(n):
@@ -589,7 +589,7 @@
                             header = self.index.pack_header(header)
                             idx = header + idx
                         yield idx
-                        yield self._getsegmentforrevs(rev, rev, df=fp_d)[1]
+                        yield self._getsegmentforrevs(rev, rev)[1]
 
             inline_stream = get_stream()
             next(inline_stream)