[svnbook] r5859 committed - branches/1.8/zh/book/ch07-customizing-svn.xml

wuzhouhui at users.sourceforge.net wuzhouhui at users.sourceforge.net
Tue Jan 1 03:51:54 CST 2019

Revision: 5859
Author:   wuzhouhui
Date:     2019-01-01 09:51:52 +0000 (Tue, 01 Jan 2019)
Log Message:
1.8/zh: translation of chapter 7 in progress

Modified Paths:

Modified: branches/1.8/zh/book/ch07-customizing-svn.xml
--- branches/1.8/zh/book/ch07-customizing-svn.xml	2018-12-31 04:18:15 UTC (rev 5858)
+++ branches/1.8/zh/book/ch07-customizing-svn.xml	2019-01-01 09:51:52 UTC (rev 5859)
@@ -2041,8 +2041,12 @@
   <!-- ================================================================= -->
   <!-- ================================================================= -->
   <sect1 id="svn.advanced.externaldifftools">
+      <!--
     <title>Using External Differencing and Merge Tools</title>
+      -->
+    <title>使用外部差异和合并工具</title>
+      <!--
     <para>The interface between Subversion and external two- and three-way
       differencing tools harkens back to a time when Subversion's only
       contextual differencing capabilities were built around
@@ -2052,8 +2056,8 @@
       utilities with more than a handful of options and parameters,
       most of which were quite specific to the utilities.  Some time
       later, Subversion grew its own internal differencing library,
-      and as a failover mechanism, the <option>--diff-cmd</option> and
-      <option>--diff3-cmd</option> options were added to the
+      and as a failover mechanism, the <option>- -diff-cmd</option> and
+      <option>- -diff3-cmd</option> options were added to the
       Subversion command-line client so that users could more easily
       indicate that they preferred to use the GNU diff and diff3
       utilities instead of the newfangled internal diff library.  If
@@ -2061,7 +2065,21 @@
       internal diff library, and fall back to running those external
       programs, lengthy argument lists and all.  And that's where
       things remain today.</para>
+      -->
+    <para>Subversion 与二路以及三路差异比较工具之间的接口可以一直追溯到它的
+      起源时期, 那时候 Subversion 的差异比较功能直接来自 GNU 工具的调用,
+      尤其是 <command>diff</command> 和 <command>diff3</command>. Subversion
+      为了得到期望的效果, 在调用这些工具时会加上一些参数或选项, 其中的大部分
+      选项都是工具所特有的. 随着 Subversion 的不断开发, 它渐渐地具有了自己的
+      差异比较库函数, 但同时也为客户端工具增加了选项
+      <option>--diff-cmd</option> 和 <option>--diff3-cmd</option>, 于是用户
+      可以告诉客户端使用 GNU 差异比较工具 <command>diff</command> 和
+      <command>diff3</command>, 而非内建的差异比较库函数. 如果使用了选项
+      <option>--diff-cmd</option> 或 <option>--diff3-cmd</option>, Subversion
+      就会忽略内建的差异比较库函数, 转而调用外部的差异比较程序, 在调用时传递
+      必要的选项.</para>
+      <!--
     <para>It didn't take long for folks to realize that having such
       easy configuration mechanisms for specifying that Subversion
       should use the external GNU diff and diff3 utilities located at
@@ -2075,6 +2093,14 @@
       options at your external diff tool regardless of whether
       that program can understand those options.  And that's where
       things get unintuitive for most users.</para>
+      -->
+    <para>读者应该很容易想到, 既然 Subversion 可以使用 GNU 的
+      <command>diff</command> 和 <command>diff3</command>, 那当然也可以使用
+      其他的差异比较工具, 毕竟 Subversion 并不知道它所调用的工具到底是不是
+      GNU 的差异比较工具. 不过, 在使用这些外部工具时, 唯一可配置的地方就是它
+      们在系统中的位置—而非选项, 参数的顺序等. Subversion 仍然会像往常
+      一样把 GNU 工具的选项传递给你所指定的外部差异比较工具, 无论它们理不理解
+      这些选项, 大多数用户的困惑即来自于此.</para>
       <para>The decision on when to fire off a contextual two- or

More information about the svnbook-dev mailing list