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

Re: Converting svnperms.py to use subprocess (so it works on !unix)

From: Trent Nelson <svn-dev-list_at_trentnelson.com>
Date: Mon, 8 Sep 2008 18:21:40 +0000

On Mon, Sep 08, 2008 at 03:58:28PM +0100, Julian Foad wrote:
> On Mon, 2008-09-08 at 10:07 +0000, Trent Nelson wrote:
> > If you try and use svnperms.py on Windows, you get a pretty funky
> > error:
> [...]
> > The commands module, which svnperms.py uses to run underlying
> > svnlook commands, only works on Unix. I'd like to convert it
> > to use subprocess instead, which should make it a lot more
> > platform independent than it currently is.
> >
> > Before I do, just wanted to ping the list to see if I'm missing
> > something obvious.
> Well, the "subprocess" module only exists since Python 2.4. That would
> increase the minumum required version of Python for this script from 2.2
> (at a guess) to 2.4. That may well be the best thing to do, but I don't
> know.
    Falling back on the commands module if subprocess is unavailable is
    fine for Unix. For Windows, it should definitely error out up front
    and indicate that a newer version of Python is required (which will
    typically be less hassle to organise on a Windows box). Patches

    mailer.py suffers a similar issue, as per my other thread.


To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-09-08 20:21:55 CEST

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.