[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Setting $HOME in the testsuite

From: Branko Čibej <brane_at_xbc.nu>
Date: Thu, 23 Dec 2010 05:10:07 +0100

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

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.