[svnbook] r5467 committed - branches/1.8/zh/book/ ch04-branching-and-merging.xml
wuzhouhui at users.sourceforge.net
wuzhouhui at users.sourceforge.net
Mon Oct 23 07:46:32 CDT 2017
Revision: 5467
http://sourceforge.net/p/svnbook/source/5467
Author: wuzhouhui
Date: 2017-10-23 12:46:31 +0000 (Mon, 23 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-22 02:51:51 UTC (rev 5466)
+++ branches/1.8/zh/book/ch04-branching-and-merging.xml 2017-10-23 12:46:31 UTC (rev 5467)
@@ -2385,7 +2385,9 @@
</screen>
</informalexample>
+ <!--
<para>The <literal>*</literal> indicates revisions that are only
+ TODO
<emphasis>partially</emphasis> merged to the target in question
(the meaning is the same if we are checking for eligible
revisions). What this means in this example is that if we tried
@@ -2395,10 +2397,22 @@
we know that re-merging those revisions would have no result.
<footnote><para>This is a good example of inoperative merge
revisions.</para></footnote></para>
+ -->
+ <para>星号 <literal>*</literal> 表示该版本号只是被 <emphasis>部分地</emphasis>
+ 合并到目标上 (对于 <literal>--show-revs=eligible</literal>, 其星号的意义是
+ 相同的). 对于这个例子而言, 它的意思是说如果我们尝试从
+ <filename>^/trunk</filename> 合并 r380, r387 或 r388, 将会产生更多的修改.
+ 同样地, 因为 r354, r385 和 r386 <emphasis>没有</emphasis> 被星号标记,
+ 所以再次合并这些版本号将不会产生任何修改. <footnote><para>这是不可实施的
+ 合并版本号的好例子.</para></footnote></para>
+ <!--
<para>Another way to get a more precise preview of a merge
- operation is to use the <option>--dry-run</option>
+ operation is to use the <option>- -dry-run</option>
option:</para>
+ -->
+ <para>获取合并预览的另一种办法是使用选项 <option>--dry-run</option>:
+ </para>
<informalexample>
<screen>
@@ -2413,7 +2427,8 @@
</screen>
</informalexample>
- <para>The <option>--dry-run</option> option doesn't actually
+ <!--
+ <para>The <option>- -dry-run</option> option doesn't actually
apply any local changes to the working copy. It shows only
status codes that <emphasis>would</emphasis> be printed in a
real merge. It's useful for getting a <quote>high-level</quote>
@@ -2420,11 +2435,17 @@
preview of the potential merge, for those times
when running <command>svn diff</command> gives too much
detail.</para>
+ -->
+ <para>选项 <option>--dry-run</option> 不会真正地去修改工作副本, 它只会
+ 输出一个真正的合并操作 <emphasis>将会</emphasis> 输出的信息. 如果嫌
+ <command>svn diff</command> 的输出过于详细, 就可以用这个选项获得一个
+ 比较 <quote>高层的</quote> 合并预览.</para>
<tip>
+ <!--
<para>After performing a merge operation, but before
committing the results of the merge, you can use
- <userinput>svn diff --depth=empty <replaceable>
+ <userinput>svn diff - -depth=empty <replaceable>
/path/to/merge/target</replaceable></userinput> to see only the
changes to the immediate target of your merge. If your merge
target was a directory, only property differences are displayed.
@@ -2432,8 +2453,16 @@
<literal>svn:mergeinfo</literal> property recorded by the
merge operation, which will remind you about what you've
just merged.</para>
+ -->
+ <para>执行完合并, 但是在提交之前, 可以用 <userinput>svn diff
+ --depth=empty <replaceable>/path/to/merge/target</replaceable>
+ </userinput> 被合并的直接目标的修改, 如果被合并的目标是目录,
+ 那么命令就只会输出属性的修改. 这是查看合并后属性
+ <literal>svn:mergeinfo</literal> 的变化的简便方法, 从属性的
+ 变化中可以看到这次合并了哪些版本号.</para>
</tip>
+ <!--
<para>Of course, the best way to preview a merge operation is to
just do it! Remember, running <command>svn merge</command>
isn't an inherently risky thing (unless you've made local
@@ -2444,6 +2473,13 @@
the changes from your working copy and retry the command with
different options. The merge isn't final until you
actually <command>svn commit</command> the results.</para>
+ -->
+ <para>当然, 预览合并的最佳方法是执行合并. 记住, 执行 <command>svn merge
+ </command> 并不是一个危险的操作 (除非在合并前, 工作副本含有本地修改,
+ 但我们已经强调过不要在这种情况下执行合并). 如果你不喜欢合并的结果,
+ 执行 <userinput>svn revert . -R</userinput> 就可以撤消合并产生的修改.
+ 只有在执行了 <command>svn commit</command> 后, 合并的结果才会被提交到
+ 仓库中.</para>
</sect2>
More information about the svnbook-dev
mailing list