changeset 49157:5d610521a285 stable

test-dirstate: fix detection of Rust environment variable The Rust path never actually worked. This change also improves clarity of the comment. The next change will ensure we print something when this check fails. Differential Revision: https://phab.mercurial-scm.org/D12601
author Raphaël Gomès <rgomes@octobus.net>
date Wed, 04 May 2022 15:48:13 +0200
parents 09984dc70352
children 682b0ac92c0b
files tests/test-dirstate.t
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-dirstate.t	Thu Apr 28 17:15:35 2022 +0200
+++ b/tests/test-dirstate.t	Wed May 04 15:48:13 2022 +0200
@@ -133,8 +133,8 @@
   > }
 
   $ dirstate_uuid_has_not_changed () {
-  >   # Pure Python always rewrites the whole dirstate
-  >   if [ $# -eq 1 ] || [ "$HGMODULEPOLICY" = *"rust"* ] || [ -n "$RHG_INSTALLED_AS_HG" ]; then
+  >   # Non-Rust always rewrites the whole dirstate
+  >   if [ $# -eq 1 ] || ([ -n "$HGMODULEPOLICY" ] && [ -z "${HGMODULEPOLICY##*rust*}" ]) || [ -n "$RHG_INSTALLED_AS_HG" ]; then
   >     test $current_uid = $(find_dirstate_uuid)
   >   fi
   > }