repo-upgrade: keep the revlog open while cloning
This is more explicit. No performance differences were observed.
--- a/mercurial/revlog.py Mon Sep 25 12:37:52 2023 +0200
+++ b/mercurial/revlog.py Mon Sep 25 16:36:17 2023 +0200
@@ -3218,14 +3218,15 @@
destrevlog._deltabothparents = forcedeltabothparents or oldamd
- self._clone(
- tr,
- destrevlog,
- addrevisioncb,
- deltareuse,
- forcedeltabothparents,
- sidedata_helpers,
- )
+ with self.reading():
+ self._clone(
+ tr,
+ destrevlog,
+ addrevisioncb,
+ deltareuse,
+ forcedeltabothparents,
+ sidedata_helpers,
+ )
finally:
destrevlog._lazydelta = oldlazydelta