You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2009/12/23 13:05:13 UTC

svn commit: r893486 - /subversion/trunk/subversion/tests/cmdline/svntest/actions.py

Author: julianfoad
Date: Wed Dec 23 12:05:12 2009
New Revision: 893486

URL: http://svn.apache.org/viewvc?rev=893486&view=rev
Log:
In the test suite, simplify the message printed by the create_failing_hook()
function: just print the supplied message argument, without a prefix. This
does not affect any existing test but makes it easier for new tests to know
what output to expect.

* subversion/tests/cmdline/svntest/actions.py
  (create_failing_hook): Don't print a prefix before the requested message.

Modified:
    subversion/trunk/subversion/tests/cmdline/svntest/actions.py

Modified: subversion/trunk/subversion/tests/cmdline/svntest/actions.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/actions.py?rev=893486&r1=893485&r2=893486&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/actions.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/actions.py Wed Dec 23 12:05:12 2009
@@ -1575,13 +1575,13 @@
 
 def create_failing_hook(repo_dir, hook_name, text):
   """Create a HOOK_NAME hook in the repository at REPO_DIR that prints
-  a message including TEXT to stderr and exits with an error."""
+  TEXT to stderr and exits with an error."""
 
   hook_path = os.path.join(repo_dir, 'hooks', hook_name)
   # Embed the text carefully: it might include characters like "%" and "'".
   main.create_python_hook_script(hook_path, 'import sys\n'
-    'sys.stderr.write("""%%s hook failed: %%s""" %% (%s, %s))\n'
-    'sys.exit(1)\n' % (repr(hook_name), repr(text)))
+    'sys.stderr.write(' + repr(text) + ')\n'
+    'sys.exit(1)\n')
 
 def enable_revprop_changes(repo_dir):
   """Enable revprop changes in the repository at REPO_DIR by creating a