subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject svn commit: r1875404 - /subversion/site/publish/docs/release-notes/1.14.html
Date Thu, 19 Mar 2020 00:48:57 GMT
Author: hartmannathan
Date: Thu Mar 19 00:48:57 2020
New Revision: 1875404

1.14 release notes: Improve #editor-filename-escaping and add example

Follow-up to r1875312.

Mailing list thread "svn commit: r1875312..." on 17 Mar 2020, archived here:

* docs/release-notes/1.14.html
  (editor-filename-escaping): Implementing suggested improvements.
    Specifically, as danielsh points out, $SVN_EDITOR is only one of several
    ways to configure a user-defined editor. Also, add example CLI
    "screenshot" provided by danielsh (text conflict which leads to launching
    the editor). 

Suggested by: danielsh


Modified: subversion/site/publish/docs/release-notes/1.14.html
--- subversion/site/publish/docs/release-notes/1.14.html (original)
+++ subversion/site/publish/docs/release-notes/1.14.html Thu Mar 19 00:48:57 2020
@@ -293,25 +293,67 @@ in a range of revisions. (See <a href="h
 </div> <!-- info-show-item-changelist -->
 <div class="h4" id="editor-filename-escaping">
-<h4>Escaping/quoting of pathname arguments to <tt>$SVN_EDITOR</tt>
+<h4>Escaping/quoting of pathname arguments to the user-defined editor
   <a class="sectionlink" href="#log-search"
      title="Link to this section">&para;</a>
-<p>When invoking the user-defined <tt>$SVN_EDITOR</tt>, such as during
-interactive conflict resolution, Subversion now performs escaping of any
-special characters in the pathname of the file to be edited. (See
+<p>When invoking the user-defined editor, such as during interactive conflict
+resolution, Subversion now performs escaping of any special characters in the
+pathname of the file to be edited. This corrects a problem that would occur
+previously when the file to be edited (and/or the path leading to it)
+contained spaces or other special characters. (See
 <a href="">r1874057</a>,
 <a href="">r1874093</a>, and
 <a href="">r1875230</a>.)</p>
-<p>Note that escaping is performed only on the pathname argument.
-<tt>$SVN_EDITOR</tt> itself is not escaped: As before, the editor is invoked
-through the shell and the user must properly escape/quote
-<tt>$SVN_EDITOR</tt>. See the related FAQ
-<a href="">"How do I deal
-with spaces in the editor path?  Also, how can I define command line options
-for the editor?"</a></p>
+<p>Note that escaping is performed only on the pathname argument. As before,
+the editor itself is invoked through the shell and the user must properly
+quote/escape the command line used to launch it. This is intentional, as it
+allows the user to construct a shell command which itself contains command
+line arguments. See the related
+<a href="">FAQ entry</a> for
+more on spaces and/or command line options in the editor path.</p>
+<p>The user-defined editor can be specified in the following ways, in this
+order of precedence:</p>
+  <li>The <tt>--editor-cmd</tt> command-line option</li>
+  <li>The <tt>$SVN_EDITOR</tt> environment variable</li>
+  <li>The <tt>editor-cmd</tt> runtime configuration option</li>
+  <li>The <tt>$VISUAL</tt> environment variable</li>
+  <li>The <tt>$EDITOR</tt> environment variable</li>
+<p>The escaped pathname of the file to be edited is passed to the editor as
+its last command line argument.</p>
+<p>For example, suppose that <tt>$SVN_EDITOR</tt> is set as follows:</p>
+<pre>SVN_EDITOR='vim -N --'
+export SVN_EDITOR
+<p>Furthermore, suppose 'svn up' finds a text conflict in a file called
+<tt>foo bar.txt</tt>:</p>
+$ svn up 
+Updating '.':
+C    foo bar.txt
+Updated to revision 2.
+Summary of conflicts:
+  Text conflicts: 1
+Merge conflict discovered in file 'foo bar.txt'.
+Select: (p) Postpone, (df) Show diff, (e) Edit file, (m) Merge,
+        (s) Show all options: <b>e</b>
+<p>When Subversion launches the editor, the spaces in <tt>vim -N --</tt>
+<strong>not</strong> be escaped, allowing vim to be invoked with <tt>-N</tt>
+and <tt>--</tt> as its first two arguments, but the space in
+<tt>foo bar.txt</tt> <strong>will</strong> be escaped.</p>
 </div> <!-- editor-filename-escaping -->

View raw message