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

svnperms.py has OS-dependency (does not run on Windows)

From: Bernhard Merkle <bernhard_merkle_at_gmx.de>
Date: 2007-10-05 13:23:44 CEST

Hi there,

I am using snvperms.py to maintain permissions for the repository.
Unfortunately svnperms.py has an unnecessary OS-dependency.

The method getstatusoutput() does not run on Windows.
Patching this is quite simple, as you can see from the code below.

Questions:
- I would like to file this as a bug for svnperms.py (with patch below)
- I am wondering if anybody else has this problem ? (no svn servers on windows which have to use permissions ? ;-)

kind regards,
Bernhard.

def my_getstatusoutput(cmd):
    """Return (status, output) of executing cmd in a shell."""
    import os
# does not run on windows
# pipe = os.popen('{ ' + cmd + '; } 2>&1', 'r')
    pipe = os.popen(cmd + ' 2>&1', 'r')
    text = pipe.read()
    sts = pipe.close()
    if sts is None: sts = 0
    if text[-1:] == '\n': text = text[:-1]
    return sts, text

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Oct 5 13:24:10 2007

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.