Index: subversion/tests/cmdline/commit_tests.py
===================================================================
--- subversion/tests/cmdline/commit_tests.py	(revision 24129)
+++ subversion/tests/cmdline/commit_tests.py	(working copy)
@@ -829,40 +829,56 @@
   wc_dir = sbox.wc_dir
   repo_dir = sbox.repo_dir
 
-  # Setup the hook configs to echo data back
+  # Set the format of the hook depending on the OS
+  if os.name == "nt":
+    hook_format = "echo %s >> %%1\\hooks.log"
+  else:
+    hook_format = "#!/bin/sh\necho %s >> $1/hooks.log"
+
+  # Setup the hook configs to log data to a file
   start_commit_hook = svntest.main.get_start_commit_hook_path(repo_dir)
   svntest.main.file_append(start_commit_hook,
-                           """#!/bin/sh
-                           echo $1""")
+                           hook_format % "start_commit_hook")
   os.chmod(start_commit_hook, 0755)
 
   pre_commit_hook = svntest.main.get_pre_commit_hook_path(repo_dir)
   svntest.main.file_append(pre_commit_hook,
-                           """#!/bin/sh
-                           echo $1 $2 """)
+                           hook_format % "pre_commit_hook")
   os.chmod(pre_commit_hook, 0755)
 
   post_commit_hook = svntest.main.get_post_commit_hook_path(repo_dir)
   svntest.main.file_append(post_commit_hook,
-                           """#!/bin/sh
-                           echo $1 $2 """)
+                           hook_format % "post_commit_hook")
   os.chmod(post_commit_hook, 0755)
 
   # Modify iota just so there is something to commit.
   iota_path = os.path.join(wc_dir, "iota")
   svntest.main.file_append(iota_path, "More stuff in iota")
 
-  # Now, commit and examine the output (we happen to know that the
-  # filesystem will report an absolute path because that's the way the
-  # filesystem is created by this test suite.
-  abs_repo_dir = os.path.abspath(repo_dir)
-  expected_output = [abs_repo_dir + "\n",
-                     abs_repo_dir + " 1\n",
-                     abs_repo_dir + " 2\n"]
-  svntest.actions.run_and_verify_svn(None, expected_output, [],
+  # Commit, no output expected.
+  svntest.actions.run_and_verify_svn(None, [], [],
                                      'ci', '--quiet',
                                      '-m', 'log msg', wc_dir)
 
+  # Now check the logfile
+  logfilename = os.path.join(os.path.abspath(repo_dir), "hooks.log")
+  if os.path.exists(logfilename):
+    lfd = open(logfilename)
+    data = lfd.read(65536).replace("\r\n", "\n").replace("\r", "\n")
+    lfd.close()
+    os.unlink(logfilename)
+    exp_data = "start_commit_hook\npre_commit_hook\npost_commit_hook\n"
+    if data != exp_data:
+      print "hook logfile:", logfilename
+      print "EXPECTED CONTENT:"
+      print exp_data,
+      print "ACTUAL CONTENT:"
+      print data,
+      print "-------"
+      raise svntest.actions.SVNUnexpectedOutput("wrong hook logfile content")
+  else:
+    print "hook logfile:", logfilename
+    raise svntest.actions.SVNUnexpectedOutput("hook logfile not found")
 
 #----------------------------------------------------------------------
 
@@ -2299,7 +2315,7 @@
               hudson_part_1_variation_2,
               hudson_part_2,
               hudson_part_2_1,
-              XFail(hook_test),
+              hook_test,
               merge_mixed_revisions,
               commit_uri_unsafe,
               commit_deleted_edited,
