comparison mercurial/upgrade_utils/engine.py @ 46897:1c52d77d7861

upgrade: do not hardcore file extension of revlogs This logic already lives inside the `store` module. So lets reuse it instead. Differential Revision: https://phab.mercurial-scm.org/D10317
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 06 Apr 2021 10:38:27 +0200
parents cf49e54ef965
children f38bf44e077f 27f1191b1305
comparison
equal deleted inserted replaced
46896:cf49e54ef965 46897:1c52d77d7861
388 def _files_to_copy_post_revlog_clone(srcrepo): 388 def _files_to_copy_post_revlog_clone(srcrepo):
389 """yields files which should be copied to destination after revlogs 389 """yields files which should be copied to destination after revlogs
390 are cloned""" 390 are cloned"""
391 for path, kind, st in sorted(srcrepo.store.vfs.readdir(b'', stat=True)): 391 for path, kind, st in sorted(srcrepo.store.vfs.readdir(b'', stat=True)):
392 # don't copy revlogs as they are already cloned 392 # don't copy revlogs as they are already cloned
393 if path.endswith((b'.i', b'.d', b'.n', b'.nd')): 393 if store.revlog_type(path) is not None:
394 continue 394 continue
395 # Skip transaction related files. 395 # Skip transaction related files.
396 if path.startswith(b'undo'): 396 if path.startswith(b'undo'):
397 continue 397 continue
398 # Only copy regular files. 398 # Only copy regular files.