dirstate: use a single closure for get_flags
The previous code was overlooking fallback when neither symlink not exec was
supported.
The number of "variants" is getting too high, so I am consolidating this in a
single closure that should be easier to maintains.
This also ensure that fallback flags are always taken into account.
(they are not user code yet, but small experimentation shown that the feature
was working as intended.)
A a small side effect we need to check for symlink support more lazily and this
show up in the test in a couple of places.
Differential Revision: https://phab.mercurial-scm.org/D11728
tests: allow Google's internal builds of clang-format to be used
These builds do not actually include any Google-specific formatting changes; the
only reason they don't include the LLVM version number is due to a decision to
elide the version number from *all* LLVM/clang projects.
For most builds of clang-format, even "unofficial" ones, the LLVM version will
be displayed; example:
```
clang-format version 14.0.0 (https://github.com/llvm/llvm-project.git
1830ec94ac022ae0b6d6876fc2251e6b91e5931e)
```
The Google-internal build looks like this:
```
clang-format version google3-trunk (
1830ec94ac022ae0b6d6876fc2251e6b91e5931e)
```
Differential Revision: https://phab.mercurial-scm.org/D10538