[svnbook] r5394 committed - branches/1.8/zh/book/ch03-advanced-topics.xml
wuzhouhui at users.sourceforge.net
wuzhouhui at users.sourceforge.net
Sat Aug 12 01:16:00 CDT 2017
Revision: 5394
http://sourceforge.net/p/svnbook/source/5394
Author: wuzhouhui
Date: 2017-08-12 06:16:00 +0000 (Sat, 12 Aug 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-08-11 20:06:38 UTC (rev 5393)
+++ branches/1.8/zh/book/ch03-advanced-topics.xml 2017-08-12 06:16:00 UTC (rev 5394)
@@ -5439,13 +5439,14 @@
<para>和 <literal>empty</literal> 相比, 这些深度会得到更多的内容, 但和
<literal>infinity</literal> 相比, 会得到更少的内容.</para>
+ <!--
<para>We've used <command>svn checkout</command> as an example
- here, but you'll find the <option>--depth</option> option
+ here, but you'll find the <option>- -depth</option> option
present on many other Subversion commands, too. In those other
commands, depth specification is a way to limit the scope of an
operation to some depth, much like the way the older
- <option>--non-recursive</option> (<option>-N</option>) and
- <option>--recursive</option> (<option>-R</option>) options
+ <option>- -non-recursive</option> (<option>-N</option>) and
+ <option>- -recursive</option> (<option>-R</option>) options
behave. This means that when operating on a working copy of
some depth, while requesting an operation of a shallower depth,
the operation is limited to that shallower depth. In fact, we
@@ -5455,15 +5456,34 @@
command will maintain the ambient depth of the working copy
members while still limiting the scope of the operation to the
requested (or default) operational depth.</para>
+ -->
+ <para>我们已经介绍了 <command>svn checkout</command> 如何利用选项
+ <option>--depth</option>, 但读者会看到除了 <command>checkout</command>,
+ 还有很多子命令也支持 <option>--depth</option>. 在这些命令中, 指定深度
+ 将操作的作用域限制在某一层次上, 非常类似老选项 <option>--non-recursive
+ </option> 和 <option>--recursive</option> 的行为. 这就意味着当我们操作
+ 一个处在某个深度上的工作副本时, 可以执行一个深度更浅的操作. 实际上, 我
+ 们可以更一般地说: 对于一个给定的, 处于任意的周围深度 (深度可以是混合的)
+ 的工作副本, 和一个指定了操作深度 (或使用默认值) 的 Subversion 命令, 命令
+ 将保持工作副本的周围深度不变, 同时将操作的作用域限制在所给定 (或默认的)
+ 的操作深度上.</para>
- <para>In addition to the <option>--depth</option> option, the
+ <!--
+ <para>In addition to the <option>- -depth</option> option, the
<command>svn update</command> and <command>svn switch</command>
subcommands also accept a second depth-related option:
- <option>--set-depth</option>. It is with this option that you
+ <option>- -set-depth</option>. It is with this option that you
can change the sticky depth of a working copy item. Watch what
happens as we take our empty-depth checkout and gradually
telescope it deeper using <userinput>svn update
- --set-depth <replaceable>NEW-DEPTH</replaceable> <replaceable>TARGET</replaceable></userinput>:</para>
+ - -set-depth <replaceable>NEW-DEPTH</replaceable> <replaceable>TARGET</replaceable></userinput>:</para>
+ -->
+ <para>除了选项 <option>--depth</option>, 命令 <command>svn update</command>
+ 和 <command>svn switch</command> 还支持第二种与深度有关的选项 <option>
+ --set-depth</option>, 它选项可以修改工作副本里的项目的粘着深度. 现在看
+ 一下如果使用 <userinput>svn update --set-depth <replaceable>
+ NEW-DEPTH</replaceable> <replaceable>TARGET</replaceable></userinput>,
+ 把原来深度为 <literal>empty</literal> 的工作副本逐渐加深:</para>
<informalexample>
<screen>
@@ -5490,9 +5510,13 @@
</screen>
</informalexample>
+ <!--
<para>As we gradually increased our depth selection, the
repository gave us more pieces of our tree.</para>
+ -->
+ <para>随着深度的不断加深, 每次更新, 仓库都会给我们传来更多的数据.</para>
+ <!--
<para>In our example, we operated only on the root of our working
copy, changing its ambient depth value. But we can
independently change the ambient depth value of
@@ -5504,6 +5528,12 @@
out a portion of one branch of our family's tree, enable full
recursion on another branch, and keep still other pieces pruned
(absent from disk).</para>
+ -->
+ <para>在上面的例子里, 我们都是在工作副本的根目录执行操作, 改变周围深度, 其
+ 实我们可以独立地修改工作副本的 <emphasis>任意</emphasis> 子目录的周围
+ 深度. 认真使用这项特性就可以在工作副本中只保留感兴趣的部分, 而忽略那些
+ 不重要的部分 (所以称为 <quote>稀疏</quote> 目录), 下面的例子展示了典型
+ 的用法:</para>
<informalexample>
<screen>
More information about the svnbook-dev
mailing list