Add SCMTool.lookup_name, and use it instead of name for registration.
Review Request #13475 — Created Jan. 1, 2024 and submitted
We'll soon be in a position where one of our bundled SCMTools will need
its name changed. Doing so would result inToolDB entry conflicts and
registry lookup issues, impacting the API and repositories.To prepare for this, a new attribute is being introduced to provide a
stable name for lookup purposes:SCMTool.lookup_name.This defaults to
SCMTool.name(by way of an overridable
classproperty). Subclasses can override this to specify an explicit
name when they're going to change theirnameproperty.
lookup_nameis used for registration, lookup, conflict resolution, and
Toolobject creation. This ensures that, behind the scenes, nothing
changes for any tools. We simply need to make sure we setlookup_name
on anySCMToolwhen we're ready to changename.
Unit tests pass.
Tested this with the upcoming Plastic work, ensuring that the tool and
all registry-related operations worked when changingnameand setting
lookup_name.
| Summary | ID |
|---|---|
| a15f7a0c7b3094462f93187f2936c0d239fb827c |