You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Paul Gross <pa...@grosss.net> on 2003/10/14 06:16:19 UTC
Scripts across multiple platforms
I use my subversion repository from both windows and unix. I already use
the property to have my files use the native line endings. The problem is
that I use a bunch of python scripts. On Unix, the first line has to be
#!/usr/local/bin/python, but on windows, its something like
#!/python23/python.exe.
So the general question is if there is a way to make subversion change the
contents of files based on operating system at checkout time? Or more
specifically, is there a nice way to make it insert the correct script
header whenever I checkout/update? Thanks.
Paul Gross
paul@grosss.net
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Scripts across multiple platforms
Posted by Paul Gross <pa...@grosss.net>.
But the python scripts are being run as a cgi with apache, which does rely
on the script header. Apache uses the path in the header to find the
python interpreter. If the path isn't correct, I get an Internal Server Error.
At 12:42 PM 10/14/2003, Brandon Ehle wrote:
>Paul Gross wrote:
>
>>I use my subversion repository from both windows and unix. I already use
>>the property to have my files use the native line endings. The problem
>>is that I use a bunch of python scripts. On Unix, the first line has to
>>be #!/usr/local/bin/python, but on windows, its something like
>>#!/python23/python.exe.
>>
>>So the general question is if there is a way to make subversion change
>>the contents of files based on operating system at checkout time? Or
>>more specifically, is there a nice way to make it insert the correct
>>script header whenever I checkout/update? Thanks.
>You shouldn't need to do this. Unless you are using cygwin on Windows,
>Windows uses the OS facilities for binding a file type to its handler.
>If you use cygwin, you can easily fix the scripts to work from anywhere by
>changing the initial line to:
>
>#!/usr/bin/env python
>
>Which will find the first instance of python in your path on Unix or Windows.
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
>For additional commands, e-mail: users-help@subversion.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Scripts across multiple platforms
Posted by Greg Thomas <Gr...@TheThomasHome.co.uk>.
On Tue, 14 Oct 2003 10:42:34 -0700, Brandon Ehle <az...@yahoo.com>
wrote:
> Paul Gross wrote:
>
> > I use my subversion repository from both windows and unix. I already
> > use the property to have my files use the native line endings. The
> > problem is that I use a bunch of python scripts. On Unix, the first
> > line has to be #!/usr/local/bin/python, but on windows, its something
> > like #!/python23/python.exe.
> >
> You shouldn't need to do this. Unless you are using cygwin on Windows,
Or the script is (e.g.) a CGI script run through Apache. Apache on
Win32 examines the first line of the script to determine the script
interpreter in a similar way UNIX that shells do.
Greg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Scripts across multiple platforms
Posted by Brandon Ehle <az...@yahoo.com>.
Paul Gross wrote:
> I use my subversion repository from both windows and unix. I already
> use the property to have my files use the native line endings. The
> problem is that I use a bunch of python scripts. On Unix, the first
> line has to be #!/usr/local/bin/python, but on windows, its something
> like #!/python23/python.exe.
>
> So the general question is if there is a way to make subversion change
> the contents of files based on operating system at checkout time? Or
> more specifically, is there a nice way to make it insert the correct
> script header whenever I checkout/update? Thanks.
>
You shouldn't need to do this. Unless you are using cygwin on Windows,
Windows uses the OS facilities for binding a file type to its handler.
If you use cygwin, you can easily fix the scripts to work from anywhere
by changing the initial line to:
#!/usr/bin/env python
Which will find the first instance of python in your path on Unix or
Windows.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org