Allow SCMClients to specify their diff tool requirements and instantiate.

Review Request #12602 — Created Sept. 14, 2022 and submitted

Information

RBTools
release-4.x

Reviewers

This introduces a new BaseSCMClient.requires_diff_tool attribute,
which can be set to indicate the diff() method's requirements.

To indicate that any available diff tool can be used, this should be set
to True.

To indicate that a particular diff tool or tools are required, this can be
set to a list 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 of False.

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
Allow SCMClients to specify their diff tool requirements and instantiate.
This introduces a new `BaseSCMClient.requires_diff_tool` attribute, which can be set to indicate the `diff()` method's requirements. To indicate that any available diff tool can be used, this should be set to `True`. To indicate that a particular diff tool or tools are required, this can be set to a `list` 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 of `False`. 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.
6d650126c89d86cf261962487444a0a1f66c73e8
maubin
  1. Ship It!
  2. 
      
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-4.x (0789308)