[svnbook] r5476 committed - branches/1.8/zh/book/ ch04-branching-and-merging.xml
wuzhouhui at users.sourceforge.net
wuzhouhui at users.sourceforge.net
Sat Oct 28 21:50:09 CDT 2017
Revision: 5476
http://sourceforge.net/p/svnbook/source/5476
Author: wuzhouhui
Date: 2017-10-29 02:50:08 +0000 (Sun, 29 Oct 2017)
Log Message:
-----------
1.8/zh: translation of chapter 4 in progress
Modified Paths:
--------------
branches/1.8/zh/book/ch04-branching-and-merging.xml
Modified: branches/1.8/zh/book/ch04-branching-and-merging.xml
===================================================================
--- branches/1.8/zh/book/ch04-branching-and-merging.xml 2017-10-28 03:54:08 UTC (rev 5475)
+++ branches/1.8/zh/book/ch04-branching-and-merging.xml 2017-10-29 02:50:08 UTC (rev 5476)
@@ -3132,6 +3132,7 @@
-->
<warning>
+ <!--
<para>Did you notice how, in the last example, the merge
invocation merged two distinct ranges?
The <command>svn merge</command> command applied
@@ -3146,8 +3147,17 @@
changes, the whole merge command will bail out with an error
message and you must resolve the conflict before running the
merge a second time to get the remainder of the changes.</para>
+ -->
+ <para>在上面的例子里, 读者是否注意到了 Subversion 如何合并两个不同的版
+ 本号范围? <command>svn merge</command> 为了跳过变更集 413 (分支已经包
+ 含了变更集 413), 向工作副本应用了两个独立的补丁, 这么做除了可能会使
+ 冲突更难解决之外, 本身并没有什么不对的地方. 如果第一段修改范围产生了
+ 冲突, 那么只有在冲突解决后才能接着应用第二段修改范围. 如果在出现冲突
+ 后, 用户选择推迟解决冲突, 那么命令 <command>svn merge</command>
+ 将会报错退出, 在第二次运行合并命令之前, 用户必须解决冲突.</para>
</warning>
+ <!--
<para>A word of warning: while <command>svn diff</command> and
<command>svn merge</command> are very similar in concept, they
do have different syntax in many cases. Be sure to read about
@@ -3157,19 +3167,32 @@
a place where it should apply the generated patch. If the
target isn't specified, it assumes you are trying to perform
one of the following common operations:</para>
+ -->
+ <para>提醒一句: <command>svn diff</command> 和 <command>svn merge
+ </command> 在概念上非常类似, 但在很多情况下它们使用不同的语法, 详情
+ 见 <xref linkend="svn.ref.svn"/>. 比如说 <command>svn merge</command>
+ 要求一个工作副本路径作为被合并的操作目标, 如果没有指定, 命令就假设是以
+ 下两种情况之一:</para>
<itemizedlist>
<listitem>
+ <!--
<para>You want to merge directory changes into your current
working directory.</para>
+ -->
+ <para>被合并的是当前工作目录.</para>
</listitem>
<listitem>
+ <!--
<para>You want to merge the changes in a specific file into
a file by the same name that exists in your current working
directory.</para>
+ -->
+ <para>用户想把特定文件上的修改合并到当前工作目录的同名文件上.</para>
</listitem>
</itemizedlist>
+ <!--
<para>If you are merging a directory and haven't specified a
target path, <command>svn merge</command> assumes the first
case and tries to apply the changes into your current
@@ -3178,13 +3201,23 @@
directory,
<command>svn merge</command> assumes the second case and tries
to apply the changes to a local file with the same name.</para>
+ -->
+ <para>如果用户在合并目录时没有指定目标路径, <command>svn merge</command>
+ 就认为是第一种情况, 尝试把修改合并到当前工作目录. 如果是合并文件, 并
+ 且这个文件 (或者说名字相同的文件) 在当前工作目录中存在, <command>svn
+ merge</command> 就认为是第二种情况, 尝试把修改合并到具有相同名字的
+ 本地文件上.</para>
</sect2>
<!-- =============================================================== -->
<sect2 id="svn.branchmerge.advanced.advancedsyntax">
+ <!--
<title>Merge Syntax: Full Disclosure</title>
+ -->
+ <title>合并语法详解</title>
+ <!--
<para>You've now seen some examples of the <command>svn
merge</command> command, and you're about to see several more.
If you're feeling confused about exactly how merging works,
@@ -3195,7 +3228,15 @@
than you think! There's a very easy technique for
understanding exactly how <command>svn merge</command>
behaves.</para>
+ -->
+ <para>读者已经见过了 <command>svn merge</command> 的几个例子, 后面还会
+ 看到几个, 如果你对合并的工作原理感到疑惑, 不用太过自责, 你不是唯一
+ 一个有这种感觉的人. 很多用户 (特别是版本控制的新手) 一开始都会被命令
+ 的语法和适用它们的场景搞蒙. 其实这个命令比你想像中的要简单很多, 有一
+ 个非常的办法可以帮助你理解 <command>svn merge</command> 如何工作.
+ </para>
+ <!--
<para>The main source of confusion is the
<emphasis>name</emphasis> of the command. The term
<quote>merge</quote> somehow denotes that branches are
@@ -3205,6 +3246,13 @@
diff-and-apply</command>, because that's all that happens:
two repository trees are compared, and the differences are
applied to a working copy.</para>
+ -->
+ <para>困惑主要来自命令的 <emphasis>名字</emphasis>. 术语 <emphasis>合并
+ </emphasis> (<emphasis>merge</emphasis>) 在某种程度上表示分支被组合起
+ 来, 或者说有一些神秘的混合数据正在产生. 事实并非如此, 命令更恰当的名
+ 字是 <emphasis>svn diff-and-apply</emphasis>, 因为新名字恰当地描述了
+ 合并过程中所发生的事情: 比较两个仓库目录, 然后把差异应用到工作副本上.
+ </para>
<para>If you're using <command>svn merge</command> to do basic
copying of changes between branches, an automatic merge will
More information about the svnbook-dev
mailing list