[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r17284 - trunk/subversion/tests/clients/cmdline/svntest

From: Erik Huelsmann <ehuels_at_gmail.com>
Date: 2005-11-10 08:21:19 CET

On 11/10/05, djames@tigris.org <djames@tigris.org> wrote:
> Author: djames
> Date: Wed Nov 9 18:40:44 2005
> New Revision: 17284
>
> Modified:
> trunk/subversion/tests/clients/cmdline/svntest/actions.py
> trunk/subversion/tests/clients/cmdline/svntest/main.py
>
> Log:
> Simplify implementation of enable_revprop_changes by using
> get_pre_revprop_change_hook_path and create_python_hook_script.
>
> * subversion/tests/clients/cmdline/svntest/actions.py
> (enable_revprop_changes): Simplify implementation.
>
> * svntest/main.py
> (get_pre_revprop_change_hook_path): New function.
>
>
>
> Modified: trunk/subversion/tests/clients/cmdline/svntest/actions.py
> Url: http://svn.collab.net/viewcvs/svn/trunk/subversion/tests/clients/cmdline/svntest/actions.py?rev=17284&p1=trunk/subversion/tests/clients/cmdline/svntest/actions.py&p2=trunk/subversion/tests/clients/cmdline/svntest/actions.py&r1=17283&r2=17284
> ==============================================================================
> --- trunk/subversion/tests/clients/cmdline/svntest/actions.py (original)
> +++ trunk/subversion/tests/clients/cmdline/svntest/actions.py Wed Nov 9 18:40:44 2005
> @@ -808,19 +808,11 @@
> path = os.path.join(wc_dir, main.get_admin_name(), 'lock')
> main.file_append(path, "stop looking!")
>
> -def enable_revprop_changes(repos_dir):
> +def enable_revprop_changes(repo_dir):
> """Enable revprop changes in a repository REPOS_DIR by creating a
> pre-revprop-change hook script and (if appropriate) making it executable."""
> - if os.name == 'posix':
> - hook = os.path.join(repos_dir,
> - 'hooks', 'pre-revprop-change')
> - main.file_append(hook, "#!/bin/sh\n\nexit 0\n")
> - os.chmod(hook, 0755)
> - elif sys.platform == 'win32':
> - hook = os.path.join(repos_dir,
> - 'hooks', 'pre-revprop-change.bat')
> - main.file_append(hook, "@exit 0\n")
> -
>
> + hook_path = main.get_pre_revprop_change_hook_path (repo_dir)
> + main.create_python_hook_script (hook_path, 'import sys; sys.exit(0)')
>
> ### End of file.
>
> Modified: trunk/subversion/tests/clients/cmdline/svntest/main.py
> Url: http://svn.collab.net/viewcvs/svn/trunk/subversion/tests/clients/cmdline/svntest/main.py?rev=17284&p1=trunk/subversion/tests/clients/cmdline/svntest/main.py&p2=trunk/subversion/tests/clients/cmdline/svntest/main.py&r1=17283&r2=17284
> ==============================================================================
> --- trunk/subversion/tests/clients/cmdline/svntest/main.py (original)
> +++ trunk/subversion/tests/clients/cmdline/svntest/main.py Wed Nov 9 18:40:44 2005
> @@ -218,6 +218,11 @@
>
> return os.path.join(repo_dir, "hooks", "post-commit")
>
> +def get_pre_revprop_change_hook_path(repo_dir):
> + "Return the path of the pre-revprop-change hook script in REPO_DIR."
> +
> + return os.path.join(repo_dir, "hooks", "pre-revprop-change")
> +
>
> # Run any binary, logging the command line (TODO: and return code)
> def run_command(command, error_expected, binary_mode=0, *varargs):

FAIL output from svn-builder (win32):

UNEXPECTED EXCEPTION:
Traceback (most recent call last):
  File "D:\svnbuild\src-trunk\subversion\tests\clients\cmdline\svntest\testcase.py",
line 105, in run
    rc = apply(self.pred.func, args)
  File "D:\svnbuild\src-trunk\subversion/tests/clients/cmdline/trans_tests.py",
line
608, in cat_keyword_expansion
    svntest.actions.enable_revprop_changes(svntest.main.current_repo_dir)
  File "D:\svnbuild\src-trunk\subversion\tests\clients\cmdline\svntest\actions.py",
line 816, in enable_revprop_changes
    main.create_python_hook_script (hook_path, 'import sys; sys.exit(0)')
  File "D:\svnbuild\src-trunk\subversion\tests\clients\cmdline\svntest\main.py",
line 512, in create_python_hook_script
    file_append (hook_py, hook_script_code)
  File "D:\svnbuild\src-trunk\subversion\tests\clients\cmdline\svntest\main.py",
line 389, in file_append
    fp = open(path, 'a') # open in (a)ppend mode
IOError: [Errno 2] No such file or directory:
'svn-test-work\\repositories\\trans_tests-8\\hooks\\pre-revprop-change\\.py'
FAIL: trans_tests.py 8: keyword expanded on cat
Received on Thu Nov 10 08:22:08 2005

This is an archived mail posted to the Subversion Dev mailing list.