On 23.12.2010 01:37, Hyrum K Wright wrote:
> More fallout from my issue #3765 work: I'm investing using ~/.svnrc to
> provide default arguments to the commandline client. In doing so, it
> makes loads of sense not to use the a developer's ~/.svnrc when
> running the tests. Since this is found via the svn_user_get_homedir()
> function, which uses the $HOME environment variable, we coud easily
> redirect that to avoid this conflict. (It would also allow testing of
> this feature.)
>
> I know we provide a standard config directory in the testsuite, but
> wouldn't it also be reasonable to create a dummy home directory?
> Grepping through the python test suite yield no results for HOME, so I
> assume we are currently using the developer's home directory.
You need to add an option to ignore that "svnrc" (wherever it is)
anyway, otherwise there's no safe way to write scripts that work
reliably on different systems. By implication, the command-line parsing
will have to be revisited:
* parse the command-line
* if not ignored, parse "svnrc" and set option defaults based on the
command
* re-apply options from the actual command line because these should
(and currently do) override any coming from a config file.
Then just tell the test suite to ignore "svnrc". Problem solved, not
least because $HOME has no real meaning on Windows, AFAICR.
I don't believe you can skip one of the parsing steps (i.e., can't
introduce "svnrc" and /not/ dig deep into command and option resolution
order) and still make that config file useful.
-- Brane
Received on 2010-12-23 05:11:01 CET