-
Pierre-Yves David authored
This seems like a fine default behavior for now. If some users wants something more aggressive we can make the behavior configurable in the future. Differential Revision: https://phab.mercurial-scm.org/D12619
Pierre-Yves David authoredThis seems like a fine default behavior for now. If some users wants something more aggressive we can make the behavior configurable in the future. Differential Revision: https://phab.mercurial-scm.org/D12619
test-upgrade-repo.t 79.91 KiB
#require no-reposimplestore
$ cat >> $HGRCPATH << EOF
> [extensions]
> share =
> [format]
> # stabilize test accross variant
> revlog-compression=zlib
> [storage]
> dirstate-v2.slow-path=allow
> EOF
store and revlogv1 are required in source
$ hg --config format.usestore=false init no-store
$ hg -R no-store debugupgraderepo
abort: cannot upgrade repository; requirement missing: store
[255]
$ hg init no-revlogv1
$ cat > no-revlogv1/.hg/requires << EOF
> dotencode
> fncache
> generaldelta
> store
> EOF
$ hg -R no-revlogv1 debugupgraderepo
abort: cannot upgrade repository; missing a revlog version
[255]
Cannot upgrade shared repositories
$ hg init share-parent
$ hg -R share-parent debugbuilddag -n .+9
$ hg -R share-parent up tip
10 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg -q share share-parent share-child
$ hg -R share-child debugupgraderepo --config format.sparse-revlog=no
abort: cannot use these actions on a share repository: sparserevlog
(upgrade the main repository directly)
[255]
Unless the action is compatible with share
$ hg -R share-child debugupgraderepo --config format.use-dirstate-v2=yes --quiet
requirements
preserved: * (glob)
added: dirstate-v2
no revlogs to process
$ hg -R share-child debugupgraderepo --config format.use-dirstate-v2=yes --quiet --run
upgrade will perform the following actions:
requirements
preserved: * (glob)
added: dirstate-v2
no revlogs to process
$ hg debugformat -R share-child | grep dirstate-v2
dirstate-v2: yes
$ hg debugformat -R share-parent | grep dirstate-v2
dirstate-v2: no
$ hg status --all -R share-child
C nf0
C nf1