[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: Greg Stein <gstein_at_lyra.org>
Date: 2002-04-15 09:17:27 CEST

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.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
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:17:55 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.