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

mailer.py hook-script and Python bug #3905

From: Roberto Mannai <robermann_at_gmail.com>
Date: Tue, 8 Sep 2009 21:46:22 +0200

Hello
Maybe you already know the following issue, but "better twice than
once". Forgive me if this is the wrong mailing list.

When running the hook-script from command line, it works.

When it is triggered by an SVN post commit, it fails with the below message:
"WindowsError: [Error 6] The handle is invalid". It looks like the
Python bug on http://bugs.python.org/issue3905 (still open).

I also tryied to set the same environment variables used when starting
manually, but still it did not work.

Finally I applied the workaround in http://bugs.python.org/issue3905,
that is adding "stdin=subprocess.PIPE," to the Popen parameters on the
DiffContent constructor (line 880), resulting in the following
statement:

    self.pipe = subprocess.Popen(cmd, stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
                                 stderr=subprocess.STDOUT,
                                 close_fds=sys.platform != "win32")

This time SVN commits were able to successfully run the mailer.py script.

Environment:
- Subversion version: 1.6.5
- Python version: 2.6
- OS: Windows XP

I hope this helps.

Ciao
Roberto Mannai

---
Bored of programming? Play the code! www.codesounding.org
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2392625
Received on 2009-09-09 02:50:05 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.