Mercurial > hg
diff tests/test-status-tracked-key.t @ 49194:e4b31016e194
auto-upgrade: introduce a way to auto-upgrade to/from tracked-hint
This is similar to what we introduced for `share-safe`, but apply to the
tracked-hint feature.
Differential Revision: https://phab.mercurial-scm.org/D12613
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 05 Apr 2022 05:20:05 +0200 |
parents | 94635b74b18c |
children | 3a53871048dc |
line wrap: on
line diff
--- a/tests/test-status-tracked-key.t Mon Apr 04 19:30:32 2022 +0200 +++ b/tests/test-status-tracked-key.t Tue Apr 05 05:20:05 2022 +0200 @@ -202,3 +202,37 @@ .hg/dirstate-tracked-hint $ hg debugrequires | grep 'tracked' dirstate-tracked-key-v1 + $ cd .. + +Test automatic upgrade and downgrade +------------------------------------ + +create an initial repository + + $ hg init auto-upgrade \ + > --config format.use-dirstate-tracked-hint=no + $ hg debugbuilddag -R auto-upgrade --new-file .+5 + $ hg -R auto-upgrade update + 6 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ hg debugformat -R auto-upgrade | grep tracked + tracked-hint: no + +upgrade it to dirstate-tracked-hint automatically + + $ hg status -R auto-upgrade \ + > --config format.use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories=yes \ + > --config format.use-dirstate-tracked-hint=yes + automatically upgrading repository to the `tracked-hint` feature + (see `hg help config.format.use-dirstate-tracked-hint` for details) + $ hg debugformat -R auto-upgrade | grep tracked + tracked-hint: yes + +downgrade it from dirstate-tracked-hint automatically + + $ hg status -R auto-upgrade \ + > --config format.use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories=yes \ + > --config format.use-dirstate-tracked-hint=no + automatically downgrading repository from the `tracked-hint` feature + (see `hg help config.format.use-dirstate-tracked-hint` for details) + $ hg debugformat -R auto-upgrade | grep tracked + tracked-hint: no