Add a registry for managing and looking up diff tools.
Review Request #12601 — Created Sept. 14, 2022 and submitted — Latest diff uploaded
DiffToolsRegistry, which tracks all available diff
tools. It can be used to look up registered tool classes and instantiate
available tool instances (which will be cached for reuse).
New tools can also be registered dynamically, though this isn't
something that will be useful outside of very specialized custom code.
When looking up available tools, it will instantiate each tool, set it
up and check for availability on the system, and then cache it.
If an available tool can't be found, a
raised. This will contain a list of all tools tried, and any
instructions that candidate tools may provide.
Unit tests pass.
Used this with in-progress changes to SCMClients.