Why do I get 'Bad file descriptor' when trying sys.stdin.read() in subversion pre-revprop-change py script?
问题 I'm trying pre-revprop-change hook script on a Windows machine, but find a tough problem. I distill my problem to the following scenario: I have C:\csvn\data\repositories\tr1\hooks\pre-revprop-change.bat with content: D:\svntest\testhook.py %* exit %ERRORLEVEL% testhook.py is: import os, sys if __name__ == '__main__': # sys.stderr.write(sys.version+'\n') # this is OK, tried. newtext = sys.stdin.read() # try to read new log message sys.stderr.write('newtext is: %s\n'%newtext) exit(2) However,