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

[patch] : configure time default editor

From: David Kimdon <dwhedon_at_debian.org>
Date: 2003-02-09 02:55:52 CET

Hi,

I did some poking around in the list archive and I know there was some
contention about having a default editor in subversion. I didn't see anywhere
that a configure time default was rejected . . .

Anyway, here is a patch that gives a --with-editor option to configure. I want
this personally so I can close two bugs in the Debian package (
http://bugs.debian.org/162632 , http://bugs.debian.org/164371 ). Up until now
I have been using /etc/subversion/config to set the editor, but I'd rather use
the vanilla 'config' file (especially since I sometimes forget to set the
default editor when I update the 'config' template).

How do we feel about this patch?

-David

Index: subversion/clients/cmdline/util.c
===================================================================
--- subversion/clients/cmdline/util.c (revision 4802)
+++ subversion/clients/cmdline/util.c (working copy)
@@ -44,6 +44,7 @@
 #include "svn_utf.h"
 #include "svn_subst.h"
 #include "svn_config.h"
+#include "svn_private_config.h"
 #include "cl.h"
 
 
@@ -96,7 +97,14 @@
     editor = getenv ("VISUAL");
   if (! editor)
     editor = getenv ("EDITOR");
-
+
+#ifdef SVN_CLIENT_EDITOR
+ if (! editor)
+ {
+ editor = SVN_CLIENT_EDITOR;
+ }
+#endif
+
   /* Now, override this editor choice with a selection from our config
      file (using what we have found thus far as the default in case no
      config option exists). */
Index: configure.in
===================================================================
--- configure.in (revision 4802)
+++ configure.in (working copy)
@@ -273,6 +273,20 @@
     fi
 ])
 
+AC_ARG_WITH(editor,
+AC_HELP_STRING([--with-editor=PATH],
+ [Specify a default editor for the subversion client.]),
+[
+ if test -n "$withval" ; then
+ SVN_CLIENT_EDITOR=$withval
+ else
+ SVN_CLIENT_EDITOR=
+ fi
+
+ AC_DEFINE_UNQUOTED(SVN_CLIENT_EDITOR, "$SVN_CLIENT_EDITOR",
+ [Define to be the full path to a default editor for the client.])
+])
+
 MOD_ACTIVATION="-a"
 AC_ARG_ENABLE(mod-activation,
 AC_HELP_STRING([--disable-mod-activation],

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Feb 9 03:00:29 2003

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.