Reimplement the TREES config option.
Review Request #14219 — Created Oct. 31, 2024 and submitted
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.
Summary | ID |
---|---|
d01e2525ee243c91ee09baaa876bab26d66f47fd |
Description | From | Last Updated |
---|---|---|
continuation line over-indented for visual indent Column: 21 Error code: E127 |
reviewbot | |
We should use :file: for .reviewboardrc |
chipx86 | |
The upcoming release is 5.1. |
chipx86 | |
For this, we want to be explicit and use: ... code-block:: python TREES = { ... |
chipx86 | |
This needs a Version Added. |
chipx86 | |
Missing a Version Added. Same with the classes below. |
chipx86 | |
Missing Returns. |
chipx86 | |
No trailing period here or in the ones below for test docstrings. |
chipx86 | |
Should be 5.1, assuming it's coming to the upcoming release. |
chipx86 | |
Should we add a Raises section to the method docs for this and the NeedsReinitialize error? |
maubin | |
We should maybe use https in the example here, so this doesn't look stale. |
chipx86 |
- Commits:
-
Summary ID 564217e85ecdb0f89b989c354efcc1a313f698bc 35fcbcbd8eeb36ce7701bad4b61e1bfb1060da20 - Diff:
-
Revision 2 (+544 -172)
Checks run (2 succeeded)
- Commits:
-
Summary ID 35fcbcbd8eeb36ce7701bad4b61e1bfb1060da20 795e13f51ca7096d18132913ed978679cfaf55a3 - Diff:
-
Revision 3 (+584 -172)
Checks run (2 succeeded)
- Commits:
-
Summary ID 795e13f51ca7096d18132913ed978679cfaf55a3 d01e2525ee243c91ee09baaa876bab26d66f47fd - Diff:
-
Revision 4 (+600 -172)