[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-11-27 15:07:25 CET

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.

23a24,33
> def my_getstatusoutput(cmd):
> """Return (status, output) of executing cmd in a shell."""
> import os
> # 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
144c157
< status, output = commands.getstatusoutput(cmdstr)

---
>         status, output = my_getstatusoutput(cmdstr)
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Nov 27 15:09:59 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.