Philip Martin wrote:
>
> I've got a regression test failure, but it appears to be nothing to do
> with my change. It's in a test you added in r7351:
>
> $ ~/sw/subversion/svn/subversion/tests/clients/cmdline/copy_tests.py 20
> /home/pm/sw/subversion/svn/subversion/tests/clients/cmdline/copy_tests.py:1191: SyntaxWarning: local name 'wc_dir' in 'revision_kinds_local_source' shadows use of 'wc_dir' as global in nested scope 'cp_test'
> def revision_kinds_local_source(sbox):
> /home/pm/sw/subversion/svn/subversion/tests/clients/cmdline/copy_tests.py:1191: SyntaxWarning: local name 'mu_path' in 'revision_kinds_local_source' shadows use of 'mu_path' as global in nested scope 'cp_test'
> def revision_kinds_local_source(sbox):
> /home/pm/sw/subversion/svn/subversion/tests/clients/cmdline/copy_tests.py:1191: SyntaxWarning: local name 'expected_disk' in 'revision_kinds_local_source' shadows use of 'expected_disk' as global in nested scope 'cp_test'
> def revision_kinds_local_source(sbox):
> UNEXPECTED EXCEPTION:
> Traceback (most recent call last):
> File "/home/pm/sw/subversion/svn/subversion/tests/clients/cmdline/svntest/testcase.py", line 101, in run
> rc = apply(self.pred.func, args)
> File "/home/pm/sw/subversion/svn/subversion/tests/clients/cmdline/copy_tests.py", line 1239, in revision_kinds_local_source
> cp_test('a0', 2, rWC)
> File "/home/pm/sw/subversion/svn/subversion/tests/clients/cmdline/copy_tests.py", line 1220, in cp_test
> dst_path = os.path.join(wc_dir, dst)
> NameError: global name 'wc_dir' is not defined
> FAIL: copy_tests.py 20: revision-kind keywords with non-URL source
>
> I'm using Python 2.1.3 on Linux. Ah-ha, I see it is happening on
> svn-breakage@subversion as well, so I think I can say it's not my
> problem :)
Apologies. I should learn Python before I continue writing in it. (My Python, v. 2.2.1, is not giving those warnings or errors.)
What I intended was for the nested funtion "cp_test" to be able to access the variables "wc_dir" etc. that exist within the outer function "revision_kinds_local_source". Is there an easy way to do that? I will get some sort of fix in within an hour or two anyway.
- Julian
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Oct 12 22:15:52 2003