[Request] [+ ] D10897: censor: put the tuple of open files in an explicit variable

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Tue Jun 22 23:27:16 UTC 2021


marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This will be simpler to pass these file around in future changesets.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D10897

AFFECTED FILES
  mercurial/revlogutils/rewrite.py

CHANGE DETAILS

diff --git a/mercurial/revlogutils/rewrite.py b/mercurial/revlogutils/rewrite.py
--- a/mercurial/revlogutils/rewrite.py
+++ b/mercurial/revlogutils/rewrite.py
@@ -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)



To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20210622/a9031a72/attachment-0001.html>


More information about the Mercurial-patches mailing list