# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1727999345 14400
#      Thu Oct 03 19:49:05 2024 -0400
# Node ID ed90f4a1bb2caa76ccac2f052504269cffaeb468
# Parent  9cfc95e901ece4b66afb5e4e0f600172b06dc36d
tests: conditionalize `chmod` usage in `test-upgrade-repo.t`

While the command itself doesn't error out on Windows, it also doesn't make the
filesystem readonly.  Therefore the repo gets altered to drop dirstate-v2, and
puts it out of sync with that happens on Linux.

diff --git a/tests/test-upgrade-repo.t b/tests/test-upgrade-repo.t
--- a/tests/test-upgrade-repo.t
+++ b/tests/test-upgrade-repo.t
@@ -2082,6 +2082,8 @@
   tracked-hint:        no
   share-safe:         yes
 
+#if unix-permissions
+
 Attempting Auto-upgrade on a read-only repository
 -------------------------------------------------
 
@@ -2095,6 +2097,8 @@
 
   $ chmod -R u+w auto-upgrade
 
+#endif
+
 Attempting Auto-upgrade on a locked repository
 ----------------------------------------------