comparison tests/test-dirstate.t @ 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
comparison
equal deleted inserted replaced
49156:09984dc70352 49157:5d610521a285
131 $ find_dirstate_uuid () { 131 $ find_dirstate_uuid () {
132 > hg debugstate --docket | grep uuid | sed 's/.*uuid: \(.*\)/\1/' 132 > hg debugstate --docket | grep uuid | sed 's/.*uuid: \(.*\)/\1/'
133 > } 133 > }
134 134
135 $ dirstate_uuid_has_not_changed () { 135 $ dirstate_uuid_has_not_changed () {
136 > # Pure Python always rewrites the whole dirstate 136 > # Non-Rust always rewrites the whole dirstate
137 > if [ $# -eq 1 ] || [ "$HGMODULEPOLICY" = *"rust"* ] || [ -n "$RHG_INSTALLED_AS_HG" ]; then 137 > if [ $# -eq 1 ] || ([ -n "$HGMODULEPOLICY" ] && [ -z "${HGMODULEPOLICY##*rust*}" ]) || [ -n "$RHG_INSTALLED_AS_HG" ]; then
138 > test $current_uid = $(find_dirstate_uuid) 138 > test $current_uid = $(find_dirstate_uuid)
139 > fi 139 > fi
140 > } 140 > }
141 141
142 $ cd .. 142 $ cd ..