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

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

From: Madan US <madan_at_collab.net>
Date: 2005-04-01 07:33:39 CEST

> Author: maxb
> Date: Thu Mar 31 17:13:43 2005
> New Revision: 13816
>
> Modified:
> trunk/subversion/tests/clients/cmdline/svntest/main.py
> Log:
> Use GNU-style getopt if available (Python >= 2.3) in the Python
> testsuite, to allow arguments and options to be freely intermixed.
> Fixes issue 2237.
>
thats a better way to check for availability of the function. Thanks.
btw, gnu_getopt documentation says that the 'gnu'-like functionality
will happen only if the POSIXLY_CORRECT env var is *not* set. I think we
should document this in the subversion/test/client/cmdline/README.

> * subversion/tests/clients/cmdline/svntest/main.py:
> Call getopt.gnu_getopt() if it exists,
> otherwise fall back to getopt.getopt().
>
>
> Modified: trunk/subversion/tests/clients/cmdline/svntest/main.py
> Url:
>
http://svn.collab.net/viewcvs/svn/trunk/subversion/tests/clients/cmdline/svntest/main.py?view=diff&rev=13816&p1=trunk/subversion/tests/clients/cmdline/svntest/main.py&r1=13815&p2=trunk/subversion/tests/clients/cmdline/svntest/main.py&r2=13816> ==============================================================================> --- trunk/subversion/tests/clients/cmdline/svntest/main.py (original)
> +++ trunk/subversion/tests/clients/cmdline/svntest/main.py Thu Mar 31
> 17:13:43 2005 @@ -24,7 +24,12 @@
> import string # for atof()
> import copy # for deepcopy()
> import time # for time()
> +
> import getopt
> +try:
> + my_getopt = getopt.gnu_getopt
> +except AttributeError:
> + my_getopt = getopt.getopt
>
> from svntest import Failure
> from svntest import Skip
> @@ -586,8 +591,8 @@
> os.environ['SVN_EDITOR'] = ''
>
> try:
> - opts, args = getopt.getopt(sys.argv[1:], 'v',
> - ['url=', 'fs-type=', 'verbose',
> 'cleanup']) + opts, args = my_getopt(sys.argv[1:], 'v',
> + ['url=', 'fs-type=', 'verbose', 'cleanup'])
> except getopt.GetoptError:
> args = []
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: svn-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: svn-help@subversion.tigris.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Apr 1 07:35:01 2005

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.