Reimplement the TREES config option.
Review Request #14219 — Created Oct. 31, 2024 and submitted — Latest diff uploaded
Older versions of RBTools had an undocumented config option called
TREES
, which allowed people to set theREVIEWBOARD_URL
for multiple
remote repository paths from a single .reviewboardrc file in their home
directory. After a deprecation cycle, we removed this, but it turns out
that some people were using it and had just skipped all the intermediate
versions of RBTools and went straight from 1 to 5, missing the
deprecation warnings.This change implements a new version of
TREES
which is much more full
featured. This allows using either the remote repository path or local
directory name as the keys, and the value dictionaries now support the
full RBTools configuration.The way this works is that we go through the basic initialization
routine to the point where we've initialized the repository. After that,
we'll look to see if there's a matching TREES configuration. If there
is, we merge that into the base config, remove TREES entirely from the
loaded config, and then rerun all initialization.
- Set up TREES in my own .reviewboardrc file and verified that things
worked as expected. - Added some new tests that cover the three main codepaths for command
initialization--no configured server URL, a single server URL, and a
server URL that gets overridden inside of TREES. - Ran all unit tests.