> Julian Foad <email@example.com> writes:
>>Excellent. That may be the best solution for invoking an editor:
>>leave the code alone and document the feature. Does anybody see a
>>problem with that?
> No, +1, I think it's by far the best solution! Thanks, Michael, for
> pointing it out.
Attached is a rough patch to the faq.html about this issue. I am not
sure about the specific wording or the level of the intended audience.
But it does show the way to do this in both Windows and Unix/bash.
(I figure most Unix users can handle the translation to other shell
Michael Sinz Technology and Engineering Director/Consultant
"Starting Startups" mailto:firstname.lastname@example.org
My place on the web http://www.sinz.org/Michael.Sinz
--- faq.html (revision 17296)
+++ faq.html (working copy)
@@ -118,6 +118,7 @@
<li><a href="#auto-props">How can I set certain properties on
everything in the repository? Also, how can I make sure that every
new file coming into the repository has these properties?</a></li>
+<li>How do I handle spaces in the editor path?</li>
<li><a href="#divining-bdb-version">How do I determine which version of
Berkeley DB a repository is using?</a></li>
<li><a href="#website-auto-update">I'm managing a website in my
@@ -1762,6 +1763,70 @@
+<div class="h3" id="svn-editor" title="auto-props">
+<h3>How do I deal with spaces in the editor path? Also, how can
+I define command line options for the editor?</h3>
+<p>The Subversion command line client will invoke the editor defined
+in the environment variable SVN_EDITOR. This environment variable
+is passed directly to the operating system along with the name of a
+temporary file used to enter/edit the log message.</p>
+<p>Due to the fact that the SVN_EDITOR string is used as is to the
+system's command shell, spaces in the editor name or path name to
+the editor will not work unless the editor name is in quotes.<p>
+<p>For example, on Windows if your editor is in
+<code>C:\Program Files\Posix Tools\bin\vi</code> you would
+want to set the variable as follows:
+ set SVN_EDITOR="C:\Program Files\Posix Tools\bin\vi"
+<p>Note that there is no need to escape the quotes in the Windows
+shell as they are not part of the syntax for the <code>set</code>
+<p>On UNIX systems you would need to follow your shell's specific
+methods for setting the variable. For example, in a bash shell,
+the following should work:
+ SVN_EDITOR='"/usr/local/more editors/bin/xemacs"'
+ export SVN_EDITOR
+<p>In case a command line option would be needed for the invocation
+of the editor, just add that after the editor name in the SVN_EDITOR
+environment variable just like you would us on the command line.
+For example, if the options <code>-nx -r</code> would be wanted for
+the above editors, the following will provide those options:
+ set SVN_EDITOR="C:\Program Files\Posix Tools\bin\vi" -nx -r
+ SVN_EDITOR='"/usr/local/more editors/bin/xemacs" -nx -r'
+ export SVN_EDITOR
+<p>Note that SVN_EDITOR is the Subversion specific environment variable
+setting for the editor selection. Subversion also supports
+using the more generic EDITOR variable but if you need special behaviors
+with Subversion it is best to use the SVN_EDITOR variable.
<div class="h3" id="divining-bdb-version" title="divining-bdb-version">
<h3>How do I determine which version of
Berkeley DB a repository is using?</h3>
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org
Received on Fri Nov 11 03:23:57 2005