# HG changeset patch # User Pierre-Yves David # Date 2021-06-22 19:22:55 # Node ID f7a94e2d44700a8c34931b3454a5ec3eb93550b4 # Parent bc8536e09a20dab065e30640f0b3f00558b10dfd 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 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 @@ def v2_censor(rl, tr, censornode, tombst # 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)