Clarify/document some parameter processing, particular around groups
that specify they only apply to particular repositories (via the
"for_repos" config value).
Lots of comments added to clarify the processing/handling.
* tools/hook-scripts/mailer/mailer.py:
(main): pass REPOS_DIR rather than REPOS to the Config constructor.
It only needs the directory, not the repository object.
(Config.__init__): accept the REPOS_DIR instead of a Repository
object. Rename GLOBAL_PARAMS to DEFAULT_PARAMS for consistency in
some later naming. Omit saving the (old) GLOBAL_PARAMS concept, as
nobody ever uses that. Pass the DEFAULT_PARAMS into prep_groups(),
and update to pass REPOS_DIR.
(Config._prep_groups): revise params to take REPOS_DIR and
DEFAULT_PARAMS (instead of using the old dropped-off globals).
Add new repos_params() function to look for a "for_repos" config
value to see if this group/section applies to the repository
specified by REPOS_DIR. Replaces two similar hunks of code in this
method. Use repos_params() for the self._default_params and each
group/section found in the configuration file.
git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1917632 13f79535-47bb-0310-9956-ffa450edef68
1 file changed