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

Re: svn trunk r17244: FAIL (x86_64-unknown-linux-gnu static ra_svn fsfs)

From: <kfogel_at_collab.net>
Date: 2005-11-09 04:12:38 CET

Garrett Rooney <rooneg@electricjellyfish.net> writes:
> > + hook_script_code = ( "#!/usr/bin/env python\n"
> > + "import sys\n"
> > + "\n"
> > + "sys.stderr.write('Nothing doing')\n"
> > + "sys.exit(-1)\n")
>
> I'm not a windows person, but I'm pretty sure you can't just stick
> python code into a .bat file on windows and expect it to do anything
> useful...
>
> You really need to write out an actual .bat script, I imagine there's
> some way to make a .bat write to the equivalent of stderr, but
> honestly I don't know what the syntax would be...

If we want a portable hook script to run as part of a regression test
suite, we can write the script in Python, since we *know* Python is
available. You can get the path to the current interpreter, e.g.:

   python -c "import sys; print sys.executable"

So let's have the test suite code do one of two things:

   - On systems that support "#!", write out the hook script directly
     in Python, putting sys.executable after the "#!".

   - On Windows, write out a bone-simple .bat script that just invokes
     sys.executable on the real hook script, which, of course, is
     written in Python.

(I don't know if we have to worry about systems that are not Windows
but don't support "#!".)

There is no reason to have portability problems in our hook scripts if
we are already running an entire regression suite on a system! :-)

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Nov 9 05:30:47 2005

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.