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

RE: svn commit: rev 1694 - trunk/subversion/tests/clients/cmdline/svntest

From: Sander Striker <striker_at_apache.org>
Date: 2002-04-15 09:48:49 CEST

> From: Greg Stein [mailto:gstein@lyra.org]
> Sent: 15 April 2002 09:17

> On Sat, Apr 13, 2002 at 03:56:47PM +0200, Sander Striker wrote:
> > > From: sussman@collab.net [mailto:sussman@collab.net]
> > > Sent: 13 April 2002 15:44
> >
> > > striker@tigris.org writes:
> > >
> > > > + # make the repos world-writeable, for mod_dav_svn's sake.
> > > > + os.system('chmod -R a+rw ' + path)
> > > > +
> > >
> > > Um, is this going to work on Win32? Doesn't python have a portable
> > > way to change perms?
> >
> > I copied it from svntest/main.py, so if it doesn't, it is a problem
> > there too.
>
> The portable way to set permissions is:
>
> import os
>
> if hasattr(os, 'chmod'):
> os.chmod(path, mode)
>
> To do this recursively will take a little more work, but that is a lot
> better than using os.system() and the 'chmod' program.

I totally agree. However, I didn't see the harm, since I only copied the
call from elsewhere. I didn't think about the portability issue (my bad).

Is there somekind of dirwalk code in python, so we can just chmod everything
it encounters? Oh, chmod takes mode... Not mode to add... :(
 
> Cheers,
> -g

Want me to revert?

Sander

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Apr 15 09:43:12 2002

This is an archived mail posted to the Subversion Dev mailing list.