diff mercurial/upgrade.py @ 49192:2ab79873786e

auto-upgrade: introduce a way to auto-upgrade to/from share-safe This is the first "automatic-upgrade" capability. In the following commits, similar features are coming for other "fast to upgrade" formats. This is different from the `safe-mismatch.source-not-safe` and `safe-mismatch.source-safe` configuration that deal with mismatch between a share and its share-source. Here we are dealing with mismatch between a repository configuration and its actual format. We will need further work for cases were the repository cannot be locked. A basic protection is in place to avoid a infinite loop for now, but it will get proper attention in a later changeset. Differential Revision: https://phab.mercurial-scm.org/D12611
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 05 Apr 2022 05:19:47 +0200
parents 6000f5b25c9b
children 4f04bb0d8deb
line wrap: on
line diff
--- a/mercurial/upgrade.py	Fri Apr 15 22:02:07 2022 +0200
+++ b/mercurial/upgrade.py	Tue Apr 05 05:19:47 2022 +0200
@@ -19,6 +19,7 @@
 
 from .upgrade_utils import (
     actions as upgrade_actions,
+    auto_upgrade,
     engine as upgrade_engine,
 )
 
@@ -26,6 +27,7 @@
     stringutil,
 )
 
+may_auto_upgrade = auto_upgrade.may_auto_upgrade
 allformatvariant = upgrade_actions.allformatvariant