Patchwork D10317: upgrade: do not hardcore revlog extension

login
register
mail settings
Submitter phabricator
Date April 6, 2021, 8:39 a.m.
Message ID <differential-rev-PHID-DREV-54ics3arzibwlqc6ooya-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48633/
State Superseded
Headers show

Comments

phabricator - April 6, 2021, 8:39 a.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This logic already lives inside the `store` module. So lets reuse it instead.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/upgrade_utils/engine.py

CHANGE DETAILS




To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/upgrade_utils/engine.py b/mercurial/upgrade_utils/engine.py
--- a/mercurial/upgrade_utils/engine.py
+++ b/mercurial/upgrade_utils/engine.py
@@ -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'):