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

[PATCH] Enable users to specify a full path of svnserve at the tunnel mode

From: Kobayashi Noritada <nori1_at_dolphin.c.u-tokyo.ac.jp>
Date: 2005-03-28 21:24:43 CEST


This patch enable users to specify a full path of svnserve at the tunnel
I created this because I want to use that mode of svnserve in my home dir
for testing, but ssh cannot detect it.
Of course I've read "Trick #1" in notes/ssh-tricks, but I always use
public-key authentication for login and do not want to use another key
to access the repository...

If this patch seems to be helpful to others, I'd like to have it committed.


- nori

Enable users to specify a full path of svnserve at the tunnel mode.
Clients now read the value of 'svnserve-path' specified at the 'tunnels'
section in the .subversion/config. So, users can now use svnserve
installed in the home dir or somewhere odd.
This change is based on the patch presented by Takashi Kawachi

* subversion/include/svn_config.h: Define SVN_CONFIG_OPTION_SVNSERVE_PATH.
* subversion/libsvn_ra_svn/client.c
  (find_tunnel_agent): Enable reading of 'svnserve-path' from
    .subversion/config if specified.
* subversion/libsvn_subr/config_file.c
  (svn_config_ensure): Add an template and description for 'svnserve-path'
    to the .subversion/config template.

Index: subversion/include/svn_config.h
--- subversion/include/svn_config.h (revision 13721)
+++ subversion/include/svn_config.h (working copy)
@@ -83,6 +83,7 @@
 #define SVN_CONFIG_OPTION_ENABLE_AUTO_PROPS "enable-auto-props"
 #define SVN_CONFIG_OPTION_NO_UNLOCK "no-unlock"
+#define SVN_CONFIG_OPTION_SVNSERVE_PATH "svnserve-path"
 #define SVN_CONFIG_SECTION_AUTO_PROPS "auto-props"
 /* For repository svnserve.conf files */
Index: subversion/libsvn_ra_svn/client.c
--- subversion/libsvn_ra_svn/client.c (revision 13721)
+++ subversion/libsvn_ra_svn/client.c (working copy)
@@ -493,7 +493,9 @@
   *argv = apr_palloc(pool, (n + 4) * sizeof(char *));
   memcpy(*argv, cmd_argv, n * sizeof(char *));
   (*argv)[n++] = (user) ? apr_psprintf(pool, "%s@%s", user, host) : host;
- (*argv)[n++] = "svnserve";
+ svn_config_get(cfg, &val, SVN_CONFIG_SECTION_TUNNELS,
+ (*argv)[n++] = val;
   (*argv)[n++] = "-t";
   (*argv)[n] = NULL;
Index: subversion/libsvn_subr/config_file.c
--- subversion/libsvn_subr/config_file.c (revision 13721)
+++ subversion/libsvn_subr/config_file.c (working copy)
@@ -1153,6 +1153,12 @@
         "# rsh = /path/to/rsh -l myusername"
+ "### If you wanted to specify a full path to svnserve, you"
+ "### could do so:"
+ "# svnserve-path = /path/to/svnserve"
         "### On Windows, if you are specifying a full path to a command,"
         "### use a forward slash (/) or a paired backslash (\\\\) as the"

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Mar 28 21:26:15 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.