diff tests/test-share.t @ 45483:d252f51ab032

share: introduce config option to store requires in .hg/store This introduces a config option which enabled stores the requirements on a repository in store instead. When enabled, `.hg/requires` will contain the `share-safe` requirement which marks that the requirements are present in the store. This is done so that repository requirements can be shared with shares made using `hg share` command. After this patch, `hg share` checks whether the source repository has share-safe requirement, if yes, it does not copy the requirements. Test for the new functionality is added and a test case in exitsing share tests is also added. Differential Revision: https://phab.mercurial-scm.org/D8633
author Pulkit Goyal <7895pulkit@gmail.com>
date Tue, 14 Apr 2020 21:07:09 +0530
parents dc283bc7e033
children 95c4cca641f6
line wrap: on
line diff
--- a/tests/test-share.t	Fri Aug 07 16:11:19 2020 +0530
+++ b/tests/test-share.t	Tue Apr 14 21:07:09 2020 +0530
@@ -1,3 +1,10 @@
+#testcases safe normal
+
+#if safe
+  $ echo "[format]"         >> $HGRCPATH
+  $ echo "exp-share-safe = True" >> $HGRCPATH
+#endif
+
   $ echo "[extensions]"      >> $HGRCPATH
   $ echo "share = "          >> $HGRCPATH
 
@@ -255,6 +262,7 @@
 Test sharing a repository which was created with store requirement disable
 
   $ hg init nostore --config format.usestore=false
+  ignoring enabled 'format.exp-share-safe' config because it is incompatible with disabled 'format.usestore' config (safe !)
   $ hg share nostore sharednostore
   abort: cannot create shared repository as source was created with 'format.usestore' config disabled
   [255]