auto-upgrade: add a test that will host "quiet" testing
authorPierre-Yves David <pierre-yves.david@octobus.net>
Tue, 14 Jun 2022 15:45:37 +0200
changeset 49338 4b239acb23a0
parent 49336 290c29df1915
child 49339 9e203cda3238
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.
tests/test-upgrade-repo.t
--- 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
 -------------------------------------------------