testing: introduce util function to synchronize concurrent commands on files
This is an extension of mechanisms that the tests have been using for a while.
To be able to also control the execution in Rust, we introduce utility to
perform such `wait_on_file` logic based on some configuration value.
This will be used in the tests introduced in the next changesets.
# Files that just need to be migrated to the formatter.
# Do not add new files here!
mercurial/cext/manifest.c
mercurial/cext/osutil.c
# Vendored code that we should never format:
syntax: glob
contrib/python-zstandard/**.c
contrib/python-zstandard/**.h
hgext/fsmonitor/pywatchman/**.c
mercurial/thirdparty/**.c
mercurial/thirdparty/**.h
mercurial/pythoncapi_compat.h