Allow SCMClients to specify their diff tool requirements and instantiate.
Review Request #12602 — Created Sept. 14, 2022 and submitted
This introduces a new
BaseSCMClient.requires_diff_tool
attribute,
which can be set to indicate thediff()
method's requirements.To indicate that any available diff tool can be used, this should be set
toTrue
.To indicate that a particular diff tool or tools are required, this can be
set to alist
of diff tool IDs.To indicate that a tool diff is not needed (if, for example, the SCM's
native diff tool is used), this can remain at the default ofFalse
.A new
BaseSCMClient.get_diff_tool()
method is used to attempt to fetch
the right diff tool based on this setting. It will raise a
MissingDiffToolError
if one is unavailable.
Unit tests pass.
Tested with in-progress changes making use of this new functionality.
Summary | ID |
---|---|
6d650126c89d86cf261962487444a0a1f66c73e8 |