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.
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
----
Alexander Sinyushkin,
TMate Software,
http://svnkit.com/ - Java [Sub]Versioning Library!
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Nov 14 11:06:47 2007