Add a flag on commands to indicate that diffing is required.
Review Request #12605 — Created Sept. 15, 2022 and submitted
This introduces
Command.needs_diffs
. If set toTrue
, 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
andrbt 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 userbt 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
andrbt 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.
Summary | ID |
---|---|
ee83ba45d2adaa1192522b1fba921d812e902ff0 |