changeset 47466:f7a94e2d4470

censor: put the tuple of open files in an explicit variable This will be simpler to pass these file around in future changesets. Differential Revision: https://phab.mercurial-scm.org/D10897
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 22 Jun 2021 21:22:55 +0200
parents bc8536e09a20
children 3ab267f0cbe4
files mercurial/revlogutils/rewrite.py
diffstat 1 files changed, 8 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revlogutils/rewrite.py	Tue Jun 22 11:09:25 2021 +0200
+++ b/mercurial/revlogutils/rewrite.py	Tue Jun 22 21:22:55 2021 +0200
@@ -246,13 +246,14 @@
 
         # we dont need to open the old index file since its content already
         # exist in a usable form in `old_index`.
-        with all_files() as (
-            old_data_file,
-            old_sidedata_file,
-            new_index_file,
-            new_data_file,
-            new_sidedata_file,
-        ):
+        with all_files() as open_files:
+            (
+                old_data_file,
+                old_sidedata_file,
+                new_index_file,
+                new_data_file,
+                new_sidedata_file,
+            ) = open_files
             new_index_file.seek(0, os.SEEK_END)
             assert new_index_file.tell() == index_cutoff
             new_data_file.seek(0, os.SEEK_END)