Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/revlogutils/rewrite.py @ 47471: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 |
comparison
equal
deleted
inserted
replaced
47470:bc8536e09a20 | 47471:f7a94e2d4470 |
---|---|
244 new_sidedata_file, | 244 new_sidedata_file, |
245 ) | 245 ) |
246 | 246 |
247 # we dont need to open the old index file since its content already | 247 # we dont need to open the old index file since its content already |
248 # exist in a usable form in `old_index`. | 248 # exist in a usable form in `old_index`. |
249 with all_files() as ( | 249 with all_files() as open_files: |
250 old_data_file, | 250 ( |
251 old_sidedata_file, | 251 old_data_file, |
252 new_index_file, | 252 old_sidedata_file, |
253 new_data_file, | 253 new_index_file, |
254 new_sidedata_file, | 254 new_data_file, |
255 ): | 255 new_sidedata_file, |
256 ) = open_files | |
256 new_index_file.seek(0, os.SEEK_END) | 257 new_index_file.seek(0, os.SEEK_END) |
257 assert new_index_file.tell() == index_cutoff | 258 assert new_index_file.tell() == index_cutoff |
258 new_data_file.seek(0, os.SEEK_END) | 259 new_data_file.seek(0, os.SEEK_END) |
259 assert new_data_file.tell() == data_cutoff | 260 assert new_data_file.tell() == data_cutoff |
260 new_sidedata_file.seek(0, os.SEEK_END) | 261 new_sidedata_file.seek(0, os.SEEK_END) |