changeset 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 e1d75c514ced
files mercurial/upgrade_utils/engine.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/upgrade_utils/engine.py	Tue Apr 06 10:38:11 2021 +0200
+++ b/mercurial/upgrade_utils/engine.py	Tue Apr 06 10:38:27 2021 +0200
@@ -390,7 +390,7 @@
     are cloned"""
     for path, kind, st in sorted(srcrepo.store.vfs.readdir(b'', stat=True)):
         # don't copy revlogs as they are already cloned
-        if path.endswith((b'.i', b'.d', b'.n', b'.nd')):
+        if store.revlog_type(path) is not None:
             continue
         # Skip transaction related files.
         if path.startswith(b'undo'):