Add an attribute to SCMTool for specifying the unique SCMTool ID.
Review Request #10799 — Created Nov. 18, 2019 and submitted — Latest diff uploaded
SCMTools are a very old part of Review Board, and existed long before
any modern registry mechanisms were put in place. We've used an
in-database representation, theToolmodel, to manage the
registration. In some cases, we used its primary key to uniquely
identify the particular SCMTool within the system. In others, we used
theSCMTool.nameattribute instead (in the API, for instance).We've long known that we've wanted to replace the existing system with a
modern registry. While this change does not do that, this takes a baby
step by adding aSCMTool.scmtool_idattribute, which defines a unique
ID for the tool. If not populated, it will default to the key in the
EntryPoint that registered the tool.This will allow us to more easily make references to the tool in places
like mapping dictionaries, and to start writing more future-proof code
that centers more around theSCMToolthan theTool. An upcoming
change will begin movingRepositoryFormover to this, as a precursor
to some larger-scale work that's needed.
Unit tests pass.
Tested along with upcoming changes to
RepositoryForm.