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

Re: [patch] Please, modify main.py to include support for jsvn binaries

From: Lieven Govaerts <svnlgo_at_mobsol.be>
Date: 2007-11-14 12:15:23 CET

Alexander Sinyushkin wrote:
> Hello, devs! I would be very greatful to you if you commit this patch
> to main.py which I've attached. In one of my visits to the #svn-dev
> channel Lieven Govaerts kindly proposed me to write a patch to main.py
> that would make life of SVNKit developers a bit easier. I'm not very
> familiar to python but hope that the patch does not break anything for
> you. I've also attached the full version of main.py patched against
> revision 27810.
> Thank you.

Alexander,

I committed a tweaked version of your patch in r27816. Some remarks for
a next patch:
- please provide a log message, see
http://subversion.tigris.org/hacking.html#log-messages
- lines should have max. 80 characters.
- the patch should be created from the root of the working copy, so it's
easier to apply with 'patch'.

BTW, should this option be added to win-tests.py too?

Lieven

>
> Index: main.py
> ===================================================================
> --- main.py (revision 27810)
> +++ main.py (working copy)
> @@ -89,10 +89,12 @@
> windows = True
> file_scheme_prefix = 'file:///'
> _exe = '.exe'
> + _bat = '.bat'
> else:
> windows = False
> file_scheme_prefix = 'file://'
> _exe = ''
> + _bat = ''
>
> try:
> from popen2 import Popen3
> @@ -1141,6 +1143,8 @@
> print " --enable-sasl Whether to enable SASL authentication"
> print " --parallel Run the tests in parallel"
> print " --bin Use the svn binaries installed in this path"
> + print " --use-jsvn Try to use the jsvn (SVNKit based) binaries
> installed" \
> + " in the path specified by --bin option or in a default location"
> print " --help This information"
>
>
> @@ -1178,11 +1182,13 @@
>
> parallel = 0
> svn_bin = None
> + use_jsvn = False
> +
> try:
> opts, args = my_getopt(sys.argv[1:], 'vqhpc',
> ['url=', 'fs-type=', 'verbose', 'quiet',
> 'cleanup',
> 'list', 'enable-sasl', 'help', 'parallel',
> - 'bin=', 'http-library=',
> 'server-minor-version='])
> + 'bin=', 'http-library=',
> 'server-minor-version=', 'use-jsvn'])
> except getopt.GetoptError, e:
> print "ERROR: %s\n" % e
> usage()
> @@ -1246,6 +1252,10 @@
> print "ERROR: test harness only supports server minor version 4
> or 5"
> sys.exit(1)
>
> + elif opt == '--use-jsvn':
> + use_jsvn = True
> +
> +
> if test_area_url[-1:] == '/': # Normalize url to have no trailing slash
> test_area_url = test_area_url[:-1]
>
> @@ -1259,11 +1269,26 @@
> pristine_url = pristine_url.replace('\\', '/')
>
> if not svn_bin is None:
> - svn_binary = os.path.join(svn_bin, 'svn' + _exe)
> - svnadmin_binary = os.path.join(svn_bin, 'svnadmin' + _exe)
> - svnlook_binary = os.path.join(svn_bin, 'svnlook' + _exe)
> - svnsync_binary = os.path.join(svn_bin, 'svnsync' + _exe)
> - svnversion_binary = os.path.join(svn_bin, 'svnversion' + _exe)
> + if use_jsvn:
> + svn_binary = os.path.join(svn_bin, 'jsvn' + _bat)
> + svnadmin_binary = os.path.join(svn_bin, 'jsvnadmin' + _bat)
> + svnlook_binary = os.path.join(svn_bin, 'jsvnlook' + _bat)
> + svnsync_binary = os.path.join(svn_bin, 'jsvnsync' + _bat)
> + svnversion_binary = os.path.join(svn_bin, 'jsvnversion' + _bat)
> + use_jsvn = False
> + else:
> + svn_binary = os.path.join(svn_bin, 'svn' + _exe)
> + svnadmin_binary = os.path.join(svn_bin, 'svnadmin' + _exe)
> + svnlook_binary = os.path.join(svn_bin, 'svnlook' + _exe)
> + svnsync_binary = os.path.join(svn_bin, 'svnsync' + _exe)
> + svnversion_binary = os.path.join(svn_bin, 'svnversion' + _exe)
> +
> + if use_jsvn:
> + svn_binary = 'jsvn' + _bat
> + svnadmin_binary = 'jsvnadmin' + _bat
> + svnlook_binary = 'jsvnlook' + _bat
> + svnsync_binary = 'jsvnsync' + _bat
> + svnversion_binary = 'jsvnversion' + _bat
>
> command_line_parsed = True
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Nov 14 12:15:32 2007

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.