Add a flag on commands to indicate that diffing is required.

Review Request #12605 — Created Sept. 15, 2022 and submitted — Latest diff uploaded




This introduces Command.needs_diffs. If set to True, SCMClient
instantiation will check if any required diff tools are available. This
will allow the command to fail early with useful instructions.

This is set on rbt diff and rbt post.

Note that this does mean that rbt post can't be used if the matching
client doesn't have an available diff tool. While it's technically
possible to use rbt post without generating diffs, this isn't the
common case, and an available diff tool is a pretty reasonable
expectation to set.

Unit tests pass.

Tested rbt diff and rbt post with and without a working diff tool
for a client that requires it (Perforce, in my case), when used with an
upcoming change that adds these requirements to each client.