changeset 49342:4b239acb23a0

auto-upgrade: add a test that will host "quiet" testing We will add options to suppress the message in the coming changeset. The changes will be clearer if the full test is already in place.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 14 Jun 2022 15:45:37 +0200
parents 290c29df1915
children 9e203cda3238
files tests/test-upgrade-repo.t
diffstat 1 files changed, 45 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-upgrade-repo.t	Wed May 18 10:39:45 2022 +0100
+++ b/tests/test-upgrade-repo.t	Tue Jun 14 15:45:37 2022 +0200
@@ -2061,6 +2061,51 @@
   tracked-hint:        no
   share-safe:         yes
 
+Quiet upgrade and downgrade
+---------------------------
+
+
+  $ hg debugformat -R auto-upgrade | egrep '(dirstate-v2|tracked|share-safe)'
+  dirstate-v2:        yes
+  tracked-hint:        no
+  share-safe:         yes
+  $ hg status -R auto-upgrade \
+  >     --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \
+  >     --config format.use-dirstate-v2=no \
+  >     --config format.use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories=yes \
+  >     --config format.use-dirstate-tracked-hint=yes \
+  >     --config format.use-share-safe.automatic-upgrade-of-mismatching-repositories=yes \
+  >     --config format.use-share-safe=no
+  automatically downgrading repository from the `dirstate-v2` feature
+  (see `hg help config.format.use-dirstate-v2` for details)
+  automatically downgrading repository from the `share-safe` feature
+  (see `hg help config.format.use-share-safe` for details)
+  automatically upgrading repository to the `tracked-hint` feature
+  (see `hg help config.format.use-dirstate-tracked-hint` for details)
+
+  $ hg debugformat -R auto-upgrade | egrep '(dirstate-v2|tracked|share-safe)'
+  dirstate-v2:         no
+  tracked-hint:       yes
+  share-safe:          no
+
+  $ hg status -R auto-upgrade \
+  >     --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \
+  >     --config format.use-dirstate-v2=yes \
+  >     --config format.use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories=yes \
+  >     --config format.use-dirstate-tracked-hint=no\
+  >     --config format.use-share-safe.automatic-upgrade-of-mismatching-repositories=yes \
+  >     --config format.use-share-safe=yes
+  automatically upgrading repository to the `dirstate-v2` feature
+  (see `hg help config.format.use-dirstate-v2` for details)
+  automatically upgrading repository to the `share-safe` feature
+  (see `hg help config.format.use-share-safe` for details)
+  automatically downgrading repository from the `tracked-hint` feature
+  (see `hg help config.format.use-dirstate-tracked-hint` for details)
+  $ hg debugformat -R auto-upgrade | egrep '(dirstate-v2|tracked|share-safe)'
+  dirstate-v2:        yes
+  tracked-hint:        no
+  share-safe:         yes
+
 Attempting Auto-upgrade on a read-only repository
 -------------------------------------------------