A: 

To get the error message while doing the SVN commit, you should be able to change:

if __name__ == "__main__": 
    if len(sys.argv) < 5: 
        print "For usage: %s --help" % (sys.argv[0]) 
    else: 
        CommitHook() 

to:

if __name__ == "__main__": 
    if len(sys.argv) < 5: 
        print "For usage: %s --help" % (sys.argv[0]) 
    else: 
        try:
            CommitHook()
        except Exception, e:
            print >> sys.stderr, str(e)
            sys.exit(1)
Dingo
Sorry, I tried to output the error to a file (couldn't see them in TortoiseSVN), but it didn't work.I ran the below script in IDLE without problems, but when I tried to implement it in trac-post-commit-hook, nothing happens.import syserror_log = open("C:\error_log.txt", 'w')sys.stderr = error_logtry: CommitHook()except Exception, e: print >> sys.stderr, str(e)f.close()error_log.close()Any tips? Thanks!
marty3d
A: 

Anybody has a detail step how to adopt this solution? I am running VisualSVN 2.1.1 on Windows 2003 Server.

my

Ariel