diff tests/test-share-safe.t @ 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 fc2d5c0aed7f
children cc3452d2dfa4
line wrap: on
line diff
--- a/tests/test-share-safe.t	Mon Jan 18 19:50:21 2021 +0530
+++ b/tests/test-share-safe.t	Thu Jan 14 21:34:12 2021 +0530
@@ -392,20 +392,11 @@
   o  f3ba8b99bb6f897c87bbc1c07b75c6ddf43a4f77: added foo
   
 
-Make sure existing shares still works
-
-  $ hg log -GT "{node}: {desc}\n" -R ../nss-share --config experimental.sharesafe-warn-outdated-shares=false
-  @  f63db81e6dde1d9c78814167f77fb1fb49283f4f: added bar
-  |
-  o  f3ba8b99bb6f897c87bbc1c07b75c6ddf43a4f77: added foo
-  
+Make sure existing shares dont work with default config
 
   $ hg log -GT "{node}: {desc}\n" -R ../nss-share
-  warning: source repository supports share-safe functionality. Reshare to upgrade.
-  @  f63db81e6dde1d9c78814167f77fb1fb49283f4f: added bar
-  |
-  o  f3ba8b99bb6f897c87bbc1c07b75c6ddf43a4f77: added foo
-  
+  abort: version mismatch: source uses share-safe functionality while the current share does not
+  [255]
 
 
 Create a safe share from upgrade one
@@ -538,11 +529,8 @@
   sparserevlog
   store
   $ hg log -GT "{node}: {desc}\n" -R ../nss-share
-  warning: source repository supports share-safe functionality. Reshare to upgrade.
-  @  f63db81e6dde1d9c78814167f77fb1fb49283f4f: added bar
-  |
-  o  f3ba8b99bb6f897c87bbc1c07b75c6ddf43a4f77: added foo
-  
+  abort: version mismatch: source uses share-safe functionality while the current share does not
+  [255]
 
 Check that if lock is taken, upgrade fails but read operation are successful
   $ touch ../nss-share/.hg/wlock