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

Re: cvs2svn.py patch

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2002-04-14 17:39:16 CEST

On Sun, 2002-04-14 at 05:27, Arkadiusz Miskiewicz wrote:
> - pipe = os.popen('co -q -p%s %s' % (r, f), 'r', 102400)
> + pipe = os.popen('co -q -p%s \'%s\'' % (r, f), 'r', 102400)

This isn't a panacea; the filename could still contain single quotes.

It would be much more robust if you could construct the arguments as a
list rather than relying on the shell. Unfortunately, Python's "os"
interface seems to be very much modeled on the Unix C library rather
than what you'd get if you were designing an interface for Python; so,
just as in C, you have to fork and exec yourself if you want to do
things the robust way.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Apr 14 17:40:17 2002

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.