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

svnserve -t --tunnel reports an error

From: Chris Lesniewski-Laas <ctl_at_MIT.EDU>
Date: 2006-05-09 00:31:12 CEST

An svnserve upgrade broke my setup, where I had a wrapper on the server calling
'svnserve --tunnel --tunnel-user ctl "$@"'. Since svn also added -t to the
svnserve command line, I got an error 'You must specify exactly one of -d, -i,
-t or -X.'

The behavior I expect is for repeated options not to cause an error. The
appended patch should accomplish this.

Let me know if further action is required to submit this as a bug; the issue
tracker page seems to want me to go here first. Note that I'm not subbed to
this mailing list.

Cheers,
Chris

Index: subversion/svnserve/main.c
===================================================================
--- subversion/svnserve/main.c (revision 19565)
+++ subversion/svnserve/main.c (working copy)
@@ -379,8 +379,10 @@
           break;
           
         case 'd':
- run_mode = run_mode_daemon;
- mode_opt_count++;
+ if (run_mode != run_mode_daemon) {
+ run_mode = run_mode_daemon;
+ mode_opt_count++;
+ }
           break;
 
         case SVNSERVE_OPT_FOREGROUND:
@@ -388,8 +390,10 @@
           break;
 
         case 'i':
- run_mode = run_mode_inetd;
- mode_opt_count++;
+ if (run_mode != run_mode_inetd) {
+ run_mode = run_mode_inetd;
+ mode_opt_count++;
+ }
           break;
 
         case SVNSERVE_OPT_LISTEN_PORT:
@@ -401,8 +405,10 @@
           break;
 
         case 't':
- run_mode = run_mode_tunnel;
- mode_opt_count++;
+ if (run_mode != run_mode_tunnel) {
+ run_mode = run_mode_tunnel;
+ mode_opt_count++;
+ }
           break;
 
         case SVNSERVE_OPT_TUNNEL_USER:
@@ -410,8 +416,10 @@
           break;
 
         case 'X':
- run_mode = run_mode_listen_once;
- mode_opt_count++;
+ if (run_mode != run_mode_listen_once) {
+ run_mode = run_mode_listen_once;
+ mode_opt_count++;
+ }
           break;
 
         case 'r':
@@ -430,8 +438,10 @@
 
 #ifdef WIN32
         case SVNSERVE_OPT_SERVICE:
- run_mode = run_mode_service;
- mode_opt_count++;
+ if (run_mode != run_mode_service) {
+ run_mode = run_mode_service;
+ mode_opt_count++;
+ }
           break;
 #endif

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue May 9 19:20:49 2006

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