[svnbook] r5419 committed - branches/1.8/zh/book/ch03-advanced-topics.xml
wuzhouhui at users.sourceforge.net
wuzhouhui at users.sourceforge.net
Wed Sep 6 09:22:00 CDT 2017
Revision: 5419
http://sourceforge.net/p/svnbook/source/5419
Author: wuzhouhui
Date: 2017-09-06 14:22:00 +0000 (Wed, 06 Sep 2017)
Log Message:
-----------
1.8/zh: translation of chapter 3 in progress
Modified Paths:
--------------
branches/1.8/zh/book/ch03-advanced-topics.xml
Modified: branches/1.8/zh/book/ch03-advanced-topics.xml
===================================================================
--- branches/1.8/zh/book/ch03-advanced-topics.xml 2017-09-05 13:00:37 UTC (rev 5418)
+++ branches/1.8/zh/book/ch03-advanced-topics.xml 2017-09-06 14:22:00 UTC (rev 5419)
@@ -7883,10 +7883,15 @@
<indexterm>
<primary>changelists</primary>
<secondary>removing</secondary>
- </indexterm>Fortunately, Harry catches his mistake. At this
+ </indexterm>
+ 幸好 Harry 很快就发现了错误, 现在他有两个选择, 一是删除与 <filename>
+ button.c</filename> 关联的变更列表, 然后分配一个新的变更列表:</para>
+ <!--
+ Fortunately, Harry catches his mistake. At this
point, he has two options. He can remove the changelist
association from <filename>button.c</filename>, and then
assign a different changelist name:</para>
+ -->
<informalexample>
<screen>
@@ -7907,10 +7912,15 @@
<indexterm>
<primary>changelists</primary>
<secondary>reassigning</secondary>
- </indexterm>Or, he can skip the removal and just assign a new
+ </indexterm>
+ 二是直接向 <filename>button.c</filename> 分配一个新的变更列表, 此时
+ Subversion 会先移除 <filename>button.c</filename> 原来的变更列表:</para>
+ <!--
+ Or, he can skip the removal and just assign a new
changelist name. In this case, Subversion will first warn
Harry that <filename>button.c</filename> is being removed from
the first changelist:</para>
+ -->
<informalexample>
<screen>
@@ -7929,6 +7939,7 @@
</screen>
</informalexample>
+ <!--
<para>Harry now has two distinct changelists present in his
working copy, and <command>svn status</command> will group its
output according to these changelist determinations. Notice
@@ -7938,9 +7949,20 @@
a changelist assignment. Changelists can be added to and
removed from files at any time, regardless of whether they
contain local modifications.</para>
+ -->
+ <para>现在 Harry 的工作副本里有了两个不同的变更列表, <command>svn status
+ </command> 会根据它们的变更列表对输出进行分组. 虽然 Harry 还没有修改
+ <filename>button.c</filename>, 但 <command>svn status</command> 仍然
+ 会输出与它有关的信息, 这是因为 <filename>button.c</filename> 被分配了
+ 一个变更列表. 任何时候都可以向文件添加或删除变更列表, 无论它们是否含有
+ 本地修改.</para>
+ <!--
<para>Harry now fixes the user interface problem in
<filename>button.c</filename>.</para>
+ -->
+ <para>接下来, Harry 解决了 <filename>button.c</filename> 的用户接口问题.
+ </para>
<informalexample>
<screen>
@@ -7960,8 +7982,12 @@
<!-- =============================================================== -->
<sect2 id="svn.advanced.changelists.asfilters">
+ <!--
<title>Changelists As Operation Filters</title>
+ -->
+ <title>变更列表用作操作过滤器</title>
+ <!--
<para>The visual grouping that Harry sees in the output of
<command>svn status</command> as shown in our previous section
is nice, but not entirely useful. The
@@ -7969,9 +7995,15 @@
operations that he might wish to perform on his working copy.
Fortunately, many of Subversion's other operations understand
how to operate on changelists via the use of the
- <option>--changelist</option> option.</para>
+ <option>- -changelist</option> option.</para>
+ -->
+ <para>我们在上一节看到的 <command>svn status</command> 对变更列表的分组
+ 效果还不错, 但还不是很有用. 除了 <command>svn status</command>, 通过
+ 加上选项 <option>--changelist</option>, 还有很多操作都会理解变更列表.
+ </para>
- <para>When provided with a <option>--changelist</option> option,
+ <!--
+ <para>When provided with a <option>- -changelist</option> option,
Subversion commands will limit the scope of their operation to
only those files to which a particular changelist name is
assigned. If Harry now wants to see the actual changes he's
@@ -7979,6 +8011,12 @@
changelist, he <emphasis>could</emphasis> explicitly list only
the files that make up that changelist on the <command>svn
diff</command> command line.</para>
+ -->
+ <para>如果提供了选项 <option>--changelist</option>, Subversion 命令将会把
+ 操作的作用域限定到具有特定变更列表的文件上. 假如说 Harry 想查看变更列表
+ <literal>math-fixes</literal> 里的文件的修改, 他可以在 <command>svn diff
+ </command> 的后面显式地列出变更列表 <literal>math-fixes</literal> 的所有
+ 文件.</para>
<informalexample>
<screen>
@@ -7997,6 +8035,7 @@
</screen>
</informalexample>
+ <!--
<para>That works okay for a few files, but what if Harry's
change touched 20 or 30 files? That would be an annoyingly
long list of explicitly named files. Now that he's using
@@ -8003,6 +8042,10 @@
changelists, though, Harry can avoid explicitly listing the
set of files in his changelist from now on, and instead
provide just the changelist name:</para>
+ -->
+ <para>如果文件比较少的话还可以接受, 但是如果变更列表包含了 20 个或 30 个
+ 文件, 那就有点麻烦了. 不过既然它们都属于同一个变更列表, 可以用变更列
+ 表替换文件列表:</para>
<informalexample>
<screen>
More information about the svnbook-dev
mailing list