On 11/11/05, D.J. Heap <djheap@gmail.com> wrote:
> > FAIL: commit_tests.py 34: post commit hook failure case testing
>
>
> This last failure is due to a '\r\n' rather than just a '\n' being
> outputted by the hook -- everything else seems to be fine. I'm not
> sure if it's Python or Windows stderr doing it...reading the Python
> docs leads me to believe it is Python -- but I'm not sure. Maybe a
> Python expert knows some way to suppress it if it is Python?
>
> DJ
>
This tweak to the test scripts works around the newline issue (doesn't
output the newline in the hook output). I'm not sure if it's an
acceptable solution though:
Index: subversion/tests/clients/cmdline/commit_tests.py
===================================================================
--- subversion/tests/clients/cmdline/commit_tests.py (revision 17301)
+++ subversion/tests/clients/cmdline/commit_tests.py (working copy)
@@ -1984,7 +1984,6 @@
"\n",
"Warning: 'post-commit' hook failed with error
output:\n",
"Post-commit hook failed\n",
- "\n"
]
svntest.actions.run_and_verify_svn (None, expected_output, [],
Index: subversion/tests/clients/cmdline/svntest/actions.py
===================================================================
--- subversion/tests/clients/cmdline/svntest/actions.py (revision 17301)
+++ subversion/tests/clients/cmdline/svntest/actions.py (working copy)
@@ -821,6 +821,6 @@
hook_path = main.get_post_commit_hook_path (repo_dir)
main.create_python_hook_script (hook_path, 'import sys; '
- 'print >>sys.stderr, "Post-commit hook failed"; '
+ 'sys.stderr.write("Post-commit hook failed"); '
'sys.exit(1)')
### End of file.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Nov 11 17:28:04 2005