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

Re: [PATCH] hot-backup.py.in

From: Chris Wesseling <chris.wesseling_at_xs4all.nl>
Date: 2005-03-17 19:49:29 CET

On Thu, Mar 17, 2005 at 03:01:39AM -0000, Max Bowsher wrote:
> chars@xs4all.nl wrote:
[hot-backup.py breaks on ancient Python 1.5.2 (RH 7.2)
tried the following]
> >try:
> > dir(os.popen3)
> >except AttributeError:
> > import popen2
> >
> > def popen3fix(cmd):
> > outfile, infile, errfile = popen2.popen3(cmd)
> > return infile, outfile, errfile
> >
> > os.popen3 = popen3fix
[still breaks on a function new in Python 1.6, changed shebang to
python2]
>
> "python2" is not at all a standard name, so I don't think we should be
> using it, because it will only exist if the distribution or sysadmin has
> specifically taken it upon themselves to create it.
>
> Python 1.x is realistically ancient at this point.
>
> I regret that this isn't going to make _your_ life any easier, but...
>
> I think for the majority of users it would be better to change all the
> python script shebang lines in the Subversion distribution to refer to
> "python", not "python2" - to save people from needing to add their own
> non-standard link, or edit the shebang lines of our scripts.
>
> Max.

_My_ life is already sorted out with the mentioned update, thanks for
your concern though ;)

If python2 isn't a standard name, I'll take your word above RedHats
strange behaviour anytime. I just copied it from other scripts in the
tools/examples dir.

What I do suggest then, is change to a uniform shebang for all Python
scripts and hooks. Especially those in the examples, we wouldn't want to
give any bad one, would we? :)

And at least document the needed Python version in the code, if not
implement some version checking or --help.
Now you just get an Error and a Traceback, not particularly friendly to
non hackers.
I'm new to python (these were my first lines of code), so my fingers
are itching to dive into some good code.
If we manage to get some concensus here, I'm more than willing to put in
my effort. Be it just changing the shebangs and drop a line in a README.

Chris

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Mar 17 19:51:01 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.