changeset 51018:720e5a5f2b95

stream-clone: use `revlog.reading` in `revlog.get_streams` We can get the same result while using more standard method, so we do.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 25 Sep 2023 17:18:40 +0200
parents edc44ab7437a
children 66c139d33cfe
files mercurial/revlog.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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)