comparison tests/test-share.t @ 48466:bf2738e03e96

share: make it possible to control the working copy format variant A share will use the same format as its source for the store, but there are no reason to not lets it control the working copy variant at creation time. So we make it so. Differential Revision: https://phab.mercurial-scm.org/D11892
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 07 Dec 2021 15:14:08 +0100
parents 5e6542143d40
children 68b7faeb6ef3
comparison
equal deleted inserted replaced
48465:7964a2dbde12 48466:bf2738e03e96
282 $ hg init nostore --config format.usestore=false 282 $ hg init nostore --config format.usestore=false
283 ignoring enabled 'format.use-share-safe' config because it is incompatible with disabled 'format.usestore' config (safe !) 283 ignoring enabled 'format.use-share-safe' config because it is incompatible with disabled 'format.usestore' config (safe !)
284 $ hg share nostore sharednostore 284 $ hg share nostore sharednostore
285 abort: cannot create shared repository as source was created with 'format.usestore' config disabled 285 abort: cannot create shared repository as source was created with 'format.usestore' config disabled
286 [255] 286 [255]
287
288 Check that (safe) share can control wc-specific format variant at creation time
289 -------------------------------------------------------------------------------
290
291 #if no-rust
292
293 $ cat << EOF >> $HGRCPATH
294 > [storage]
295 > dirstate-v2.slow-path = allow
296 > EOF
297
298 #endif
299
300 $ hg init repo-safe-d1 --config format.use-share-safe=yes --config format.exp-rc-dirstate-v2=no
301 $ hg debugformat -R repo-safe-d1 | grep dirstate-v2
302 dirstate-v2: no
303
304 $ hg share repo-safe-d1 share-safe-d2 --config format.use-share-safe=yes --config format.exp-rc-dirstate-v2=yes
305 updating working directory
306 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
307 $ hg debugformat -R share-safe-d2 | grep dirstate-v2
308 dirstate-v2: yes