reviewboard/scmtools/managers.py (Diff revision 1)Show all issues
Review Request #11338 — Created Dec. 17, 2020 and submitted
This replaces the core logic from the
command with a call to a new
method. This method does the work of looking for any entrypoint-provided
SCMTools not already in the database, and registers them.
The new implementation executes fewer queries, and slims down the query
for the initial lookup of tools. The management command is also less
verbose, providing a single-line summary after registration instead of a
one line per tool.
registerscmtoolscommand with registering 1 SCMTool, many
SCMTools, and no SCMTools.
Fixed logging in the error condition.
Revision 2 (+124 -60)
|reviewboard/scmtools/managers.py (Diff revision 2)|
Totally your call, but personally I feel like a better wrapping would be:
new_tools.append( self.model(name=name, class_name=class_name))