Let user specify search path for .reviewboardrc
Review Request #7679 — Created Oct. 6, 2015 and submitted
If a user sets $RBTOOLS_CONFIG_PATH, it should contain a list of paths separated by the characters conventionally used for this on the operating system (":" on Linux, Mac OS X, ";" on Windows). These paths are searched first for .reviewboardrc and can be used to override repository-wide settings. Reviewed at https://reviews.reviewboard.org/r/7679/
Ran
RBTOOLS_CONFIG_PATH=$HOME rbt status
in a project directory withREVIEWBOARD_URL
set tohttp://127.0.0.1
in$HOME/.reviewboardrc
, got:ERROR: Unexpected API Error: HTTP 404
Confirmed that it picks up the private
.reviewboardrc
first.
Description | From | Last Updated |
---|---|---|
:file:`.reviewboardrc` |
brennie |
-
This is going to be very controversial. We had initially done this when we moved from post-review to rbt, and we had a number of complaints. I'd like to see some discussion of this on the Review Board mailing list before we accept this change.
- Commit:
-
6ea0ffb2cb9d85c6f47af7eba476482151306f296c1524f91223aef40f319d828a5e456d95fdea34
- Diff:
-
Revision 2 (+13 -10)
-
Tool: PEP8 Style Checker Processed Files: rbtools/utils/filesystem.py Tool: Pyflakes Processed Files: rbtools/utils/filesystem.py
- Change Summary:
-
Implemented searching $RBTOOLS_CONFIG_PATH for .reviewboardrc rather than putting treating $HOME/.reviewboardrc by default.
- Summary:
-
Ensure the reviewboardrc in HOME takes precedenceLet user specify search path for .reviewboardrc
- Description:
-
~ This is important so users can e.g. set GUESS_FIELDS to a different
~ value than a non-default value set in a project. Setting bogus values ~ for actually project-specific settings (e.g. REVIEWBOARD_URL) will ~ obviously fail. ~ If a user sets $RBTOOLS_CONFIG_PATH, it should contain a list of paths
~ separated by the characters conventionally used for this on the ~ operating system (":" on Linux, Mac OS X, ";" on Windows). These paths ~ are searched first for .reviewboardrc and can be used to override + repository-wide settings. Reviewed at https://reviews.reviewboard.org/r/7679/
- Testing Done:
-
~ Ran
rbt status
in a project directory withREVIEWBOARD_URL
set tohttp://127.0.0.1
in$HOME/.reviewboardrc
, got:~ Ran
RBTOOLS_CONFIG_PATH=$HOME rbt status
in a project directory withREVIEWBOARD_URL
set tohttp://127.0.0.1
in$HOME/.reviewboardrc
, got:ERROR: Unexpected API Error: HTTP 404
~ Confirmed that it picks up the private
reviewboardrc
first.~ Confirmed that it picks up the private
.reviewboardrc
first.