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

Re: [PATCH] Make svnperms.py work on Windows

From: Branko Čibej <brane_at_apache.org>
Date: Mon, 03 Jun 2013 13:29:51 +0200

On 03.06.2013 12:47, Neels Hofmeyr wrote:
> Hi dev,
>
> I tried to get svnperms.py going on a windows server (<rolls eyes>),
> but needed this patch to do so:
>
> http://svn.haxx.se/dev/archive-2009-04/0668.shtml
>
> It seems that no-one has answered Sergey on his patch submission back
> in 2009. (According to haxx.se, that thread ends right there.)
>
> The patch removes a try-import-except-import thing and replaces it with
> a straightforward 'from subprocess import Popen,PIPE'. AFAICT that works
> almost everywhere and is a good change.
>
> So, if there are no vetos, I'll commit this patch.

I believe the patch is not correct. It assumes unlimited buffering on
the stdout and stderr pipes, which is never the case. The way Popen is
used on the patch can cause the parent and child processes to deadlock.

I suggest using Popen.communicate instead.

See:
http://docs.python.org/2.7/library/subprocess.html#subprocess.Popen.wait

-- Brane
Received on 2013-06-03 13:30:02 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.