# HG changeset patch # User Pierre-Yves David # Date 1649126614 -7200 # Node ID a68b37524d5046f02fbb423469d470941c23954f # Parent 883be4c74d54452bc7fcdde409a4188ab7c39e37 wait-on-file: properly wait on any files and symlink This make the utility more useful, for example to wait on a lock file. We also add an explicit -L check since the lock are "weird" symlink. Differential Revision: https://phab.mercurial-scm.org/D12617 diff -r 883be4c74d54 -r a68b37524d50 tests/testlib/wait-on-file --- a/tests/testlib/wait-on-file Tue Apr 05 04:41:09 2022 +0200 +++ b/tests/testlib/wait-on-file Tue Apr 05 04:43:34 2022 +0200 @@ -29,7 +29,7 @@ touch "$create" create="" fi -while [ "$timer" -gt 0 ] && [ ! -f "$wait_on" ]; do +while [ "$timer" -gt 0 ] && !([ -e "$wait_on" ] || [ -L "$wait_on" ]) ; do timer=$(( $timer - 1)) sleep 0.02 done