[svnbook] r5488 committed - branches/1.8/zh/book/ ch04-branching-and-merging.xml
wuzhouhui at users.sourceforge.net
wuzhouhui at users.sourceforge.net
Fri Nov 10 08:08:35 CST 2017
Revision: 5488
http://sourceforge.net/p/svnbook/source/5488
Author: wuzhouhui
Date: 2017-11-10 14:08:34 +0000 (Fri, 10 Nov 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-11-09 14:43:08 UTC (rev 5487)
+++ branches/1.8/zh/book/ch04-branching-and-merging.xml 2017-11-10 14:08:34 UTC (rev 5488)
@@ -4439,12 +4439,18 @@
<primary>merge tracking</primary>
<secondary>disabling</secondary>
</indexterm>
- The <option>--ignore-ancestry</option> option also disables
+ 属性 <option>--ignore-ancestry</option> 还会禁止
+ <xref linkend="svn.branchmerge.basicmerging.mergetracking"/>, 这就
+ 意味着当 <command>svn merge</command> 确定应该合并哪些版本号时,
+ 它就不会考虑, 也不会更新 <literal>svn:mergeinfo</literal>.</para>
+ <!--
+ The <option>- -ignore-ancestry</option> option also disables
<xref linkend="svn.branchmerge.basicmerging.mergetracking"/>.
This means that <literal>svn:mergeinfo</literal> is not considered
when <command>svn merge</command> is determining what revisions
to merge, nor is <literal>svn:mergeinfo</literal> recorded to
describe the merge.</para>
+ -->
</tip>
</sect2>
@@ -4451,8 +4457,12 @@
<!-- =============================================================== -->
<sect2 id="svn.branchmerge.advanced.moves">
+ <!--
<title>Merges and Moves</title>
+ -->
+ <title>合并与移动</title>
+ <!--
<para>A common desire is to refactor source code, especially
in Java-based software projects. Files and directories are
shuffled around and renamed, often causing great disruption
@@ -4460,18 +4470,30 @@
case to use a branch, doesn't it? Just create a branch,
shuffle things around, and then merge the branch back to the
trunk, right?</para>
+ -->
+ <para>开发人员的一个常见需求是对代码进行重构, 特别是基于 Java 的软件
+ 项目. 文件和目录被移来移去, 经常会给项目的开发人员造成困扰. 听起来是
+ 不是觉得这种场景很适合使用分支? 创建一个分支, 尽管在分支里随意折腾,
+ 最后再把分支合并到主干上就行了, 对吗?</para>
+ <!--
<para>Alas, this scenario doesn't work so well right now and
is considered one of Subversion's current weak spots. The
problem is that Subversion's <command>svn merge</command>
command isn't as robust as it should be, particularly when
dealing with copy and move operations.</para>
+ -->
+ <para>可惜, 现实情况还没有这么理想, 这是 Subversion 目前还有待完善的地方.
+ 其中的问题是 Subversion 的命令 <command>svn merge</command> 并没有人们
+ 期望中的那样健壮, 尤其是在处理复制和移动操作时.</para>
+ <!--
<para>When you use <command>svn copy</command> to duplicate a
file, the repository remembers where the new file came from,
but it fails to transmit that information to the client which
is running <command>svn update</command> or <command>svn
merge</command>. Instead of telling the client, <quote>Copy
+ TODO
that file you already have to this new location,</quote> it
sends down an entirely new file. This can lead to
problems, particularly tree conflicts in the case of renames,
@@ -4481,11 +4503,25 @@
move</command> command is nothing more than an aggregation
of <command>svn copy</command> and <command>svn
delete</command>.</para>
+ -->
+ <para>使用 <command>svn copy</command> 复制一个文件时, 仓库记住了新文件的
+ 来源, 但这项信息并不会传递给正在执行 <command>svn update</command> 或
+ <command>svn merge</command> 的客户端, 相反, 它会向客户端下发一个全新的
+ 文件. 这可能会导致问题, 尤其是和重命名有关的目录冲突. 重命名不仅涉及到
+ 一个新的副本, 还涉及到删除一个旧路径—一个不为人知的事实是
+ Subversion 没有 <quote>直正的重命名</quote>—<command>svn move
+ </command> 只不过是 <command>svn copy</command> 和 <command>svn delete
+ </command> 的组合而已.</para>
+ <!--
<para>For example, suppose that you want to make some changes on
your private branch <filename>/calc/branch/my-calc-branch
</filename>. First you perform an automatic sync merge with
<filename>/calc/trunk</filename> and commit that in r470:</para>
+ -->
+ <para>比如说用户想对自己的私有分支 <filename>/calc/branch/my-calc-branch
+ </filename> 做一些修改, 首先用户和 <filename>/calc/trunk</filename>
+ 做了一个自动同步合并, 并在 r470 提交了合并:</para>
<informalexample>
<screen>
More information about the svnbook-dev
mailing list