[Svnmerge] [PATCH] Read command line defaults from config file
Michael Haggerty
mhagger at alum.mit.edu
Thu Sep 21 10:05:36 PDT 2006
Giovanni Bajo wrote:
> Rich Williams wrote:
>>> Please find attached a patch which adds some basic config
>>> file support (as previously discussed). I've also attached a
>>> sample config file (which needs to be in your subversion
>>> settings folder - ~/.subversion on *nix, somewhere else on
>>> Windows).
>>>
>>> As before, I've not tested this outside of Linux / Python 2.4
>>> and I'm not really very familiar with Python, so please forgive
>>> any obvious blunders.
>
> Thanks. A quick review:
>
> - I believe that options in the config file should be processed BEFORE
> options on the command line, so that the latter can override the former. For
> instance, you probably want that "svn avail --diff" shows the diffs even if
> you had "--log" in the config file. Use args = ini_args + args instead of
> extend.
For boolean options, this might imply that you need inverse options to
be able to override options set in the config file. For example, if the
config file lists "--show-changes", it would be useful to be able to
specify "--no-show-changes" on the command line.
> - I'm concerned on the effects of an existing config file on the testsuite.
> I believe you could extract the ini-parsing code into a function
> (read_config or something), and then, from the testsuite, we can inject a
> dummy function in its place so to ignore any existing config file. Does it
> make sense?
Better would be if you could override the config file via the command
line, using an option like "--no-config" or "--config-dir=BLAH" (the
latter option is available in svn). That would be useful to users who
have multiple "environments" and would also help with testing--tests
could specify their own config files to test the config file feature itself.
Michael
More information about the Svnmerge
mailing list