Mercurial > hg
diff mercurial/localrepo.py @ 46331:8788981c95f8
localrepo: disallow share if there is a version mismatch by default
Earlier we used to allow shares which don't use share-safe mechanism to access
repository which uses share-safe mechanism. This defeats the purpose and is bad
behavior. This patch disallows that.
Next patch will introduce a config option to allow that and have clearer
understanding around various options.
Differential Revision: https://phab.mercurial-scm.org/D9784
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Thu, 14 Jan 2021 21:34:12 +0530 |
parents | 28899b6f4480 |
children | cc3452d2dfa4 |
line wrap: on
line diff
--- a/mercurial/localrepo.py Mon Jan 18 19:50:21 2021 +0530 +++ b/mercurial/localrepo.py Thu Jan 14 21:34:12 2021 +0530 @@ -608,13 +608,11 @@ storevfs, requirements, ) - elif ui.configbool( - b'experimental', b'sharesafe-warn-outdated-shares' - ): - ui.warn( + else: + raise error.Abort( _( - b'warning: source repository supports share-safe functionality.' - b' Reshare to upgrade.\n' + b'version mismatch: source uses share-safe' + b' functionality while the current share does not' ) )