Mercurial > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
45482:9a99ab8217bd | 45483:d252f51ab032 |
---|---|
1 #testcases safe normal | |
2 | |
3 #if safe | |
4 $ echo "[format]" >> $HGRCPATH | |
5 $ echo "exp-share-safe = True" >> $HGRCPATH | |
6 #endif | |
7 | |
1 $ echo "[extensions]" >> $HGRCPATH | 8 $ echo "[extensions]" >> $HGRCPATH |
2 $ echo "share = " >> $HGRCPATH | 9 $ echo "share = " >> $HGRCPATH |
3 | 10 |
4 prepare repo1 | 11 prepare repo1 |
5 | 12 |
253 $ killdaemons.py | 260 $ killdaemons.py |
254 | 261 |
255 Test sharing a repository which was created with store requirement disable | 262 Test sharing a repository which was created with store requirement disable |
256 | 263 |
257 $ hg init nostore --config format.usestore=false | 264 $ hg init nostore --config format.usestore=false |
265 ignoring enabled 'format.exp-share-safe' config because it is incompatible with disabled 'format.usestore' config (safe !) | |
258 $ hg share nostore sharednostore | 266 $ hg share nostore sharednostore |
259 abort: cannot create shared repository as source was created with 'format.usestore' config disabled | 267 abort: cannot create shared repository as source was created with 'format.usestore' config disabled |
260 [255] | 268 [255] |