[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: Garrett Rooney <rooneg_at_electricjellyfish.net>
Date: 2005-11-09 05:04:42 CET

On 11/8/05, Madan U Sreenivasan <madan@collab.net> wrote:

> Pl. find below a patch that makes this action portable to both windows
> and unix. What however requires more comments is how to extract the path
> of the python executable itself in the line...
> + hook_script_code = ( "#!/usr/bin/env python\n"
> How do I find the path to the python executable? Any ideas?
> Pl. feel free to comment on the below patch...
>
> ------------------------8<----------------8<-------------------
> Index: commit_tests.py
> ===================================================================
> --- commit_tests.py (revision 17264)
> +++ commit_tests.py (working copy)
> @@ -1970,11 +1970,16 @@
>
> # Setup the hook configs to echo data back
> post_commit_hook = svntest.main.get_post_commit_hook_path (repo_dir)
> + if sys.platform == 'win32':
> + post_commit_hook = os.path.join (post_commit_hook, ".bat")
> +
> + 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...

-garrett

---------------------------------------------------------------------
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:05:36 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.