Ensure the reviewboardrc in HOME is only parsed once
Review Request #7232 — Created April 21, 2015 and submitted — Latest diff uploaded
Previously, the list of configuration paths for
get_config_paths
could have duplicates in the case where the current working directory
is a subdirectory of the home directory and a configuration file exists
in the home directory. This will lead to the config in the home
directory being parsed twice, which is undesirable.Also the documentation in
get_config_paths
was incorrect as to the
order of precedence in the returned list of paths. This has been
corrected.
Ran unit tests.
Posted this review request.
Checked the output of
get_config_paths
before and after applying this
patch. Before applying this patch, my~/.reviewboardrc
appears in the
list of config paths twice. After applying this patch, it only appears
once and is the last element of the list.Manually verified the result of
load_config
to ensure that my
./reviewboardrc
was only parsed once.