Mercurial > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
49191:4450faeb52bb | 49192:2ab79873786e |
---|---|
17 scmutil, | 17 scmutil, |
18 ) | 18 ) |
19 | 19 |
20 from .upgrade_utils import ( | 20 from .upgrade_utils import ( |
21 actions as upgrade_actions, | 21 actions as upgrade_actions, |
22 auto_upgrade, | |
22 engine as upgrade_engine, | 23 engine as upgrade_engine, |
23 ) | 24 ) |
24 | 25 |
25 from .utils import ( | 26 from .utils import ( |
26 stringutil, | 27 stringutil, |
27 ) | 28 ) |
28 | 29 |
30 may_auto_upgrade = auto_upgrade.may_auto_upgrade | |
29 allformatvariant = upgrade_actions.allformatvariant | 31 allformatvariant = upgrade_actions.allformatvariant |
30 | 32 |
31 | 33 |
32 def upgraderepo( | 34 def upgraderepo( |
33 ui, | 35 ui, |