You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Philip Martin <ph...@wandisco.com> on 2010/06/16 16:21:06 UTC

Re: svn commit: r954830 - in /subversion/trunk/subversion/tests/cmdline: svnadmin_tests.py svntest/actions.py svntest/main.py svntest/sandbox.py tree_conflict_tests.py

hwright@apache.org writes:

> Author: hwright
> Date: Tue Jun 15 11:35:36 2010
> New Revision: 954830

> -  if verbose_mode and quiet_mode:
> -    sys.stderr.write("ERROR: 'verbose' and 'quiet' are incompatible\n")
> -    sys.exit(1)
> +    if not appended:
> +      parser.error("invalid test number, range of numbers, " +
> +                   "or function '%s'\n" % arg)

In the past I could run './basic_tests.py list' now I get

../../../../src/subversion/tests/cmdline/basic_tests.py list
Traceback (most recent call last):
  File "../../../../src/subversion/tests/cmdline/basic_tests.py", line 2571, in <module>
    svntest.main.run_tests(test_list)
  File "/home/pm/sw/subversion/src/subversion/tests/cmdline/svntest/main.py", line 1439, in run_tests
    parser.error("invalid test number, range of numbers, " +
NameError: global name 'parser' is not defined

-- 
Philip

Re: svn commit: r954830 - in /subversion/trunk/subversion/tests/cmdline: svnadmin_tests.py svntest/actions.py svntest/main.py svntest/sandbox.py tree_conflict_tests.py

Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
On Wed, Jun 16, 2010 at 11:21 AM, Philip Martin
<ph...@wandisco.com> wrote:
> hwright@apache.org writes:
>
>> Author: hwright
>> Date: Tue Jun 15 11:35:36 2010
>> New Revision: 954830
>
>> -  if verbose_mode and quiet_mode:
>> -    sys.stderr.write("ERROR: 'verbose' and 'quiet' are incompatible\n")
>> -    sys.exit(1)
>> +    if not appended:
>> +      parser.error("invalid test number, range of numbers, " +
>> +                   "or function '%s'\n" % arg)
>
> In the past I could run './basic_tests.py list' now I get
>
> ../../../../src/subversion/tests/cmdline/basic_tests.py list
> Traceback (most recent call last):
>  File "../../../../src/subversion/tests/cmdline/basic_tests.py", line 2571, in <module>
>    svntest.main.run_tests(test_list)
>  File "/home/pm/sw/subversion/src/subversion/tests/cmdline/svntest/main.py", line 1439, in run_tests
>    parser.error("invalid test number, range of numbers, " +
> NameError: global name 'parser' is not defined

Using './basic_tests.py list' has been deprecated for a very long
time, replaced by './basic_tests.py --list'.  My rewrite of the
options parsing removed the hack that supported the non-optioned
version of '--list'.

The error message could be a bit more friendly, thought, and that's
what I did in r955354.

-Hyrum