Add a new Tool.build_base_command() for centralizing command building.
Review Request #11548 — Created March 22, 2021 and submitted
Several tools need to build a command that refers to a temporary
configuration file, to control tool behavior. To avoid a lot of repeated
work and the creation of many temporary files, some tools create part of
the command (and related files) up-front in
execute(). Others don't bother, and this can matter for larger
changes, slowing down execution or flooding the filesystem with
To standardize behavior, this change introduces a new
Tool.build_base_command()method. This will be called in
and the result will be passed on to
handle_file(), which can then build onto it to construct and execute
This is disabled for legacy tools.
Unit tests pass on Python 2.7 and 3.x.